50 likes | 359 Views
CprE 458/558: Real-Time Systems. Some practical issues. Finding WCET. Problem: Given a program and an architecture, find the worst-case execution time (WCET) of that program on the given architecture.
E N D
CprE 458/558: Real-Time Systems Some practical issues CprE 458/558: Real-Time Systems (G. Manimaran)
Finding WCET Problem: Given a program and an architecture, find the worst-case execution time (WCET) of that program on the given architecture. Fundamental limitation: Given an arbitrary program, the problem of deciding if it will ever stop is un-decidable. This is known Halting Problem (Turing machine). By restricting the programming constructs used, one can get an upper bound in many cases. CprE 458/558: Real-Time Systems (G. Manimaran)
WCET Estimation Approaches • Program and Architecture analysis • Easy when architecture is simple – no cache, no pipeline, etc. • Difficult in modern architectures because of deep pipeline, multi-level cache, super-scalar feature, speculative execution and branch prediction. • Profiling based statistical approaches • Make several profiling runs of the program, get their exec. time to get the estimate of WCET. • Based on experimental results, estimate the confidence associated with some estimate of WCET. CprE 458/558: Real-Time Systems (G. Manimaran)
Practical considerations • Overruns: ACET > WCET • Abort the overrun job and perform exception handling • Value-based scheduling (drop less critical tasks) • Rescheduling, if possible CprE 458/558: Real-Time Systems (G. Manimaran)
Practical consideration – contd. • Mode change • Mission has multiple phases of execution • Each phase may have a separate set of periodic/aperiodic tasks • Smooth transition from one phase to another • Deleting tasks from old phase • Initiating tasks from new phase • Executing tasks from old and new phases during transition phase • Schedulability analysis must take into account multiple phases • Eg: flight control system: take-off, cruise, landing. CprE 458/558: Real-Time Systems (G. Manimaran)