1 / 14

Applying FPPT to AEH in the RTSJ

Applying FPPT to AEH in the RTSJ. ▶ AEH in the RTSJ ▶ AEH Implementations ▶ Critical Sequences in the Dynamic 1:N mapping ▶ Schedulability Analysis for FPPT ▶ Preemption Threshold Assignment ▶ Finding r max ▶ Applying FPPT to AEH in the RTSJ

alaula
Download Presentation

Applying FPPT to AEH in the RTSJ

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. Applying FPPT to AEH in the RTSJ ▶ AEH in the RTSJ ▶ AEH Implementations ▶ Critical Sequences in the Dynamic 1:N mapping ▶ Schedulability Analysis for FPPT ▶ Preemption Threshold Assignment ▶ Finding rmax ▶ Applying FPPT to AEH in the RTSJ ▶ Conclusions

  2. AEH in the RTSJ • The driving design goal of AEH is to have a lightweight concurrency mechanism • Handlers should not incur the same overhead as real-time threads do • The lightweightness requirement can only be achieved by minimising the number of server threads

  3. AEH Implementations • 1:1 Mapping Model - Static: bound asynchronous event handlers and OVM - Dynamic: jRate • 1:N Mapping Model - Static: Jamaics - Dynamic: Java RTS 2.0

  4. Critical Sequences in the Dynamic 1:N Mapping • In a fixed priority system where every handler may self-suspend (Blocking Handlers), a critical sequence of handler releases for a set of handlers occurs when • a handler is released after or at the release time of a previous handler, and • before or during the self-suspension of the previous handler, that is, ri is in the range [rj , rj + ssj ] exclusively, for every handler in the set. • Where ri denote the release and the execution time of a handler i and the greater the value i, the higher the priority. ssi denotes the finishing time of the self-suspension of handler i.

  5. Critical Sequences in the Dynamic 1:N Mapping • In a fixed priority system where handlers do not self-suspend (Non-Blocking Handlers), a critical sequence of the handler releases occurs when • handlers are released in a priority-ascending manner in turn and • one is released in the middle of a previously released handler being executed, that is, ri is in the range [ri-1, ri-1 + ssi-1] exclusively, for every handler in a set.

  6. Critical Sequences in the Dynamic 1:N mapping Based on the critical sequences • For Blocking Handlers - Used by the Blocking AEH model: - The required number of server threads is dependent on the number of released handlers • For Non-Blocking Handlers - Used by the non-blocking AEH model: - The required number of server threads is dependent on the number of priority levels

  7. Fixed-Priority Preemptive Scheduling with Preemption Threshold • Is primarily introduced to feasibly schedule a task set unschedulable either by FPP or FPNP (3-6% improvement) • Assigns two priority levels to each task, a regular priority and a preemption threshold • The regular priority of a task is used when the task is queued, but when the task gets the CPU its active priority is raised to its preemption threshold • Effectively reduces the number of active priority levels, by allowing a task not to be preempted by a higher regular priority task up to its preemption threshold • Note that, FPPT’s schedulability improvement comes at the expense of the increased worst-case response time of higher priority tasks

  8. Schedulability Analysis for FPPT

  9. Preemption Threshold Assignment 1 2 3 rmax rmin 4 FPP FPPT FPNP 6 5

  10. Finding rmax 1 2 rmin rmax

  11. A Simple Example • An unschedulable task set with 8 tasks such that t8 = (1, 10), t7 = (1, 15), t6 = (4, 40), t5 = (10, 60), t4 = (20, 80), t3 = (15, 100), t2 = (10, 200), t1 = (16, 240) as w1 = 293 However, it is schedulable with rmin and rmax. ▪ rmin = {8,7,6,5,4,4,4,2} schedulable with 6 servers ▪ rmax = {8,8,8,7,6,6,7,6} schedulable with 3 servers

  12. Applying FPPT to AEH • The non-blocking AEH model has been extended to support FPPT • The ImportanceParameters class is used to denote the preemption threshold of a handler • A server thread in the model now raises its priority to the preemption threshold of the current handler when it gets the CPU • This hides the use of importance value from the base priority-scheduler in order for existing mechanisms to work correctly with the scheduler

  13. Conclusions • In order to achieve the lightweight requirement of AEH in the RTSJ, the critical sequences of the dynamic 1:N mapping are derived • Based on the critical sequences for non-blocking handlers, it is shown that the number of server threads required is dependent on the number of active priority levels in the system • FPPT is discussed to reduce the number of effective priority levels for non-blocking handlers • FPPT is applied to the non-blocking AEH implementation to further reduce the number of server threads • This allows AEH to further reduce the number of server threads required to be smaller than that of the priority levels even in the worst case • This enables the lightweight requirement can be better achieved for AEH in the RTSJ

  14. Thank youQ & A

More Related