applying fppt to aeh in the rtsj

14
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 r max Applying FPPT to AEH in the RTSJ Conclusions

Upload: alaula

Post on 02-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Applying FPPT to AEH in the RTSJ

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

Page 2: Applying FPPT to AEH in the RTSJ

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

Page 3: Applying FPPT to AEH in the RTSJ

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

Page 4: Applying FPPT to AEH in the RTSJ

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.

4

Page 5: Applying FPPT to AEH in the RTSJ

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.

Page 6: Applying FPPT to AEH in the RTSJ

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

Page 7: Applying FPPT to AEH in the RTSJ

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

Page 8: Applying FPPT to AEH in the RTSJ

8

Schedulability Analysis for FPPT

Page 9: Applying FPPT to AEH in the RTSJ

9

Preemption Threshold Assignment

FPPT

FPP

FPNP

rmin rmax

1 2

3

4

5 6

Page 10: Applying FPPT to AEH in the RTSJ

10

Finding rmax

rmin

rmax

1

2

Page 11: Applying FPPT to AEH in the RTSJ

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

Page 12: Applying FPPT to AEH in the RTSJ

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

Page 13: Applying FPPT to AEH in the RTSJ

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

Page 14: Applying FPPT to AEH in the RTSJ

14

Thank youQ & A