Study like there’s no tomorrow because if you keep putting off your studies for tomorrow, you’ll probably be too late.
--Your friends at LectureNotes

Note for Real Time Systems - RTS by pratik poudel

  • Real Time Systems - RTS
  • Note
  • 9 Topics
  • 84 Offline Downloads
  • Uploaded 9 months ago
0 User(s)

Share it with your friends

Leave your Comments

Text from page-1

Chapter 1 Real-Time Systems 1.1 What is Real-Time?  Real-time is a quantitative notion of time.  Real-time is measured using a physical (real) clock.  Whenever we quantify time using a physical clock, we deal with real time.  An example use of this quantitative notion of time can be observed in a description of an automated chemical plant.  Consider this: when the temperature of the chemical reaction chamber attains a certain predetermined temperature, say 250oC, the system automatically switches off the heater within a predetermined time interval, say within 30 milliseconds.  In this description of a part of the behavior of a chemical plant, the time value that was referred to denotes the readings of some physical clock present in the plant automation system.  In contrast to real time, logical time (also known as virtual time) deals with a qualitative notion of time and is expressed using event ordering relations such as before, after, sometimes, eventually, precedes, succeeds, etc.  While dealing with logical time, time readings from a physical clock are not necessary for ordering the events. As an example, consider the following part of the behavior of library automation software used to automate the book-keeping activities of a college library:  “After a query book command is given by the user, details of all matching books are displayed by the software.” In this example, the events “issue of query book command” and “display of results” are logically ordered in terms of which events follow the other. But, no quantitative expression of time was required. Clearly, this example behavior is devoid of any real-time considerations. 1.2 What is Real-time system?  A system, which requires a quantitative expression of time (i.e. real-time) to describe its behavior is called a real-time system.  "The system in which the correctness of the system depends not only on the logical result of the computation, but also on the time at which the results are produced”.  The time at which a real-time system has to produce a specific result is called a deadline.  If the system takes too long to respond, then the required response may be ineffective. For example, if embedded software controlling a car braking system is too slow, then an accident may occur because it is impossible to stop the car in time.  Three major components: the controlling system, controlled system and environment. keshav.dhami@sagarmatha.edu.np 1

Text from page-2

 avionics computer (controller) controls aircraft system (controlled) to maintain desirable flight (environment) characteristics  desktop computer (controller) buffers, decodes and displays video streams (controlled) and adapts in response to unreliable data delivery of encoded data (environment) Fig: Typical Real time System 1.3 Types 1.3.1 Soft Real-Time a. Deadline overruns are tolerable, but not desired. b. The constraints are expressed either in terms of the average response times required. c. There are no catastrophic consequences of missing one or more deadlines. d. There is a cost associated to overrunning, but this cost may be abstract. e. Often connected to Quality-of-Service (QoS) f. Soft real-time systems also have time constraints; however, missing some deadline may not lead to catastrophic failure of the system. keshav.dhami@sagarmatha.edu.np 2

Text from page-3

g. Thus, soft real-time systems are similar to hard real-time systems in their infrastructure requirements, but it is not necessary that every time constraint be met. In other words, some time constraints are not strict, but they are nonetheless important. h. A soft real time system is not equivalent to non-real-time system, because the goal of the system is still to meet as many deadlines as possible. i. Examples: Web services such as real-time query, call admittance in voice over internet protocol and cell phone, digital TV transmissions, cable and digital TV set-top-boxes, video conferencing, TV broadcasting, games, and gaming equipment. Multimedia systems in general are examples of soft real-time systems (e.g., dropping frames while displaying video). 1.3.2 Hard Real Time Systems  Hard real-time systems have very strict time constraints, in which missing the specified deadline is unacceptable.  A hard real-time task is one that is constrained to produce its results within certain predefined time bounds. The system is considered to have failed whenever any of its hard real-time tasks does not produce its required results before the specified time bound.  The system must be designed to guarantee all time constraints. Every resource management system such as the scheduler, input–output (I/O) manager, and communications, must work in the correct order to meet the specified time constraints.  Examples: Military applications and space missions are typical instances of hard real-time systems. Some applications with real-time requirements include telecom switching, car navigation, the medical instruments with the critical time constraints, rocket and satellite control, aircraft control and navigation, industrial automation and control, and robotics. Conclusion: A ‘soft real-time system’ is a system whose operation is degraded if results are not produced according to the specified timing requirements. If results are not produced according to the timing specification in a ‘hard real time system’, this is considered to be a system failure. 1.4 Characteristics of RT System  Time constraint facilities  Large and complex  Concurrent control of separate system components  Facilities to interact with special purpose hardware  Extreme reliability and safety  Guaranteed response times  Extremely reliable and safe  Efficiency of execution keshav.dhami@sagarmatha.edu.np 3

Text from page-4

1.5 Real-time Applications  Following are the representative classes of real-time applications:  Digital control  Higher-level command and control  Tracking and signal processing  Real-time databases  Telephony and multimedia applications 1.5.1 Digital control Many real-time systems are embedded in sensors & actuators, and function as digital controllers. Digital control system uses digital signals and digital computers to act as a system controller. The objective of digital controller is to control a system, often called the plant (an engine, a brake, an aircraft, a patient etc.). Digital Controller: Implementation  Typically, a digital controller requires:  A/D conversion to convert analog inputs to machine readable (digital) format.  The A/D converter reads in information such as voltage and current and converts that information from the analog domain to the digital domain and then passes this information to the control-law computation unit.  D/A conversion to convert digital outputs to a form that can be input to a plant (analog).  A program called Control-law computation, which relates the outputs to the inputs.  It computes the control parameter to set the actuator. Figure: A digital controller keshav.dhami@sagarmatha.edu.np 4

Lecture Notes