46
The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Embed Size (px)

Citation preview

Page 1: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

The Design and Performance of A Real-Time CORBA Scheduling Service

Christopher Gill, David Levine, Douglas Schmidt

Page 2: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Overview of Paper

1. Documentation of progression from static to dynamic scheduling for avionics applications with deterministic Real-Time requirements.

2. Flexible scheduling service framework in real-time CORBA implementation(TAO), which efficiently supports core scheduling strategies like RMS, EDF,MLF, and MUF.

3. Results from simulations and empirical benchmarks that quantify the behavior of these scheduling strategies and assess the overhead of dynamic scheduling in TAO

Page 3: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Progression from static to dynamic scheduling for avionics applications Design and implementation challenges for real-time application design for avionic systems1. Scheduling assurance prior to run-time2. Severe resource limitation3. Distributed processing4. Testability5. Adaptability across product families6. Statistical real-time requirement

- Built-in-test- Low priority display queues

7. Deterministic Real time requirements - Mission computing task- Weapon release-Navigations

Page 4: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Assumptions1. Bounded Executions: Operations stay within the limits of their advertised execution times2. Bounded rates: dispatch requests will arrive within the advertised period and quantity values3. Known operations: all operations are known to the scheduler before run-time are reflected entirely within the execution times of other advertised operations

Page 5: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Overview of Scheduling Strategies

Static Scheduling: 1. RMS(rate monotonic scheduling) -parameter: rate=inverse of period -schedulable bound=

Purely Dynamic Scheduling1. EDF(earliest deadline first) -parameter used is time to deadline=deadline – current_time -Limitation: operation is dispatched whether or not there is sufficient time

for it to complete before deadline i.e. no detection of operations that are going to miss deadline until actual deadline.2. MLF(Minimum Laxity First) -Laxity=(deadline - current_time) - execution time

Page 6: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Static Scheduling

Advantage: 1. Less Overhead at run timeLimitations: 1. Inefficient handling of non-periodic processing 2. Utilization phasing penalty for non-harmonic periods 3. Inflexible handling of invocation-to-invocation variation in resource requirement

Dynamic SchedulingAdvantages: 1. no resource utilization penalty for non-harmonic operations. 2. flexibility in dealing with invocation-to-invocation variations in resource utilization 3. hence, full resource utilization bound(100%) 4. handle harmonic and non-harmonic periods comparably. 5. single priority level and need not prioritize operations by rateLimitations: 1. Higher overload 2. No control over which operation will miss deadline in overloaded condition i.e. if scheduling bound is exceeded. 3. Risk of missing deadline increases for every operation as system become overloaded.

Page 7: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 8: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Hybrid Scheduling(static/dynami)MUF(maximum urgency first):

Criteria: Urgency

Static Priority (criticality):1. high static priority for critical and low for non-critical operation.

Dynamic SubPriority: 1. evaluated whenever operation is en-queued or de-queued from dynamic queue.2. dynamic sub-priority is function of laxity e.g. inverse of laxity.3. laxity= (deadline – current_time) – execution time3. So priority ordering based on laxity value is as follows: low positive>high positive>high negative(farther from zero)>low negative (closer to zero)4. behaves as MLF if static priority/criticality is same for all operations. Static SubPriority(Importance):

Page 9: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Advantages of MUF

1. supports both deterministic rigor of static scheduling and flexibility of dynamic scheduling

2. inherits advantages of dynamic scheduling e.g. no phasing penalty, higher utilization, flexible handling of invocation-to-invocation variations in resource utilizations

3. allows deadline failures to be detected before they actually occur.(exception: operation is preempted by higher critical operation)

4. error handling policies: e.g. possible deadline failure operations can be demoted in priority queue allowing operations that can still meet their deadlines to be dispatched instead

Page 10: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

TAO’s Strategized Scheduling Service Framework

Page 11: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Design goals:1. Higher utilization than static scheduling2. Preserve scheduling guarantee:

- to ensure that critical CORBA operations will meet their deadlines even when total utilization exceeds schedulable bound3. Flexibility in invocation-to-invocation variations in resource utilization 4 Adaptive scheduling to increase system’s flexibility to adopt to varying application requirements and platform features. This can be achieved by

1. allowing applications to provide criticality and importance values for at operation level

2. decoupling the strategy for priority assignment from dispatching model so the two can be varied independently i.e. decoupling input and output interfaces of scheduling service

3. shielding the application developer from unnecessary details of alternative scheduling strategies.

4. allowing to implement various strategies like RMS, EDF, MLF, MUF etc. using the same consistent input interface.

Page 12: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Design Goals

Page 13: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Processing Steps in TAO’s Scheduling Service Architecture

Page 14: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Step 2: Populate RT_Infor through Input Interface

Page 15: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Processing Steps in TAO’s Scheduling Service Architecture

Page 16: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Step 3: Assess schedulabilty

• Critical Set: all operations whose completion prior to deadline is important for the integrity of the application

• Minimum critical priority: Lowest priority of any operation in critical set

• Criteria: All the operations with priority above or equal to minimum critical priority are guaranteed to meet their deadline.

Page 17: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Processing Steps in TAO’s Scheduling Service Architecture

Page 18: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

EDF MLFStep 4: input mapping to urgency

Page 19: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

MUF RMSStep 4: input mapping to urgency

Page 20: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Processing Steps in TAO’s Scheduling Service Architecture

Page 21: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Scheduling server Dispatching module

Page 22: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Step 5: output mapping to dispatching (sub)priority

Page 23: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 24: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Step 7-10: On-line processing

• At Run-Time Start-Up– Scheduling server’s run time component supplies dispatching queue

configuration to ORB end-system through output interface– Accordingly ORB configures dispatching module and queues.

• When operation request arrives at run time– Dispatching module identifies appropriate queue to which operation

belongs– To above accomplish above, it request dispatching (sub)priority

information from scheduling server’s run time component using it’s output interface

– If queue type is dynamic(deadline/laxity), it update dynamic portion of dispatching sub-priority

– Above step is performed when first time operation is en-queued and if necessary when other operations are en-queued/de-queued

Page 25: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Output Interface

Page 26: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 27: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Processing Steps in TAO’s Scheduling Service Architecture

Page 28: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 29: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Scheduling server Dispatching module

Page 30: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Step 5: output mapping to dispatching (sub)priority

Page 31: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 32: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Simulation Part I

Page 33: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Simulation Design1. Critical instant behavior for critical set in overload condition2. Comparing RMS, EDF, MLF, MUF.3. Preemptive by urgency4. Period=deadline5. Same worst case execution time

Page 34: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Avg Latency

Page 35: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Avg Laxity

Page 36: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

fraction of deadlines missed

Page 37: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Simulation Part II

Page 38: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

SIMULATION part IIGoal is to check:1. Run-time overhead for dynamic scheduling2. OS dispatch latency

Latency in event delivery between high priority supplier and consumers consists of3. Time required for run time TAO scheduler to satisfy event service

dispatch module scheduling request plus2. Time the request spent en-queued in dispatching module

Page 39: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Simulation 2.1:1. RMS and MUF2. High priority supplier and consumer paced such that one is dequeued

before another is enqueued. So no queueing effect on high priority operations

3. Low priority consumer load is increased to check it’s effect on high priority operations

Simulation 2.2:4. Random pacing/entry of operations. So queuing effect is present5. Queues tested in isolation from TAO’s scheduling server6. static, deadline, laxity type queues7. Linked list for queues[O(1) for dequeue, O(n) for enqueue]

Page 40: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Processing Steps in TAO’s Scheduling Service Architecture

Page 41: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Simulation 2.1 and 2.2

Page 42: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 43: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 44: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt
Page 45: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Conclusions from Simulations

MUF: MUF provides both deterministic and statistical real time requirement necessary for avionic applications and performs better than pure static and pure dynamic scheduling

Minimal end-to-end overhead: The minimal end-to-end overhead for dynamic scheduling strategies is comparable to that for static scheduling strategies, with only a small increase due to dynamic priority computations.

Range of acceptable performance: The range of acceptableperformance is sustained for dynamic scheduling strategies,up to a load of 150 messages enqueued at one time.

Alternate Queuing Impmentation:TAO’s strategized scheduling service and dispatching modules can adapt flexibly to alternative queueing implementations, so that for heavier loads, heap-based queues may be preferable

Page 46: The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt

Thank you