1 / 12

CprE 458/558: Real-Time Systems

CprE 458/558: Real-Time Systems. Mid-term Solutions. Problem 1 (precedence task graph). Do the following in each 1/80 second cycle Validate sensor data ( T v ) Do the 30-Hz avionics tasks, once every six seconds ( T a ) Keyboard input and mode selection ( T a1 )

Download Presentation

CprE 458/558: Real-Time Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CprE 458/558: Real-Time Systems Mid-term Solutions CprE 458/558: Real-Time Systems (G. Manimaran)

  2. Problem 1 (precedence task graph) • Do the following in each 1/80 second cycle • Validate sensor data (Tv) • Do the 30-Hz avionics tasks, once every six seconds (Ta) • Keyboard input and mode selection (Ta1) • Data normalization and coordinate transformation (Ta2) • Tracking reference update (Ta3) • Do the 30-Hz computations, once every six seconds (T30c) • Control laws of the outer pitch-control loop (T30c1) • Control laws of the outer roll-control loop (T30c2) • Control laws of the outer yaw- and collective-control loop (T30c3) • Do the 90-Hz computations once every two cycles, using outputs produced by 30-Hz computations and avionics tasks as inputs: (T90c) • Control laws of the inner pitch-control loop (T90c1) • Control laws of the inner roll- and collective-control loop (T90c2) • Compute the control laws of the inner yaw-control loop, using outputs produced by 90-Hz control-law computations as input. (Ty) • Output commands (To) • Carry out built-in-test (Tt) • Wait until the beginning of the next cycle (Tw) CprE 458/558: Real-Time Systems (G. Manimaran)

  3. Solution 1 Tv Every 6 cycles Every 6 cycles Ta1 Ta1 Ta1 T30c1 T30c2 T30c3 Every 2 cycles Every 2 cycles T90c1 T90c2 Ty To Tt Tw CprE 458/558: Real-Time Systems (G. Manimaran)

  4. Problem 2: Table driven Vs. Static priority CprE 458/558: Real-Time Systems (G. Manimaran)

  5. Problem 3: Task-set schedulable by EDF and not by RMS • One possible solution: • T1 = (30, 60) and T2 = (45, 100) • EDF schedules the task set as the utilization is 0.95 (< 1) • Here is the RMS schedule: T2 misses its deadline T1 T2 T1 T2 0 30 60 90 105 CprE 458/558: Real-Time Systems (G. Manimaran)

  6. Problem 4: Modify task parameters to reflect application specific priorities in RMS (without value) • RMS assigns priorities based on the periods, therefore an important task should have lesser period. In other words, split an important task into a set of sub tasks with each with smaller period and smaller computation time Split into 8 sub-tasks T21…T28 each equal to (0.5, 2) T2 = (2, 8) Split into 16 sub-tasks T31…T316 each equal to (1/16, 1) T3 = (4, 16) Now, according to RMS the priority order is: T1 < ( T21….T28 ) < ( T31……T316 ) Effectively: T1 < T2 < T3 CprE 458/558: Real-Time Systems (G. Manimaran)

  7. Problem 5: Response time order Background Increasing Response time Polling server Deferrable server PE server CprE 458/558: Real-Time Systems (G. Manimaran)

  8. Problem 6: Value Based Schedule EDF Schedule T1 T2 T1 T3 T1 T2 T1 T3 Value = V(T1) + V(T2) + V(T3) = 25 Clairvoyant Schedule T1 T2 T1 T5 T1 T2 T1 T5 Value = V(T1) + V(T2) + V(T5) = 70 Value ratio = 25 / 70 CprE 458/558: Real-Time Systems (G. Manimaran)

  9. Problem 7: Construct RMS schedule recognize blocking times RMS Schedule Direct blocking of T3 by T2 T3 T1 T2 T3 T2 T1 T2 T3 T3 T2 10 11 12 0 2 4 6 7 8 14 16 Priority inversion between T1 by T3 RMS Schedule with Priority Inheritance Protocol Direct blocking of T3 by T2 T3 T1 T2 T3 T2 T3 T1 T3 T2 0 Inheritance blocking of T1 by T2 CprE 458/558: Real-Time Systems (G. Manimaran)

  10. Problem 8: Best values of K and W • When U = E (case 1) • K = 1 and W = 0 • There is no flexibility, therefore having large K and W does not help much • When U = S and N (cases 2 and 3) • K = 1 and W = 0 • There is no possibility of hole creation anyways, therefore is no need of going for larger values • When there are two instances of the resources • Answers do not change for any of the three cases CprE 458/558: Real-Time Systems (G. Manimaran)

  11. Problem 9: Resource Reclaiming (1) • Two situations in which “no reclaiming” is better than all the four resource reclaiming algorithms studied in the class • When aw-ratio = 1, there is no hole to reclaim. The no-reclaiming scheme will avoid unnecessary overhead • When there are a lot of constraints. For example every task needs a single resource in exclusive mode. In this case there will be no holes and hence no-reclaiming will avoid unnecessary over-head CprE 458/558: Real-Time Systems (G. Manimaran)

  12. Problem 9: Resource Reclaiming (2) • Do Basic and Early start algorithms produce a valid post-run schedule? • Yes they do • Basic algorithm exploits only simultaneous holes. Therefore, it cannot result in any violations. • Early algorithm carefully maintains the relative ordering of the tasks and hence cannot result in any violations • Both the algorithms are very conservative in nature. RV algorithm is more exact and also results in a valid post-run schedule CprE 458/558: Real-Time Systems (G. Manimaran)

More Related