90 likes | 211 Views
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
E N D
ECEN 4623/5623RT 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 X-window system Interval timer X-interface Control Callback X-display update {time-stamp read} {time-stamp} Windview Wind Kernel WTX-App-Cmd WTX-App-Data {wvOn, wvOff} Trace-data Target server Target agent WTX-Cmd WTX-Data WDB-Data WDB-Cmd Host Link Target Link Link Data Relay
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