1 / 28

System and Realtime Programming (G53SRP)

System and Realtime Programming (G53SRP). Chris Greenhalgh School of Computer Science. Aim:. To look at the issues of programming relevant to real-time, concurrent and embedded systems where timeliness, reliability, concurrency and hardware interfacing are required.

Download Presentation

System and Realtime Programming (G53SRP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. System and Realtime Programming (G53SRP) Chris Greenhalgh School of Computer Science

  2. Aim: • To look at the issues of programming relevant to real-time, concurrent and embedded systems • where timeliness, reliability, concurrency and hardware interfacing are required. • with particular emphasis on Java, including the Real-time Specification for Java

  3. Pre- and co-requisites • Introduction to programming (G51PRG) • Moderate imperative programming competence, including methods & classes, to be applied in Java for examples, exercises and examination • Concepts of concurrency (G52CON) • Relevant material on Java threads and synchronization reviewed in the first few lectures.

  4. Format • The teaching and assessment of this module comprises: • ~ 20 full-class lectures. • 1 RTSJ coursework and report (25%). • 1 written examination: 2 hours, unseen, 75%. • Plus (of course) you review the material, look at past papers, revise…

  5. Support • Talk to or emailing the convener, Chris Greenhalgh: • in his office, room B2(CS building, 1stfloor, access over walkway from centre block, not through MRL!). • by email, cmg@cs.nott.ac.uk (repeatedly) • see also http://www.cs.nott.ac.uk/~cmg/

  6. Resources • 2 lectures per week – • All lectures are compulsory. • Any cancellations will be announced in lectures and on the web page • notes available on-line as the course progresses. • a WWW page giving information about the course, exercises, assessment, special arrangements, etc (see CS Module Table):http://www.cs.nott.ac.uk/~cmg/G53SRP/

  7. Textbooks • The course text-book, “Real-Time Programming in Java”, Andy Wellings, Wiley, 2004 ISBN 0-470-84437-X • The old course text-book, "Real-time systems and their programming languages", Alan Burns and Andy Wellings, Addison-Wesley, 2001 (third edition). • Second edition OK for non-RTJava-specific stuff.

  8. Textbooks (ii) • See Library reading list for G53SRP • Linked from Module page & CS Module Index • See also… • Java books and online resources, e.g. "Java in a Nutshell", David Flanagan, O'Reilly & Associates, Inc. • other textbooks in the library - try a UNLOC subject search.

  9. Topics • Concurrent (multi-threaded) programming in Java • Concurrency control in Java • Real-time threads in RTSJ • Scheduling, schedulability and resource sharing • Event-driven and asynchronous programming in Java and RTSJ • Memory management in RTSJ • Hardware interfacing in RTSJ   • (Maybe: Interrupting threads, and asynchronous transfer of control in RTSJ??)

  10. Why? • So you appreciate simple applications when you find them :-) • "Real" systems are like this. • Concurrent programming can be appropriate and useful in some applications. • Being "correct" is not always enough; something may also have to be "in time". • Computers have increasingly critical roles to play in real-world activities with important safety and reliability requirements.

  11. What is a real-time system? • A real-time system is any information processing system which has to respond to externally generated input stimuli within a finite and specified period • the correctness depends not only on the logical result but also the time it was delivered • failure to respond is as bad as the wrong response! • The computer is a component in a larger engineering system => EMBEDDED COMPUTER SYSTEM • 99% of all processors are for the embedded systems market

  12. Terminology • Hard real-time — systems where it is absolutely imperative that responses occur within the required deadline. E.g. Flight control systems. • Soft real-time — systems where deadlines are important but which will still function correctly if deadlines are occasionally missed. E.g. Data acquisition system. • “Real” real-time — systems which are hard real-time and which the response times are very short. E.g. Missile guidance system. • Firm real-time — systems which are soft real-time but in which there is no benefit from late delivery of service. A single system may have all hard, soft and real real-time subsystems In reality many systems will have a cost function associated with missing each deadline

  13. Examples

  14. A simple fluid control system Interface Pipe Input flow reading Flow meter Processing Valve Output valve angle Time Computer Burns & Wellings, http://www.cs.york.ac.uk/rts/RTSbookThirdEdition/chap1.ppt

  15. A Production Control System Production Control System Finished Products Parts Machine Tools Manipulators Conveyor Belt Burns & Wellings, http://www.cs.york.ac.uk/rts/RTSbookThirdEdition/chap1.ppt

  16. A Typical Embedded System Real-Time Clock Algorithms for Digital Control Engineering System Interface Remote Monitoring System Data Logging Database Data Retrieval and Display Display Devices Operator’s Console Operator Interface Real-Time Computer Burns & Wellings, http://www.cs.york.ac.uk/rts/RTSbookThirdEdition/chap1.ppt

  17. Modern car(e.g. BMW X5 throttle)

  18. A fly-by-wire aircraft (e.g. f-22 raptor)

  19. A rocket or missile(e.g. Ariane 5)

  20. An autonomous robot (e.g. Mars Pathfinder)

  21. Characteristics of a RTS • Large and complex — vary from a few hundred lines of assembler or C to 20 million lines of Ada estimated for the Space Station Freedom • Concurrent control of separate system components — devices operate in parallel in the real-world; better to model this parallelism by concurrent entities in the program

  22. Facilities to interact with special purpose hardware — need to be able to program devices in a reliable and abstract way • Extreme reliability and safe — embedded systems typically control the environment in which they operate; failure to control can result in loss of life, damage to environment or economic loss

  23. Guaranteed response times — we need to be able to predict with confidence the worst case response times for systems; efficiency is important but predictability is essential

  24. Application Examples: Compiler • Correct • Not interactive • No deadlines • Typically sequential • May have safety critical impact depending on use

  25. Application Examples: WYSIWIG Word Processor • Interactive • Timely response • Not realtime • Rarely safety critical • Additional opportunity to recover from error • May have concurrency

  26. Application Examples: Washing machine controller • Embedded • Realtime • May have concurrency

  27. Application Examples: Aircraft controller • Embedded • Hard realtime system • Safety critical • Plenty of concurrency

  28. Summary • Many systems and devices include programmed computer-based elements • These typically • Exhibit concurrency • Have timeliness requirements (hard or soft) • Interface to specific hardware • Must be safe and reliable See also Burns & Welling chapter 1, Wellings chapter 1

More Related