Dr Shamala Subramaniam
Dept. Communication Technology & Networks Faculty of Computer Science & IT, UPM e-mail : shamala@fsktm.upm.edu.my Phone : 03-89466512
Dr Shamala Subramaniam
Synopsis
Dr Shamala Subramaniam
Real-Time Systems
Dr Shamala Subramaniam
Dept. Communication Technology & Networks Faculty of Computer Science & IT, UPM e-mail : shamala@fsktm.upm.edu.my Phone : 03-89466512
Dr Shamala Subramaniam
Introduction
Dr Shamala Subramaniam
Definition
Any system where a timely response by the computer to external stimuli is vital is a realtime system.
Real-Time System runs task that have deadlines
Not necessary for the task to done within the dateline aircraft vs. video game The statement is True because it is almost Content Free Done Not necessarily to be done , calculating the value of T vs. accounts
What do you do with a realtime tasks that misses its Dr Shamala Subramaniamdeadline?
Definition
A real-time system is one which a substantial fraction of the design effort goes into making sure that task deadlines are met. Oxford Dictionary of Computing
Any system in which the time at which the output is produced is significant. This is usually because the input corresponds to some movement in the physical world, and the output has to relate to the same movement. The lag from the input to the output must be sufficiently small for acceptable timeliness.
Young (1982)
Any information processing activity or system which has to respond to externally generated input stimuli within a finite and specified period.
Dr Shamala Subramaniam 6
Dr Shamala Subramaniam
Driving a Car
Relating to a Real-Time System
Dr Shamala Subramaniam
Example: Car-and-Driver
Constraints of the driver Reach destination without colliding and within the speed limit
Drivers Mission: Reaching the destination safely while Controlled System/Process: Car.
Controls: Accelerator, Steering wheel, Break-pedal. Actuators: Wheels, Engines, and Brakes.
Dr Shamala Subramaniam 9
Dr Shamala Subramaniam
10
Dr Shamala Subramaniam
Conclusion Performance
Performance is not an absolute commodity. Performance must be measured instead in terms of what the condition allows. In other words, performance measures the goodness of the outcome relative to the best outcome possible under the circumstances.
Dr Shamala Subramaniam
12
Performance (cont.): The task the driver must perform Critical Task Tuning the Radio vs. Steering and Braking Critical Task varying Deadlines Not Constant; they vary with the operating environment (driving 6pm/am). About the drivers condition: Drivers Physical Condition 1s sleep vs. micro-sleeping Discrimination - on the basis of secondary factors additional fuel consumption
Dr Shamala Subramaniam
13
Try Out !!
Write a detail specification on what the driver must do in each conceivable eventuality & then ensure that the specifications were complete.
Dr Shamala Subramaniam
14
Wouldnt you agree that: Writing out formal specifications and validating them are perhaps the most difficult task in real-time systems. They are also the tasks about which researchers know the least.
Dr Shamala Subramaniam
15
A executes t1
B executes
A executes T2.2
A preempted by B
A resumes
A completes
Real-Time Systems differs from general purpose counterparts in 2 ways: Much more specific in their applications Consequences of their failure are more drastic
Dr Shamala Subramaniam
17
Structure of A Real-Time System RealThe s/w for the jobs are preloaded scheduling Environment Provides input to the controller, RT computer
Controlled Process
Sensors
Job List
Clock
State of the controlled process and of the Operating Environment is acquired by sensors
Trigger Generator
Actuators
FaultFault-Tolerant techniques output of trigger is fed in the actuators
Execution
Display
can be preloaded or pre=determined
Operator
TASK CLASSES
Task can be classified in two ways: Predictability of their arrival Periodic speed of the aircraft aperiodic aircraft turn Consequences of not being executed on time Critical
- every ni iterations of critical period task i
Common Misconceptions
real fast is real-time: a computer system may satisfy an applications requirement, but no predictability (no real-time resource management). hardware over-capacity is enough: again, without real-time resource management no appropriate balance of resource distribution.
Contents
Performance measures for real-time systems Properties of Performance Measures Traditional Performance Measures Performability
Cost Functions & Hard Deadlines
Introduction
2 Questions ?
Which performance measures are the most appropriate for real-time systems? How can engineers estimate the worst-case run time of a program, given the source code and target architecture?
Performance Measures for Real-Time Systems Real-time systems are used for critical applications Thus, the system must be carefully :
designed validated before operation Checking design correctness The choice of using formal and informal performance methods measures Characterizing performance & reliability Preparatory Step:
Performance Measures
The choice of performance measures is crucial Are yardsticks by which characterization is expressed Must be concise encapsulate in very few numbers the performance of a system Analogy:
Languages through which we convey system performance
Natural languages determines how our thoughts gets expressed but also which ideas arise the richness of the vocabulary
Probability density
Performance have system : weighted sum of the Measures (cont.) Eg: System A and B
mean M and variance V of the response time
a1M + a2(V)
Example 2.2
Performance perceived by a user depends in a complex way on the system response timeViewpoint of a Typist Performance
Example 2.3
Pocket Pager simple functions Performance metrics :
Not response time Battery Power
Example 2.4
System C special array-processing unit 2 matrices multiplication Clock frequency 5 Mhz
xny0
x1y0
0
+ +
P(2n-2) 0
x1y1 x0y2
x0y1
+
P(2n-1)
x1y2
P0
Example 2.5
Number of instructions executed per second MIPS System E Simple instruction set Machine code twice as long as F 1.5 times faster than F System F Complex instruction set
Points
Quite often even if good performance measure that accurately represents performance as the user perceives it, the application determines how systems are ranked. Frequent possibility for reasonable sounding performance measures to be misleading. Performance perceived by the user depends on so many factors that it is difficult in most cases to find a measure that is perfect in all respects.