ecen 4623/5623 rt embedded systems
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/1.jpg)
ECEN 4623/5623RT Embedded Systems
Mid-Term Review Lecture
![Page 2: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/2.jpg)
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?
![Page 3: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/3.jpg)
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
![Page 4: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/4.jpg)
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
![Page 5: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/5.jpg)
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
![Page 6: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/6.jpg)
MT Review
Interval timer
Host Link
X-window system
Target server
Windview
Target agent
WindKernel
X-interfaceControl Callback {time-stamp read}
Link Data Relay
WTX-App-Cmd
WTX-DataWTX-Cmd
WTX-App-Data {wvOn, wvOff}
WDB-CmdWDB-Data
Trace-data
{time-stamp}X-display
update
Target Link
![Page 7: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/7.jpg)
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?
![Page 8: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/8.jpg)
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)
![Page 9: ECEN 4623/5623 RT Embedded Systems](https://reader036.vdocuments.mx/reader036/viewer/2022072014/56812f38550346895d94c967/html5/thumbnails/9.jpg)
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