CS 414 - PowerPoint PPT Presentation

About This Presentation
Title:

CS 414

Description:

Title: PowerPoint Presentation Author: Nahrstedt, Klara Last modified by: klara Created Date: 1/1/1601 12:00:00 AM Document presentation format: On-screen Show (4:3) – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 29
Provided by: Nahr2
Category:
Tags: powerpoint

less

Transcript and Presenter's Notes

Title: CS 414


1
CS 414 Multimedia Systems Design Lecture 32
Process Management (Part 2)
  • Klara Nahrstedt
  • Spring 2011

2
Administrative
  • MLC application mi-clicker is published on the
    Android Market under MLC Edu App.
  • Check the class website for a document Getting
    Started with the mi-clicker!!!
  • Starting Monday, we will use the phones at the
    beginning of each class, so bring phones to the
    class.

3
Outline
  • EDF vs RMS
  • Dynamic Soft Real Time Scheduling
  • CPU service classes
  • Probing concept
  • Overrun- adaptation concept

4
Admission Control (for preemptive tasks)
  • Schedulability test for RMS
  • Schedulability test for EDF

5
Example
  • Consider the following preemptive RT tasks and
    their characteristics
  • T1 p1 50ms, e110ms
  • T2 p2 100ms, e220ms
  • T3 p3 200ms, e350ms
  • T4 p4 100ms, e420ms
  • Are these tasks schedulable via RMS?
  • If yes, what is the feasible schedule?
  • Are these tasks schedulable via EDF?
  • If yes, what is the feasible schedule?

6
DSRT (Dynamic Soft Real-Time Scheduling)
Example of a Multimedia CPU Scheduler
  • Multiple CPU Service Classes
  • Schedule real-time and not real-time tasks in an
    integrated fashion
  • Execution Flow of a SRT Process
  • Possible Mapping CPU Service Classes into a
    Multiprocessor Partitioning Design

Source Hao-hua Chu 1999
7
CPU Service Classes
Service Classes
Specification Parameters
Guaranteed
PCPT (Periodic Constant Processing Time)
P Period PPT Peak Processing Time
PPT
SPT
PVPT (Periodic Variable Processing Time)
P Period SPT Sustainable Processing Time PPT
Peak Processing Time BT Burst Tolerance
ACPU (Aperiodic Constant Processor Utilization)
PPU
PPU Peak Processor Utilization
Relative Deadline PPT Peak Processing Time
Event
PPT
8
Periodic Constant Processing Time Class
  • Example Usage Pattern

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

Period 100ms Peak Processing Time
30ms Sustainable Processing Time 15ms Burst
Tolerance 7ms
0
15
120
210
100
200
Time(ms)
Processing of IPBBPI frames
10
Execution Flow of a SRT Process
Execution Phase
Probing Phase
Reservation Phase
Scheduling
Probe
Admission Control
Extract Reservation
Monitor/ Conformance Test
Contract
Processor Binding
Adaptation
SRT Process
Adjusted Contract
11
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()
12
Smart Offline 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.

13
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
Iteration Number
14
Smart Probing (3)
  • Compute average processor usage 50ms
  • Compute peak processor usage 62ms.
  • Max Burst 12ms
  • It is Periodic Variable Processing Time (PVPT)

62ms
40ms
55ms
50ms
43ms
12ms
50ms
62ms
40ms
55ms
10ms
60ms
5ms
50ms
50ms
50ms
50ms
50ms
15
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
16
Admission Control Test
  • Given a reservation request, determine
  • Resource Availability. (1) (2)
  • Processor Binding. (2)
  • Preemptive Earliest Deadline First

17
Partition Scheduling
Top-Level Scheduler
Proportional Sharing
RT Scheduler
Overrun Scheduler
TS Scheduler
Multi-Level Round Robin Priority Queues
Kernel Scheduler
Preemptive EDF
Processor 1
RT Partition
Overrun Partition
TS Partition
Processor 2
RT Partition
Overrun Partition
TS Partition
18
RT Partition Scheduler
Processor 1
Waiting Queue (Sorted with the earliest
released time)
p
(2a) finished one iteration
(3) released for next iteration
p
(1) admitted
p
Runnable Queue (Sorted with the earliest
deadline)
(2b) overrunning
Overrun Partition Queues
19
Overrun Partition Scheduler
Highest Priority
Burst Queue (FIFO)
(2) Miss Deadline
p
(1a) Conformed?
Overrun Queue (FIFO)
(1b) Nonconformed?
p
Permanent Non-conforming Queue (FIFO)
(1c) Nonconformed frequently?
Lowest Priority
20
Adaptation
Scene 2
Scene 1
  • Adjust Reservation.
  • Adaptive Strategy
  • Exponential Average

Frame 275
21
Exponential Average Adaptation Strategy
X1
Xws
X2
X2ws
X3ws
Xws-1
...
X3
Xws1
...
...
Iteration Number
Adaptation Points
  • Specification
  • Window Size (ws).
  • Alpha (?)
  • Xi Guaranteed Parameter in a reservation.
  • Xi-1 Actual Usage.

22
User-level Priority Dispatch
Highest Priority
(5) Dispatched Process runs for T ms.
(4) Scheduler sleeps.
(3) Scheduler sets Timer for T ms.
Fixed RT Priority
DSRT Scheduler Process
N
(6) Timer interrupts Scheduler
Dispatched Process
N-1
.
.......
(2) Set Processor Affinity.
.......
Time Sharing Processes
.
(5) Decrease Priority
.
(1) Increase Priority.
.......
Dynamic TS Priority
.......
RT Process Pool
0
Lowest Priority
23
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).

24
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).

25
Experimental Result
SRT2 MPEG player with P50ms.
SRT1 MPEG player With P100ms
26
Experimental Result (Cont.)
SRT3 Sampling program with P50ms.
SRT4 Java game with P100ms.
27
Conclusion (Over-provisioning Approach)
  • Current Approach
  • To achieve throughput - overprovision of
    resources (fast processors, large disks, fast I/O
    bus, high-speed networks), and exclusive usage of
    resources
  • To achieve timing - overprovision CPU,
    exclusive usage of resources, application-depende
    nt scheduling

Current Thesis With over-provisioning we get
Quality of Service !!
28
Conclusion (Problems with Over-provisioning)
  • Violation of Timing Guarantees in Exclusive Case
    (head-of-line blocking)
  • Sensory and Video Data Processing/Transmission
  • Violation of Timing/Throughput Guarantees in
    Shared Case (greedy applications, flows)
  • UDP flows versus TCP Flows
  • Last Mile Problem (not everywhere is
    over-provisioning possible)
  • Telescopes, University Campus
  • Need support of QoS in OS towards multimedia tasks
Write a Comment
User Comments (0)
About PowerShow.com