chapter 3: real-time scheduling and schedulability analysis albert m. k. cheng

9
Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Upload: pauline-patterson

Post on 19-Jan-2016

227 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Chapter 3: Real-Time Scheduling and Schedulability Analysis

Albert M. K. Cheng

Page 2: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Real-Time Scheduling Schedulers: compile-time, run-time Systems: uniprocessor, multiprocessor Characterization of a task:

c computation time (WCET)

s start (release or ready) time

d deadline (relative to start time)

p period or minimum separation

Page 3: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Optimal Scheduler One which may fail to meet the deadline of

task only if no other scheduler can Examples include uniprocessor earliest-

deadline-first (EDF) and least-laxity-first (LLF) schedulers for independent tasks with no synchronization constraints and no resource requirements

Page 4: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

EDF vs FIFO (non-real-time scheduler)Example: task s d c

1 0 5 3

2 0 12 4

3 0 10 4

ready queue: head 2, 3, 1 tail

FIFO schedule: 2, 3, 1 (task 1 misses deadline)

EDF schedule: 1, 3, 2 (all tasks meet deadlines)

Page 5: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Rate-Monotonic (RM) Scheduler:Basic Assumptions Compile-time/static Preemptive tasks No precedence constraints Negligible context-switching time Periodic tasks

Page 6: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Schedulability Test for RM Liu and Layland’s sufficient condition:

Utilization U = sum c_I / p_I

Number of tasks n

A task set is schedulable if

U <= n(2^(1/n) – 1)

Necessary and sufficient condition requires

checking inequalities or plot of W vs t

Page 7: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Sporadic Tasks Can be modeled by periodic tasks with

periods equal to the minimum separation Deferred server (DS) is less wasteful Tasks with critical sections (non-

preemptive) must be handled differently

Page 8: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Scheduling Tasks with Constraints Deterministic Rendezvous Model: tasks

with rendezvous (as in Ada) Kernelized Monitor Model: tasks with

critical sections Dataflow Model: tasks with precedence

and data flow constraints

Page 9: Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng

Multiprocessor Scheduling Scheduling game board representation:

shows a tasks’ statuses dynamically Non-optimality of uniprocessor-optimal

schedulers Need to consider special cases to improve

scheduling efficiency Need to avoid conflict-free task sets