mixed criticality scheduling with i o
play

Mixed-Criticality Scheduling with I/O Eric Missimer, Katherine - PowerPoint PPT Presentation

Introduction Scheduling Example Utilization AMC Results Conclusions Extra Mixed-Criticality Scheduling with I/O Eric Missimer, Katherine Missimer, Richard West Boston University Computer Science 1 / 25 Introduction Scheduling Example


  1. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Mixed-Criticality Scheduling with I/O Eric Missimer, Katherine Missimer, Richard West Boston University Computer Science 1 / 25

  2. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Introduction ◮ Previously developed Quest-V separation kernel for mixed-criticality systems ◮ Mixed-criticality now applied to single Quest kernel ◮ Mixed-criticality scheduling in presence of I/O ◮ Work builds on Quest’s hierarchical VCPU scheduling framework 2 / 25

  3. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Quest-V Mixed-Criticality Support Quest-V – each sandbox has a single criticality level 3 / 25

  4. Introduction Scheduling Example Utilization AMC Results Conclusions Extra New Contribution: Quest Mixed-Criticality Support Quest or a single Quest-V sandbox – multiple criticality levels 4 / 25

  5. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Quest Virtual CPUs (VCPUs) Scheduling hierarchy: threads → VCPUs → PCPUs 5 / 25

  6. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Quest VCPUs ◮ Two classes ◮ Main → for conventional tasks ◮ I/O → for I/O event threads (e.g., ISRs) ◮ Scheduling policies ◮ Main → Sporadic Server (SS) ◮ I/O → Priority Inheritance Bandwidth-preserving Server (PIBS) 6 / 25

  7. Introduction Scheduling Example Utilization AMC Results Conclusions Extra SS Scheduling ◮ Each SS VCPU has pair (C,T) ◮ Guarantee budget (C) every period (T) when runnable ◮ Rate-monotonic scheduling theory applies 7 / 25

  8. Introduction Scheduling Example Utilization AMC Results Conclusions Extra PIBS Scheduling ◮ Each I/O VCPU has utilization factor U IO ◮ I/O VCPU inherits period & priority from Main VCPU that caused I/O request ◮ T IO = T Main ◮ C IO = U IO × T Main ◮ I/O VCPU eligible to execute at t e = t + C actual / U IO ◮ t =start of latest execution ( > = previous eligibility time) 8 / 25

  9. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Scheduling Framework Task & interrupt (CPU & I/O) scheduling in Quest 9 / 25

  10. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Sporadic Server Only Sporadic Server only example – replenishment list fills up, more scheduling events 10 / 25

  11. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Sporadic Server + PIBS Sporadic Server + PIBS – no delayed replenishment due to fragmentation, less scheduling events 11 / 25

  12. Introduction Scheduling Example Utilization AMC Results Conclusions Extra SS+PIBS Utilization Bound ◮ System of n Main and m I/O VPUs, and one PCPU √ ◮ � n − 1 T i + � m − 1 C i n j =0 (2 − U j ) · U j ≤ n · ( 2 − 1) i =0 ◮ C i & T i are the budget capacity and period of Main VCPU V i ◮ U j is the utilization factor of I/O VCPU V j 12 / 25

  13. Introduction Scheduling Example Utilization AMC Results Conclusions Extra PIBS Max Utilization in Main VCPU Period, T C 1 + C 2 = ( T ′ × U ) + C 2 T T = ( T − C 2 ) × U + C 2 T = ( C 2 / U − C 2 ) × U + C 2 C 2 / U = (2 − U ) U U – Utilization of I/O VCPU running PIBS T – Period of Main VCPU 13 / 25

  14. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Adaptive Mixed-Criticality (AMC) ◮ AMC tasks defined by: ◮ Period ( T i ), Deadline ( D i ) ◮ Vector of Capacities ( − → C i ) for each criticality level ◮ System operates in one of a set of criticality levels ◮ e.g., Criticality Level L ∈ { LO , HI } ◮ HI -criticality task, C i ( HI ) ≥ C i ( LO ) ◮ LO -criticality task, C i ( HI ) is undefined 14 / 25

  15. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Adaptive Mixed-Criticality (AMC) ◮ System starts in LO -criticality mode ◮ If a task uses its entire capacity and does not signal job completion, the system switches into HI -criticality mode ◮ Only HI -criticality tasks run in HI -criticality mode, using their C i ( HI ) capacity ◮ Allows extra capacity to finish HI -criticality jobs before their deadlines 15 / 25

  16. Introduction Scheduling Example Utilization AMC Results Conclusions Extra I/O-Adaptive Mixed-Criticality (IO-AMC) ◮ Extended AMC to include PIBS for I/O requests ◮ Response time (schedulability) analysis considers ◮ when tasks are in HI -criticality mode ◮ when tasks are in LO -criticality mode ◮ when tasks switch from LO - to HI -criticality mode ◮ added interference by PIBS C 1 = ( T − C 2 ) · U = ( T − UT ) · U 16 / 25

  17. Introduction Scheduling Example Utilization AMC Results Conclusions Extra I/O-Adaptive Mixed-Criticality (IO-AMC) ◮ We saw added execution time by a PIBS task is C 1 = ( T − C 2 ) · U = ( T − UT ) · U ◮ Added interference I q k by PIBS τ k assigned to SS τ q ... � t � I q k ( t ) = ( T q − T q U k ) U k + T q U k T q � t � = (1 − U k ) T q U k + T q U k T q � t � � � = 1 + − U k T q U k T q ◮ IO-AMC response time bound adds I q k for each PIBS τ k to system of Sporadic Servers 17 / 25

  18. Introduction Scheduling Example Utilization AMC Results Conclusions Extra I/O-Adaptive Mixed-Criticality (IO-AMC) ◮ For each PIBS τ k , have a vector of utilizations − − − → U k ( L ) for each criticality level L ◮ If τ k is a HI -crit PIBS then U k ( HI ) ≥ U k ( LO ) ◮ If τ k is a LO -crit PIBS then U k ( LO ) > U k ( HI ) ◮ Then I q k ( t , L ) is the interference by PIBS τ k assigned to SS τ q at time t in criticality level L 18 / 25

  19. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Quest Experiments Task C ( LO ) or U ( LO ) C ( HI ) or U ( HI ) T Camera Task ( HI -criticality) 23 ms 40 ms 100 ms CPU Task ( LO -criticality) 10 ms 1 ms 100 ms Bottom Half (PIBS) U ( LO ) = 1% U ( HI ) = 2% 100 ms Bottom Half (SS) 1 ms 2 ms 100 ms Task Set Parameters – Bottom Half handles Camera interrupts 19 / 25

  20. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Scheduling Overhead - One USB Camera 0.7 PIBS Sporadic Server 0.6 0.5 0.4 CPU % 0.3 0.2 0.1 0 0 20 40 60 80 100 120 140 160 180 Time (seconds) Quest on Intel Core i3-2100 @ 3.1KHz Camera – U ( LO ) = 1 % ( 1ms / 100ms ), U ( HI ) = 2 % ( 2ms / 100ms ) Scheduling overhead of SS-only scheme > SS+PIBS 20 / 25

  21. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Scheduling Overhead - Two USB Cameras 0.7 PIBS Sporadic Server 0.6 0.5 0.4 CPU % 0.3 0.2 0.1 0 0 20 40 60 80 100 120 140 160 180 Time (seconds) Camera 1 – U ( LO ) = 1 % ( 1ms / 100ms ), U ( HI ) = 2 % ( 2ms / 100ms ) Camera 2 – U ( LO ) = 2 % ( 2ms / 100ms ), U ( HI ) = 1 % ( 1ms / 100ms ) 21 / 25

  22. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Extra Interference Forcing a Mode Change HI-Criticalty Task (SS+PIBS) LO-Criticalty Task (SS+PIBS) HI-Criticalty (SS-Only) LO-Criticalty (SS-Only) Server Type 0 1 2 3 4 5 Job Completion Time (seconds) SS-only server for camera interrupts causes task on Main VCPU to deplete budget before job completion. Mode change with SS-Only causes LO -crit jobs to finish later. 22 / 25

  23. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Different Criticality Devices 7x10 6 Camera 1 6x10 6 Camera 2 Total Bytes Read 5x10 6 4x10 6 3x10 6 2x10 6 1x10 6 0 0 10 20 30 40 50 60 Time (seconds) ◮ Can assign criticality levels to devices to control bandwidth ◮ Mode change at 30 seconds ◮ Camera 1 – U ( LO ) = 0 . 1 %, U ( HI ) = 1 % ◮ Camera 2 – U ( LO ) = 1 %, U ( HI ) = 0 . 1 % 23 / 25

  24. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Conclusions and Future Work ◮ Added IO-AMC support to Quest RTOS ◮ Simulations (& analysis) show SS for both tasks & interrupt handlers is theoretically better than SS+PIBS ◮ Expts show PIBS for interrupt handling incurs lower practical costs ◮ Ability to assign criticality levels to devices ◮ Future work to consider more complex scenarios where blocking I/O delays impact task execution 24 / 25

  25. Introduction Scheduling Example Utilization AMC Results Conclusions Extra Scheduling Results 100 % Schedulable Task Sets 80 % 60 % 40 % AMC UB IO-AMC UB 20 % AMC-rtb IO-AMC-rtb 0 % 0 0.2 0.4 0.6 0.8 1 Utilization 500 random task sets per utilization [see paper]. Theoretical performance of IO-AMC-rtb slightly worse than AMC-rtb. This is due to the extra interference PIBS can cause compared to an equivalent Sporadic Server. 25 / 25

Recommend


More recommend