chapter 4 – periodic task scheduling

18
Chapter 4 – Periodic Task Scheduling In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: – Time Line (Cyclic) – Rate Monotonic – Earliest Deadline First What is the landscape here? What causes the challenges?

Upload: signe-bowen

Post on 30-Dec-2015

80 views

Category:

Documents


2 download

DESCRIPTION

Chapter 4 – Periodic Task Scheduling. In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: Time Line (Cyclic) Rate Monotonic Earliest Deadline First. What is the landscape here? What causes the challenges?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 4 – Periodic Task Scheduling

Chapter 4 – Periodic Task Scheduling

In many real-time systems periodic tasks dominate the demand.

Three classic periodic task scheduling algorithms:

– Time Line (Cyclic)

– Rate Monotonic

– Earliest Deadline First

What is the landscape here?

What causes the challenges?

Page 2: Chapter 4 – Periodic Task Scheduling

Periodic Task Scheduling Notation

Ti denotes the period of task i

Ci denotes the Computation time for one instance of task i

Page 3: Chapter 4 – Periodic Task Scheduling

Periodic Task Scheduling Assumptions

Page 4: Chapter 4 – Periodic Task Scheduling

Additional Periodic Task Parameters

Page 5: Chapter 4 – Periodic Task Scheduling

Processor Utilization Factor - U

< 1 if set is scheduable

Let be the upper bound of the processor utilization factor for a set under a given algorithm A. When the set is said to fully utilize the processor.

1

Page 6: Chapter 4 – Periodic Task Scheduling

Time Line Scheduling (Cyclic Scheduling)

Time Line Scheduling (Off-line scheduling strategy)– Divide the time line into time slices for scheduling tasks, e.g. use the Greatest Common Divisor of the Task Periods as the time slice:

40 Hz

20 Hz

10 Hz

Schedulability is guaranteed if:

Time line scheduling is sensitive to changes in the task parameters.

Can time line scheduling also accommodate aperiodic tasks ?

Page 7: Chapter 4 – Periodic Task Scheduling

Rate Monotonic Scheduling

RM is optimal among all fixed Priority assignment schedules.

Why?

How can you how show that it must be optimal?

Which is clearly non-optimal

Page 8: Chapter 4 – Periodic Task Scheduling

Rate Monotonic – Calc of ULUB for Two Tasks

Let , the number of

Then the schedule produced by RM satisfies one of two conditions:

The critical time zone is

for Uub

Page 9: Chapter 4 – Periodic Task Scheduling

Earliest Deadline First

Proof: Assume U > 1 and the task set is schedulable. This leads to a contradiction:

Page 10: Chapter 4 – Periodic Task Scheduling

Example: Comparing RM to EDF

Since U > ln 2 = 0.69, Schedulability can’t be guaranteed using Rate Monotonic

Page 11: Chapter 4 – Periodic Task Scheduling

Homework #4 Lecture 5/1

1) Verify the schedulability under RM of the following task set:

  Ci Ti

1 4

2 6

3 8

2) Verify the schedulability under EDF, and then construct the corresponding schedule.

Due May 8

Page 12: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion Problems

Page 13: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion Problems

Page 14: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion Problems

Page 15: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion Problems

Page 16: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion Problems

• Priority Ceiling protocol:

– The priority ceiling PC(S) is the highest priority of all processes that may lock S.

– A task P that attempts to lock a semaphore will be suspended unless its priority is higher than PC(S) for all S currently locked by all tasks Q not= P.

– If P is suspended, then the task Q that holds the lock with the highest PC is considered to be blocking P. Q then inherits P’s priority.

Page 17: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion Problems

Page 18: Chapter 4 – Periodic Task Scheduling

Mutual Exclusion ProblemsAgain, using Priority Ceiling