Dynamic Soft Real Time Scheduling DSRT System - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Dynamic Soft Real Time Scheduling DSRT System

Description:

Determine the most suitable Service Class and Parameters. Avoid over/under reserve resources. ... Window Size (ws). Alpha ( ) Xi= Guaranteed Parameter in a ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 36
Provided by: deborahisr
Category:

less

Transcript and Presenter's Notes

Title: Dynamic Soft Real Time Scheduling DSRT System


1
Dynamic Soft Real Time Scheduling (DSRT) System
  • Klara Nahrstedt
  • cs589kn

2
Problem Statement
  • Multimedia applications need guaranteed and
    continuous processor time allocation.
  • A MPEG decoder running at 10 frames per second.
  • A game animation updating the movements of
    objects every 50ms.
  • Applications have Soft Deadlines.
  • Run on General Purpose OS.
  • Limitations I/O Interrupts, Layered memory
    subsystem, priority inversion, ...

3
DSRT Solution
  • Basic Features are insufficient.
  • Unique/Advanced Features
  • CPU Service Classes.
  • Probing Service.
  • Adaptive Service.
  • Advanced Reservations.
  • Security/Access Model.
  • Multiprocessor Support.
  • Distributed Monitoring Support.
  • Middleware Implementation.

4
DSRT Concepts
  • CPU Service Classes
  • Mapping CPU Service Classes into a Multiprocessor
    Partitioning Design
  • Execution Flow of a SRT Process

5
CPU Service Classes
6
Periodic Constant Processing Time Class
  • Example Usage Pattern

Peak Processing Time10ms Period 100ms
0
10
110
210
100
200
Time(ms)
7
Periodic Variable Processing Time Class
  • Example Usage Pattern

Period 100ms Peak Processing Time
30ms Sustainable Processing Time 15ms Burst
Tolerance 7ms
Time(ms)
8
Multiprocessor Partitioning Design
Guaranteed Part
Non-guaranteed Part
PCPT Processes
Reserved Run
Overrun
PVPT Processes
TS Processes
Burst
Reserved Run
Overrun
RT Scheduler
Overrun Scheduler
TS Scheduler
Processor 1
RT Partition
Overrun Partition
TS Partition
Processor 2
RT Partition
Overrun Partition
TS Partition
9
Execution Flow of a SRT Process
10
Smart Probing (1)
  • Goal Extract a reservation.
  • Determine the most suitable Service Class and
    Parameters.
  • Avoid over/under reserve resources.
  • Needed because
  • Processor usage is hardware platform dependent.
  • Processor usage is input dependent.

11
Smart Probing (2)
  • DSRT runs a few iterations of SRT applications
    without reservation.
  • DSRT monitors the usage iteration by iteration.
  • DSRT analyzes the usage history.

Estimate a Reservation
Processor Usage
Conformance Test ?
Iteration Number
12
Execution Flow of a DSRT Process
13
Conformance Test (1)
Processor Usage
Nonconformance
Conformance
Burst Tolerance
Reserved Usage
14
Conformance Test (2)
  • SSBTR System Specific Burst Tolerance Rate.

PVPT Class
PCPT Class
Processor Usage
Processor Usage
SPT(1SSBTR)BT
PPT(1SSBTR)
PPT(1SSBTR)
SPT Leak every P
PPT Leak every P
PPT Leak every P
15
Smart Probing (3)
  • Compute average processor usage 50ms
  • Compute peak processor usage 62ms.
  • Max Burst 12ms

50ms
40ms
62ms
43ms
55ms
50ms
50ms
50ms
50ms
50ms
16
Smart Probing (4)
  • SSBTR 10
  • Average Processor Usage SSBTR 5ms
  • If Max Burst lt 5ms
  • Constant Processing Time Class
  • else if Max Burst (12ms) gt 5ms,
  • Variable Processing Time Class
  • Sustainable Processing Time 50ms
  • Peak Processing Time 62ms
  • Burst Tolerance 12ms - 5ms 7ms

17
Execution Flow of a DSRT Process
18
Admission Control Test
  • Given a reservation request, determine
  • Resource Availability. (1) (2)
  • Processor Binding. (2)
  • Preemptive Earliest Deadline First

19
Execution Flow of a DSRT Process
Adjusted Contract
20
Partition Scheduling
Top-Level Scheduler
21
RT Partition Scheduler
Processor 1
Waiting Queue (Sorted with the earliest
released time)
p
(2a) finished one iteration
p
(3) released for next iteration
(1) admitted
p
Runnable Queue (Sorted with the earliest
deadline)
(2b) overrunning
Overrun Partition Queues
22
Overrun Partition Scheduler
23
Execution Flow of a DSRT Process
24
Adaptation
Scene 2
Scene 1
  • Adjust Reservation.
  • 3 Strategies
  • Exponential Average
  • Range
  • Statistical

Frame 275
25
Exponential Average Adaptation Strategy
  • Specification
  • Window Size (ws).
  • Alpha (?)
  • Xi Guaranteed Parameter in a reservation.
  • Xi-1 Actual Usage.

26
Statistical Adaptation Strategy
  • Specification
  • Window Size (ws).
  • Overrun Tolerance Frequency (f).
  • Example ws10, f20. Adjust X40ms.

27
Implementation Building Blocks
  • A Real Time Timer.
  • setiimer() in Solaris and Irix. Lots of Timers in
    NT.
  • Fixed Real Time Priority.
  • priocntl() in Solaris, sched_setscheduler() in
    Irix, setPriorityClass() in NT.
  • Processor Affinity.
  • processor_bind() in Solaris, sysmp(MP_MUSTRUN_PID)
    in Irix, and setProcessAffinityMask() in NT.

28
User-level Priority Dispatch
29
C APIs
  • CpuApi cpu
  • CpuReservation reservation
  • // Probing Phase
  • cpu.probe()
  • cpu.start()
  • for (int i0 iltnumProbeIterations i)
  • doJob()
  • cpu.yield()
  • cpu.stop()
  • cpu.probeEnd()
  • cpu.probeMatch(reservation)

// Reservation Phase cpu.reserve(reservation) cpu
.setAdaptStrategy(strategy) // Execution
Phase cpu.start() for () doJob() cpu.yield
() cpu.stop() cpu.free()
30
Experiment
  • Dual Processor Sun Ultra 2 Machine.
  • Solaris 2.6 Operating System.
  • Dispatch Latency 400us. Includes
  • Scheduling Algorithm.
  • Context Switches.
  • Various system calls.

31
Experiment Setup
  • Run 8 TS processes and 5 SRT processes
    concurrently.
  • TS1-6 Computational intensive programs.
  • TS7-8 Compilation programs.
  • SRT1 A MPEG player at 10 FPS.
  • Probing (PVPT class, P100ms,
  • SPT28ms, PPT40ms, BT11ms).
  • Adaptation Strategy (Statistical,
  • f 20, ws 20).

32
Experimental Setup (Cont.)
  • SRT2 A MPEG player at 20 FPS.
  • Probing (PVPT class, P50ms,
  • SPT14ms, PPT21ms, BT6ms)
  • SRT3 A sampling program.
  • Probing(PCPT class, P50ms,
  • PPT10ms)
  • SRT4 A Java RocksInSpace game.
  • (PCPT class, P100ms, PPT30ms).
  • SRT5 Misbehaving greedy program.
  • (PCPT class, P500ms, PPT10ms).

33
Experimental Result
SRT2 MPEG player with P50ms.
SRT1 MPEG player With P100ms
34
Experimental Result (Cont.)
SRT3 Sampling program with P50ms.
SRT4 Java game with P100ms.
35
Conclusion
  • Multimedia needs strong support from the OS via
    scheduling policies, differentiation policies and
    mechanisms
  • Soft real-time guarantees can be made using
    priority mechanisms, but in a careful manner
  • Changes can be made via middleware systems or
    directly inside of kernels, but there are
    trade-offs
Write a Comment
User Comments (0)
About PowerShow.com