0% found this document useful (0 votes)
73 views4 pages

CPSC-663: Real-Time Systems Common Scheduling Approaches

Common real-time scheduling approaches include clock-driven (time-driven) scheduling where decisions are made at predefined time instants, and priority-driven scheduling where decisions are made when jobs become available or the processor becomes idle based on priority. Effective timing constraints take precedence constraints into account to determine the earliest possible release time and latest feasible deadline for each job. The earliest deadline first (EDF) algorithm schedules the available job with the earliest deadline at any time and is optimal for preemptive single processor scheduling if a feasible schedule exists. However, EDF is not always optimal when preemption is not allowed or for multiprocessor scheduling.

Uploaded by

Joshua Duffy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views4 pages

CPSC-663: Real-Time Systems Common Scheduling Approaches

Common real-time scheduling approaches include clock-driven (time-driven) scheduling where decisions are made at predefined time instants, and priority-driven scheduling where decisions are made when jobs become available or the processor becomes idle based on priority. Effective timing constraints take precedence constraints into account to determine the earliest possible release time and latest feasible deadline for each job. The earliest deadline first (EDF) algorithm schedules the available job with the earliest deadline at any time and is optimal for preemptive single processor scheduling if a feasible schedule exists. However, EDF is not always optimal when preemption is not allowed or for multiprocessor scheduling.

Uploaded by

Joshua Duffy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CPSC-663: Real-Time Systems

Common Scheduling Approaches

Common Approaches to Real-Time Scheduling


Clock-driven (time-driven) schedulers Scheduling decisions are made at specific time instants, which are typically chosen a priori. Priority-driven schedulers Scheduling decisions are made when particular events in the system occur, e.g. a job becomes available processor becomes idle Work-conserving: processor is busy whenever there is work to be done.

Clock-Driven (Time-Driven) -- Overview


Scheduling decision time: point in time when scheduler decides which job to execute next.

Scheduling decision time in clock-driven schedulers is defined a priori. For example: Scheduler periodically wakes up and generates a portion of the schedule.
scheduler job

A B

Special case: When job parameters are known a priori, schedule can be precomputed off-line, and stored as a table (table-driven schedulers).

CPSC-663: Real-Time Systems

Common Scheduling Approaches

Priority-Driven -- Overview
Basic rule: Never leave processor idle when there is work to be done. (such schedulers are also called work conserving) Based on list-driven, greedy scheduling. Examples: FIFO, LIFO, SET, LET, EDF. Possible implementation of preemptive priority-driven scheduling: Assign priorities to jobs. Scheduling decisions are made when Job becomes ready Processor becomes idle Priorities of jobs change At each scheduling decision time, chose ready task with highest priority. In non-preemptive case, scheduling decisions are made only when processor becomes idle.

Example: Priority-Driven Non-Preemptive Schedules


Proc1 J1 Proc2
J1 :1 J2 :2 J5 :3 J8 :3 J6 :2 J7 :1 J3 :1 J4 :1
J5 J2 J3 J8 J6 J4 J7

L = ( J1 , J2 , J3 , J4 , J5 , J6 , J7 , J8 ) Proc1 Proc2
J5 J8 J1 J2 J3 J6 J4 J7

LET = (J5 , J8 , J2 , J6 , J1 , J3 , J4 , J7 ) Proc1 Proc2 J1


J8 J2 J6 J5 J7 J3 J4

L = ( J8 , J1 , J2 , J3 , J4 , J5 , J6 , J7 )

CPSC-663: Real-Time Systems

Common Scheduling Approaches

Effective Timing Constraints


Timing constraints often inconsistent with precedence constraints. Example: d 1 > d 2 , but J1 < J2 Effective timing constraints on single processor: Effective release time: Effective deadline:

ri eff := max ri , r j eff J j < J i d i eff


eff j i

( { := min (d , {d

Ji

}) < J })
j

Theorem:

A set of Jobs J can be feasibly scheduled on a processor if and only if it can be feasibly scheduled to meet all effective release times and deadlines.

Interlude: The EDF Algorithm


The EDF (earliest-deadline-first) algorithm: At any time, execute that available job with the earliest deadline. Theorem: (Optimality of EDF) In a system one processor and with preemptions allowed, EDF can produce a feasible schedule of a job set J with arbitrary release times and deadlines iff such a schedule exists.

Proof: by schedule transformation.

CPSC-663: Real-Time Systems

Common Scheduling Approaches

EDF Not Always Optimal


Case 1: When preemption is not allowed: ri J1 J2 J3 = ( = ( = ( di ei ) ) )

0, 10 , 3 2, 14 , 6 4, 12 , 4

Case 1: On more than one processor:

J1 J2 J3

= ( = ( = (

ri 0, 0, 0,

d i ei 4, 1 4, 1 5, 5

) ) )

You might also like