ECEN 4623/5623 RT Embedded Systems Mid-Term Review Lecture
MT Review Fundamentals of RT Analysis –RT Correctness – Before Deadline and Correct Result –Best Effort, Hard RT, Isochronal RT, and Soft RT –Utility Curves for each of the above –CPU, I/O, and memory resource space (CPU-bound, I/O-bound, memory/CPU trade-offs) –Basic Timing Diagrams –Theorem 1 – RM Least Upper Bound –Theorem 2 (Lehoczky, Shah, Ding) – If deadline(s) are met over longest period from C.I., then system is feasible –Fixed priority, preemptive, run-to-completion scheduling –Services and interference (interrupts and higher prio services) –Necessary and Sufficient feasibility means?
MT Review Deadline Monotonic Theory –DM priority assignment policy –Simple sufficient feasibility test –Improved (more necessary) feasibility test –Differences between RM and DM theory T not equal to D Priority assignment policy Iterative feasibility test
MT Review Rate Monotonic Theory –RM priority assignment policy (optimality is ?) –Liu and Layland Assumptions C = WCET T=D Critical Instant Others? –RM Feasibility test is ? –Derivation of 2 task RM sufficient LUB LUB is O(C) complexity – equation Sufficient, but not Necessary and Sufficient Dynamic Priority Theories –EDF –Least Laxity
MT Review Tornado / VxWorks –Diagram of Host-Target IDE –Cross compilation –Target agent (WDB) –Target server (tgtsvr) –Target-Host communication (ethernet, serial, JTAG/BDM) –Dynamic linking and loading Downloadable ELF modules Module manager, loader/unloader built-in target symbol table? Host-based symbol table? Host-and-target symbol table with synchronization? –logMsg versus printf Printf I/O delays caller and can’t be called in kernel/ISR context logMsg performs output in slack time via tlogTask and message queue interface
MT Review Interval timer Host Link X-window system Target server Windview Target agent Wind Kernel X-interface Control Callback {time-stamp read} Link Data Relay WTX-App-Cmd WTX-Data WTX-Cmd WTX-App-Data{wvOn, wvOff} WDB-CmdWDB-Data Trace-data {time-stamp} X-display update Target Link
MT Review RT Synchronization –Priority Inversion –Unbounded Priority Inversion –Priority Inheritence –Priority Ceiling –Necessary 3 Conditions for Unbounded Prio Inversion 3 or more tasks (H, M, L priority) H and L tasks involved in mutex 1 or more M tasks not involved in mutex cause interference –Mars Pathfinder Story What went wrong? Why? How was it fixed?
MT Review VxWorks Kernel Mechanisms –Basic Task Control – taskLib VxWorks task states (see Programmer’s Guide) Creation, Deletion, and Control –Basic Synchronization – semLib –POSIX RT Extensions Message queues –Priority enqueue and dequeue –Same priority? –Blocking vs. non-blocking send and receive Real-time signals –Signals that queue – why? –Passing data – how? Real-Time interval timers and clocks –Systems tick and interval timer jiffy –Hardware interval timer operation –Virtual timers built on hardware interval timer(s)
MT Review Estimating and Measuring C (WCET) –Windview analysis Kernel instrumentation (store event ID and time-tag in trace buffer at key locations – e.g. context switch) Dump trace-buffer in slack time to host Post-analyze –Estimating C on RISC architectures Pipelining and superscalar processing CPI Cache hit/miss ratio (I-cache and D-cache) Pipeline stalls Page faults –WCET