You are on page 1of 16

1

Introduction to Real-Time Systems (by Damir Isovic)

Summary: This chapter provides an introduction to real-time systems. First, it presents some typical real-time applications and discusses how they differ from traditional, non-real-time computer systems. Then, it highlights some typical properties of real-time systems, such as timely execution and safety-critical behavior, as well as some of the major challenges with the development of real-time applications. Furthermore, the chapter discusses basic knowledge, methods and techniques for construction of real-time systems. Finally, it presents some of our own experiences within the subject.

1.1

Learning objectives of this chapter

After reading this chapter you should be able to • Understand the difference between real-time systems and traditional computer systems • Have knowledge and understanding of fundamental real-time systems design paradigms, architectures and possibilities. • Obtain knowledge about different classes of real-time systems. • Obtain knowledge about major challenges when constructing real-time applications, as well as common misconceptions about real-time systems.

1.2

Introduction

Over the past years, it has become more and more common to use computers to control processes that are traditionally controlled with proven conventional techniques such as mechanics and electro-mechanics. For example, nowadays we can find computers in modern cars, airplanes, and medical equipment, but also in small embedded devices such as cell phones, game consoles, digital cameras, home appliances, etc. One reason for using computer systems is to improve already existing systems. For example, Antilock Braking System (ABS) in a car allows the driver to steer during hard braking, which means that the car can be controlled much better. Before this, drivers had to know how to "pump" the brakes or sense the lockup and release foot pressure in order to prevent skidding. Another example in cars is Electronic Stability Program (ESP), which assist drivers in critical driving situations by monitoring the vehicle's response to the driver's steering and braking. This way, over steer or under steer situations can be avoided. Another reason for replacing mechanical systems with software-based systems is cost reduction. Let's take a car example again. In the past, wiring was the standard means of connecting one element to another. Adding new functionality to the vehicle means also adding new wires, which weakens performance, and makes adherence to reliability standards difficult. Besides, complex wiring harnesses took up large amount of vehicle volume, making

3 Historical perspective Through the history. in a 1998 press release. which can be found and measured in other types of systems.. For example. i. The spinning machine developed further. Today. Once we entered the computer era. One example is Spinning Jenny. so that it could be driven by water sources and. called Programmable Logic Controller (PLC) was not far away. By turning a single wheel. the operator could now spin eight threads at once. Motorola reported that replacing wiring harnesses with a common bus network in the four doors of a BMW reduced the weight by 15 kilograms while enhancing functionality. The first mechanical control systems were developed in the 18th century. but let’s first have a look at the history of process control. e. it is crucial that the system operates well both in the functional and the temporal domain. the brain is a computer. The only physical property that we can measure is time. Another application area is telephone switches – there are still electromechanical switches in use. correct handling of input values 1 and 27 cannot be used as an indication for correct handling of all intermediate (or other) input values. Relays are found hidden in all sorts of devices. and consequently increased fuel consumption. but also on the time when the result is delivered. computer solutions make it possible to implement more advanced functionality.g. a bridge that will sustain a load up to a certain maximum if it is tested to hold for the maximum load). These types of systems are called real-time systems. The next step in the development was relays. the transition from relays to programmable systems. a computer with its software is potentially discontinuous across its whole range of operation. and for the systems mentioned above. physical point-to-point connections between car components have been replaced by a communication network. 1.. In software systems. We will provide a more exact definition of real-time systems later in this chapter. must be at least as reliable and safe as the mechanical systems they are replacing. density etc. making the whole system more complex.e. energy. The correct behavior of the system does not only depend on the correctness of the result. In a PLC system. later. people were always trying to control external processes. In fact. by a combustion engine. the eyes are sensors that get input from the environment. replacing hardware solution with software is not a trivial task. some of the first computers ever built used relays to implement Boolean gates.g. such as vehicle control systems and medical equipment.. a mechanical spinning machine with multiple spindles. At the same time. A relay is a simple electromechanical switch made up of an electromagnet and a set of contacts. there are no physical limitations. and the muscles are used for actuation. the relays are . Also. such as mass. where different parts of the vehicle communicate through a common communication network. Computer systems in safety-critical applications. One example is controlling the water level on the rice fields via floodgates in ancient China. However. compared to a mechanical system (e. The control system in this case is a human.it heavier.

These systems are built as a loop with a set of instructions that can handle the input data and produce an output.connected to each other by software that executes on a primitive computer.e. They are still very common in resource constrained systems (e. The whole idea is illustrated by the program in Figure 2. checked periodically. The main difference was the possibility to include more logics by storing the internal application states. . i. I/O-copy Write digital values as output x = y AND x n   Figure 1: Principle behind a simple PLC. i.e.or CPU limited systems) . Later. memory. i. there is no selection. At the beginning of each periodic cycle. The next step in the development was control systems based on microprocessors. and it was used to provide a certain periodicity in the execution. Interrupt routines made it possible to handle even nonperiodic functions. The system usually had a clock that got initiated at the start of the system..e. Read digital values as input 1 2 3 . . functions for which we cannot define a period.illustrates the principle behind a simple PLC. Note that every instruction has to be executed in each cycle. PLC systems are still very common in industry because the systems that are built of PLCs are simple and easy to implement and maintain. the system waited for the next cycle by checking the current clock value. and the possibility to implement iteration and selection.. followed by calculations of new values which were then used to control the process. Figure 1 Fel! Hittar inte referenskälla. One example of such non-periodic function is a pulse counter that counts the number of cars that pass a certain street – we do not know how often the cars are passing. Microprocessor systems work well if the controlled environment is not too complex. Then.g. I/O (input/output) was typically polled. It started with single-processor systems with cyclic programs similar to the PLC loop... interrupt handling was added. new I/O values were loaded from sensors.

When the application complexity is low..)) It is quite difficult to describe what is the "state-of-the-art" today. . The choice of computer system architecture depends on the physical distribution and complexity of the application..4 What is a real-time system? We mentioned above that many applications require that the system delivers correct data within a specific time interval. but could also be executed on a distributed computer system consisting of several processing nodes connected through a communication network.).. Those are usually system-on-chip computers.. Upon a car collision. } }   Figure 2: Example of a simple cyclic microprocessor program. Hence. the system must inflate the airbag within a fraction of a second. memory and I/O integrated on a single chip... waitForNextCycle(. /* wait some time and redo everything */ /* system initialization */ /* do repeatedly */ /* read input values from sensors */ /* produce output */ /* do some action based on new values */ if (calculateNewSetValues(. while(1){ readSensors(. there is certain time interval in which the inflation of the airbag must occur – not too early neither too late. which is designed to protect the driver and passenger against injury in case of collision. At the same time.. i. e.g. computers that have a CPU. since there are many different types of controlled system. Real-time systems can be executed on a stand-alone single processor. since the airbag then will deflate before catching the driver/passenger. the airbag must not be inflated too early either. resulting in a hard blow to the head or chest that can cause serious injury or death. else error()..that have simple functionality. but in general we can say that in resource constrained systems we can use microprocessor systems with an instruction loop and interrupt routines. 1. in more complex systems real-time systems can be used. a node that controls electrical power windows in a car. PLC-systems can be used. If the system waits too long to inflate. One example is the airbag control system in a car.). actuateProcess(.). void main (void){ initializeClock().e.. the driver and passengers will be both dangerously close to the explosion used to inflate the airbag and/or hit the steering wheel and the dashboard. One example are small control system nodes.. However.

there is a distinction that we can make. Note that the definition above says nothing about the time scale that is to be used. while real-time computing fulfils individual timing constraints for each separate program that runs on processor. others at milli. we need to ensure that each picture will be processed in time before the next one arrives. This puts some challenges on the system that is playing the video. the system will have 33 milliseconds to process each picture.e. less safety-critical example of a system that requires timely delivery is video processing. e.or even microsecond level. 1988): Definition: A real-time system is a system that reacts upon outside events and performs a function based on these and gives a response within a certain time. One such real-time task is the one that controls the airbag in a car. but also on the time when these are produced. Delays in processing a picture will result in visible artifacts. The most common misconception associated with real-time systems is that their main mechanism and purpose is to increases the execution speed of the application.g.. With these enhancements. Correctness of the function does not only depend on correctness of the result. i. If the display rate is high enough. this result must also be produced and delivered on time. the user will perceive the video as having low quality. all programs that execute all together. These systems are called real-time systems and we define them as follows (Stankovic & Ramamritham. With a rate of 30 pictures per second. Fast computing tries to minimize average computation time for the entire system. so called real-time tasks: A real-time task is a sequential program that performs certain computation and possibly communicates with other tasks in the system.. i.. it is possible to determine the exact time when certain events will occur..Another.. Sometimes.e. 30 pictures per second.e. While this is true in some cases. and its individual timing constraints are the earliest and the latest time (deadline) the airbag must be inflated. i. Although they are usually considered as synonyms. A video stream consists of a series of still pictures that are displayed in sequence with a certain rate. the word thread is used instead of task. to read the picture from disk. while “thread” is used when talking of the implementation of a real-time task in an operating systems. A typical timing constraint on a real-time task is the deadline. Hence. it is to achieve timely computing.e. We can say that thread is an implementation of a task in a real-time operating system. the eye will not detect the void between consecutive pictures and a motion will be perceived. i. Both examples above show that in some systems it is not enough to produce a correct computational result. . they actually enhance the application by providing more precise and predictable timing characteristics. decode it and display it on the screen. the latest point in time at which the task must complete its execution. That is because the controlled process dictates the time scale – some processes have demand on response at second level. the term “task” is used when discussing the design and analysis of real-time systems. We can say that the main objective of real-time systems is not to achieve fast computing.

e. as depicted in Figure 3. medical monitoring devices. The brain makes decision what to do.g. if somebody throws a ball toward us. and an actuator to change the rotation speed.1.g. machines etc. another sensor to read the desired rotation speed that a user can set. It uses a sensor to read the current rotation speed of the engine. everything that we use to collect information from the environment. An example of a real-time system that uses sensors and actuators is a computer system that regulates the rotation speed of an electrical engine. Examples include motors. and sends them out to the engine via the actuator. Air speed. e. brake force in a car. Our sensors are our eyes. we detect it (sampling) with our eyes (sensors) and pass the information about incoming ball (signals) to our brain (computer). We can make a parallel with the human body. The process of collecting the data from the environment through sensors is called sampling. . nose. skin.. to catch the ball (processing) and sends the order (actuation) to our hand (actuator) to catch it. pumps. result from a computation.. Most of these systems interact directly or indirectly with electronic and mechanical devices through sensors and actuators. such as ECG.5 Close interaction with the environment Many applications are inherently of real-time nature. The computer system executes a control algorithm that calculates the new control values based on the input from the sensors. Speed sensor Electrical motor Speed actuator Sensor values (current rotation speed) New control values (increase/decrease speed) Computer system User input Figure 3: Rotation speed regulation in an electrical motor.g. automated factories. use sensors to monitor patient status. Sensors provide information to the system about the state of its environment. they transform digital data. chemical plants. e. For example.. into physical format. we perform some action with them. attitude and altitude sensors provide aircraft information for proper execution of flight control plans etc. examples include aircraft and car control systems. Our actuators are our arms and legs. The process of performing some action on the environment is called actuation. ears. medical intensive care devices and numerous others. For example. Actuators work the other way around.

g. So. artificial deduction. and the period-time requirement specifies how often we need to sample in order to get an accurate view of the environment.. construct a system where the period time varies too much.e. e. What we need to do now is to construct a real-time system that fulfills those requirements. bodies in motion – arm movement of a robot system has to follow some physical laws. e. If the period time is too short. etc. see the timing diagram in Figure 4: sampling actuation sampling actuation computation computation time latency period time Figure 4: A simple control model for electrical motor. This leads us to the problem definition for real-time systems: to construct a computer system so that all individual timing constraints of the tasks are really fulfilled. we have probably got the values for allowed latency and period time from a control engineer that has analyzed the process. Let's have a look at another example with .e. recommended sampling rate is equal to half the rate of the sampled signal. If we. the control algorithm will run too often. the time between sending a user request to change the speed and actually enforcing the new speed will be too long. the system could be perceived as slow.... where do the timing constraints come from? One answer is: from close analysis of the controlled process. If the period. i. Furthermore. it might result in a severely reduced control performance. we can identify a couple of new timing constraints – the latency and the period time of a task. The analysis needs to consider the laws of nature. If we continue with our electrical motor example from the previous subsection.e. taking CPU time from other tasks in the system. i.g. some constraints are given but some others has to be deduced. for example. however. One such constraint was the deadline of a task. The latency requirement specifies how fast we need to process the input data and produce an output. at the same time as the system resources are shared properly between tasks.. performed by control engineers.6 Timing constraints We mentioned before that fulfilling timing constraints of individual tasks is crucial for correct functioning of real-time systems. it needs to consider mathematical theory. the timing requirements of the system. is too long. discussed above in the airbag example.1. i. In the electrical motor example above.

since we need to take into consideration both a task’s own individual timing requirements and the other tasks in the system that compete for the same resources.. the system must detect it and issue a warning on time so that the pilot can increase the altitude. some other function in the airplane. e. CPU time. If the system. as in scenario b of the figure.g. might not get time to execute. For example.  The question here is how often the system shall check the terrain. and how the system should schedule tasks so that they meet their requirements. A warning must be issued latest here a) Too frequent monitoring b) Sufficient monitoring c) Too infrequnt monitirering Late warning Figure 5: Example period in an autopilot. leading to unavoidable crash (scenario c). cabin pressure controller. the time between two samples should not be too short or too long. and other timing constraints in general. Hence. waits too long between two samples. We will see in later chapters both how we can assign appropriate timing constraints to tasks. on the other hand.g. see Figure 5. . it might detect the change in terrain too late.the terrain collision feature in an airplane that displays a warning in a cockpit when the path of flying intersects the terrain. is not trivial. Assigning right periods. e.. Sampling too often (scenario a in the figure) means waste of resources – if too much time is spent in checking the terrain. if there is a mountain in front of the airplane.

Obviously.g. the real-time system must be able to chose (and run) tasks in the order importance. Design for peak load and fault tolerance .g. For example. i. Event-triggered or time-triggered execution – There are two fundamental principles of how to control the activity of a real-time system. Note that this is simulated parallelism – tasks are not really executed in parallel but the system switches the execution of tasks very often and fast. Also. if we have only one processor. how long time does it take in the worst case to react upon a collision and activate the airbag. This is different from real parallelism where several processing units are used simultaneously. and when it starts to run on a processor.. check the cabin pressure. single hardware and software failures should not cause the system to crash. e.1. the task that inflates an airbag has the highest priority among all other tasks running in the car. States – Each task can be in several different states during its execution. execute the most important one first. In the second one all activities are carried out at certain points in time known in advance. a control system in an airplane needs to perform several activities at the same time. the system must be able to predict the consequence of any scheduling decision. e. event-triggered and time-triggered. process radar signals. If some task cannot be guaranteed to execute within its time constraints. if we get into a situation where several tasks want to execute at the same time. so that alternative actions can be planned in time to cope with the event. but about predictable computing..Real-time systems must not collapse when they are subjects to peak load conditions. the task itself periodically checks if the sensor value has changed. Prioritization – Some tasks are more important than others. when a task is competing for the CPU time with other tasks. i. a sensor generates an interrupt which triggers a certain task to start its execution. such as to check the altitude.e. it is in ready state... before the collision occurs. Remember. real-time computing is not about fast computing. etc. We will learn more about task states and state transition in the next chapter. Hence.g. e. The first one reacts upon external events as they happen. several tasks are competing for the system resources. For example. we say that the task state is executing. which is called multitasking. . If we recall the airbag example. the system must notify this fact in advance. Multitasking – In a real-time system.7 Characteristics of real-time systems Beside the most obvious properties that we’ve discussed several times so far – the timeliness and close interaction with the environment – real-time systems have the following other important characteristics: Predictable execution – To guarantee a minimum level of performance. we need to share it among different tasks by running the tasks in parallel.e.. this means that it must be known in advance. so they must de designed to manage all anticipated scenarios.

Event-triggered systems are often simple. work well in applications with sufficient computing power.e. Meeting deadlines is desirable for performance reasons. e. In less extreme situations. In hard realtime systems. e.g. or multimedia system may miss delivering some video frames giving lower video quality. In soft real-time systems. Time-triggered systems are less flexible than event-triggered systems.8 Classifications of real-time systems There are several different classifications of real-time systems. Real-time systems of this kind are time triggered in the sense that their overall behavior is globally controlled by a recurring clock tick. it is detected by some sensor. For example. Here. which eases system validation and verification considerably.g. However. missing a deadline to recognize a moving object on a factory conveyor belt means that the object cannot be properly processed. etc. Missing a deadline may lead to catastrophic consequences on the environment being controlled. and so on.. it is easier to add new tasks to the system.. nuclear power plants. Typically. and they are flexible. etc. and therefore a hard real-time system should be designed to handle both hard and soft tasks using two different . when many events are happening at once. i. ATM machines. a task that reads a sensor each 50 milliseconds (regardless if there is a new value available or not). For example. control system of an airplane.1. real-world applications include both hard and soft activities.000. it can lead to loss of live or an environmental disaster. all activities are carried out in response to relevant events external to the system. e. They are most often cyclic systems which repeat a certain scenario: clock interrupt occurs at regular intervals and at that time selected sensors are sampled. Event-triggered vs. service level.. Some other examples are ticket reservation systems.. application domain.g. Hard vs soft real-time systems – Depending on the consequences that may occur due to a missed deadline. airbags. real-time systems can be divided into two classes. based on different criteria. In a hard real-time system. such as activation of tasks. failing to meet hard real-time constraints results in computations being useless. we will present some of the most common classifications. hence they can fail under conditions of a heavy load. but they are more predictable. Missing a deadline does not cause serious damage but it leads to reduced usefulness of the computation (reduced service). it is acceptable to occasionally miss a deadline. In time-triggered systems. In extreme cases. When a significant event in the outside world happens. a telephone switch may be permitted to lose or misroute one call in 100.. temperature monitoring. time-triggered real-time systems – In event-triggered systems.e. hard and soft. the peak-load performance must be predictable and should not violate the predefined deadlines. We will talk much more about these two types of real-time systems in consecutive chapters. air traffic control systems. all task deadlines must be met. which are known in advance. which then causes the attached device (CPU) to get an interrupt. resource dimensioning. the temporal control is enforced from the environment onto the system in an unpredictable manner (interrupts). i. all events are handled at predefined points in time. Hard real-time systems are often safety critical.

such as ABS or ESP.. Examples include ABS brake systems. the system is dimensioned for more likely average load scenarios. the CPU will never get overloaded. there will be occasions when we cannot guarantee that all computations will complete in time. a node is single- . before their deadlines. Resource sufficient vs. Embedded vs. flight control systems. Instead. Typically. i. we can divide real-time systems into resource sufficient and resource limited systems. home appliances. is built of two connected Controller Area Network (CAN) communication busses: one high-speed bus for safety-critical applications in a car. On the other hand. such as operator terminals. Since those systems are usually integrated in a product it is hard to re-program. in resource limited systems. the system might not be able to connect our call (or we need to wait for some time). In these systems.e. air condition and infotainment system.. see Figure 6). One example is telephone switch system which is designed for the average case load. etc.e. Examples include portable devices such as cell phones or MP3 players. Non-embedded. therefore they should be very robust and reliable. i. more than 99% of all computers today are embedded in different kinds of electronic equipment and machines. usually with very specific requirements. on the other hand. which is used by other nodes.g.. most safety-critical applications.e. and many more. Vehicle control system – The control system of Volvo S80 (architecture from late 90s. open systems. resource limited real-time systems – depending on how many resources are reserved for the system. close to the sensors and actuators they interact with.. surveillance systems. we usually get the dial tone right away. This case happens so rarely that it is not worth the cost for the telephone company to dimension its systems for this peak load.9 Example applications In order to distinguish more clearly between different types of real-time systems. a heart pacemaker in a human body.. but when we try to dial on the New Year's Eve. A real-time system with enough resources is a system in which we always can guarantee that all functions in the system can be performed in time. are based on generally accessible computers. electric windows. e. e. The objective is to guarantee individual timing constraints of hard activities while minimizing the average response time of soft activities.. non-embedded systems – An embedded system is a special-purpose computer that performs a few dedicated functions. since those systems are designed for the worst-case scenario (peak load). In most of the cases the telephone switch system works well: when we call somebody. i. flight control systems. etc. that are possible to reprogram on site. medical equipment. 1. we will have a look some examples. Actually. TV sets.strategies. video game consolers. A number of processing nodes are placed on different strategic places in the car.g. when all other people try to call at the same time. and a lowspeed bus. car engine controllers.

  All sensors. PLC nodes are often connected through a field bus. a microprocessor with some functionality for communication. the sensor values are sent over the common communication bus. Operator station Factory network Processing station Fieldbus PLC Processing station Processing station Environment PLC PLC   Figure 7: Example industrial system.e. regardless if the corresponding software is physically located on the node. High-speed network for safety-critical functions PDM ECM TCM ETM SAS ABS DIM SWM CCM AUM PHM UEM SRS PSM RTI REM Low-speed network CEM DDM   Figure 6: Communication Network in Volvo S80. PLC-programming is used for simple processing operations. analog-todigital and digital-to-analog conversion. which is usually based on Ethernet or Token Ring (more on this will come later when we discuss real-time communication)..e. If a specific task that uses produced sensor data is scheduled to run on another node. i. see Figure 7. all information that is sent on the bus will be available for all attached nodes. Those are then connected to a factory network. . i.chip computer.. Since the CAN bus is of broadcast type. making larger processing units. actuators and contacts are connected to the closest processing node. Industrial control system – Such systems are built of several different subsystems. a communication bus that supports simple connection of sensors and actuators.

it is also a misconception that real-time programming implies low level.e. the processing power of hand held devices. and battery life. Thus. The objective of fast computing is to minimize the average response time of a give set of tasks. A. e. Rather than being fast. digital multimedia streams are very big in size. display devices and users. media files must be compressed before being stored on e. Analog television broadcasting has been replaced by digital signals that better utilize the communication media and provide for a greater variety of TV channels and interactive services that are not possible in the analog domain. a DVD. it can be adjusted based on the current resource availability. In fact. while the storage and the communication media have limited resources. 1. Display devices are also restricted. even under limited system resources. producers of such consumer electronic devices have argued to mandate the use of hard real-time methods for audio/video processing. HiFi products.. the more complex do real-time systems become.. One of the most common misconceptions is that real-time computing is equal to fast computing. while the objective of real-time computing is to meet the individual timing requirements of each task. Blue Ray players. in fact. its functional and timing behavior should be sufficiently deterministic to satisfy the system specifications. When real-time systems are used. For instance. digital media introduces additional and different requirements on the environment.g. we have a better control over available system resources and we can reserve them in order to meet task deadlines. memory. If there is not enough resources to fully process the incoming video. by . At the same time. but this does not mean that the timing constraints will be met automatically. One of the primary objectives in real-time research is. for a more extensive list see (Stankovic J. and hence. assembly programming. or transmitted through a network. 1988). such as TVs. there are restrictions on the communication and storage media.. Furthermore.. In their original form. Real-time admission control and resource reservation mechanisms can be used to ensure that video processing applications perform satisfactory.10 Some misconceptions about real-time systems There are several misconceptions about real-time systems and we need to mention some of them before proceeding any further. the Internet. Handcrafted assembly and device driver programming are major source of bugs. In fact.Consumer electronics – Real-time systems are even used in consumer electronic (CE) devices. Another misconception is that the advances in hardware will automatically take care of realtime requirements. e. Today. Compared to the analog domain. is not sufficient to play out a full-size video stream without impairing video quality.g. such as pocket PCs or video mobile phones. to automate.. improve performance. the most important property of a real-time system is predictability. i. most of the existing analog home entertainment devices are being replaced by corresponding digital products. These advances will likely exploit parallel processors to improve system throughput. the faster the hardware gets. with respect to processing power.g. computer game consoles etc.

material properties. Some other challenges are interaction with special purpose hardware. and has gained valuable experience through the years. it is possible to implement very advanced real-time systems. One problem is lack of physical limitations.     . but to use high level languages such as C. Another challenge is that in real-time systems. Time is the only physical thing we can measure in real-time systems. damage to environment or economic loss. traditional disciplines. Furthermore.g. 1. However. While assembly language programming. Embedded real-time systems usually operate in harsh environment (high temperature. it can be pretty challenging.11 Challenges with real-time systems As we could see so far.. mankind has been building houses for centuries. The state-of-thepractice today when programming real-time systems is not to write assembler code. device drivers are often large development time sink. except in their automation. Several tasks are competing for the CPU time pre-empting each other. Since most of the real-time systems are embedded into products. device driver writing and interrupt programming are aspects of realtime computing. e. Interfaces. maintenance is usually difficult.exploiting optimizing transforms and scheduling theory. i. Embedded systems typically control the environment in which they operate.. we must solve the same problems as in traditional computer systems. Devices operate in parallel in the real-world. such as building and construction engineering. Besides. Finally. etc). EMI. We must be able to predict with confidence the worst case response times for systems. and in addition we need to take the timing requirements into account. the synthesis of highly efficient code and customized resource schedulers from timing constraint specification. This makes it hard to maintain deterministic. the latter has a number of physical limitations that we can rely on when designing and verifying the system. physical laws etc. real-time systems often have to be extremely reliable and safe. they do not constitute open scientific problems. with a heavy tool support. Failure to control can result in loss of life. If we compare it to some other. let’s see why. computer engineering has been around only for decades.e. which conflicts with sequential execution on controller. Ada or Java. reproducible behavior. efficiency is important but predictability is essential. radiation. we must program devices in a reliable and abstract way.

e. the environment dictates the speed and cannot be slowed down. where there is an exact time interval in which the airbag must be inflated – not too early. This is an example of a hard real-time system. or disturbed movies.1. verification and validation of real-time applications.e. Compare to crossing a river: not the average depth determines safe passage. The predominate approach of standard computer systems which focus on minimizing average delays are inappropriate for such systems. the system must wait until it responds. but also delivered at the correct times. i. the prime goal is not to achieve fast computing. the correctness of results depends not only functional values. as in the airbag application in a car. After reading this book.e.12 Summary Real-time technology ensures that the results of computations are not only correct. the system reacts to external events as they happened and activates corresponding tasks. but also the time of availability: a correct value delivered too late is wrong. we will cover numerous aspects of real-time systems. reliability. rather the worst case situation has to be handled. design or real-time systems. i. A number of areas in computing are affected by real-time demands. In timetriggered systems. at their speed. In some cases. In this book. but the deepest one. which is essential in applications ranging from airplanes. i. . Event-triggered systems are more flexible. etc. such as support by operating system to implement real-time applications. since they may result in crashed planes and cars. and at the same time. programming languages and specification. but the system performance gets degraded. such as DVD players. Execution of real-time systems is achieved in real-time tasks. real-time scheduling mechanisms. temporal analysis. CPU and communication network scheduling. all tasks meet their individual timing constraints. it is to achieve timely computing. TVs. Task activation and execution can be either event-triggered or time-triggered. In real-time computing systems. but less predictable than time-triggered systems. nor too late. cars to mobile phones and multimedia devices. no deadlines must be missed.. all task executions is predefined in advance. you should be prepared to develop real-world real-time applications. In soft systems. In the first case. With real-time systems. as well as some complex real-time architecture that involve several separate processing nodes connected through some real-time communication network. The real-time system has to react to events as they occur. which are sequential programs that perform certain actions in the systems. deadlines can me missed occasionally. the system switches task execution according to some scheduling policy such that all tasks get to execute. Tasks are executed in a multitasking manner. Fast or timely on average behavior is not acceptable. all system actions are dictated by a system clock. including hardware and operating systems... lost phone calls.

. 1. Why do we need this type of systems? 1. Bibliography    Stankovic. Explain the difference between those two types of RT systems and give one example of each type (examples from the book are not allowed). & Ramamritham.     . One classification of real-time systems is into hard and soft real-time systems. Tutorial on Hard Real-Time Systems.e. 10-19. Explain what sensors and an actuators do. i. IEEE Transactions on Computing.4.2. One classification of real-time systems is into event-triggered and time-triggered realtime systems. A. 1.5. (1988). Computer .1. Explain in your own words what a real-time system is. Building real-time systems introduce some additional challenges compared to traditional computer systems. Misconceptions About Real-Time Computing: A Serious Problem for Next-Generation Systems..3. 1. Give one example of real-time systems that uses sensors and actuators. K. Explain the difference between those two types of RT systems and give one example for each of the types. 1. J. One of the largest misconceptions about real-time systems is: “a real-time system is equivalent to a fast system”.13 Exercises 1.1. Explain why this is a misconception. J.6. in which way they interact with the environment. (1988). Real-time systems interact with the environment via sensors and actuators. Stankovic. Discuss at least three difficulties when developing real-time systems.