0% found this document useful (0 votes)
9 views

Scheduling example

The document outlines the scheduling of three periodic tasks using two algorithms: EDF (Earliest Deadline First) and RM (Rate Monotonic). EDF is a dynamic scheduling method prioritizing tasks based on their deadlines, while RM is a static method prioritizing tasks based on their periods. A comparison reveals that EDF has higher CPU utilization and more frequent preemptions, making it suitable for soft real-time systems, whereas RM is better for hard real-time systems.

Uploaded by

arkhit
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Scheduling example

The document outlines the scheduling of three periodic tasks using two algorithms: EDF (Earliest Deadline First) and RM (Rate Monotonic). EDF is a dynamic scheduling method prioritizing tasks based on their deadlines, while RM is a static method prioritizing tasks based on their periods. A comparison reveals that EDF has higher CPU utilization and more frequent preemptions, making it suitable for soft real-time systems, whereas RM is better for hard real-time systems.

Uploaded by

arkhit
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

a) A system consists of three periodic tasks: (4, 1), (5, 2), and (8, 3).

Construct an EDF Schedule. b) Construct a RM Schedule for this system


in part (a). Compare the results.
Answer:
Given Tasks:
Each task is represented as (Period, Execution Time)
 T1 = (4, 1) → Period = 4, Execution Time = 1
 T2 = (5, 2) → Period = 5, Execution Time = 2
 T3 = (8, 3) → Period = 8, Execution Time = 3
a) EDF (Earliest Deadline First) Scheduling
EDF is a dynamic priority scheduling algorithm, where the task with the
earliest deadline gets the highest priority.

Tim Active
Task Selected
e Tasks

T1 (Earliest deadline
0 T1, T2, T3
at 4)

T2 (Earliest deadline
1 T2, T3
at 5)

T2 (Finishes at time
2 T2, T3
3)

3 T3 T3

4 T1, T3 T1 (T1 arrives again)

5 T3 T3

6 T3 T3

7 Idle Idle

8 T1, T2, T3 T1 (New cycle begins)

b) RM (Rate Monotonic) Scheduling


RM is a static priority scheduling algorithm, where the task with the
smallest period gets the highest priority. The priorities for tasks:
 T1 (Period = 4) → Highest Priority
 T2 (Period = 5) → Medium Priority
 T3 (Period = 8) → Lowest Priority
Tim Active Task
e Tasks Selected

0 T1, T2, T3 T1

1 T2, T3 T2

2 T2, T3 T2

3 T3 T3

4 T1, T3 T1

5 T3 T3

6 T3 T3

7 Idle Idle

8 T1, T2, T3 T1

Comparison of EDF vs RM

Comparison EDF (Earliest Deadline


RM (Rate Monotonic)
Factor First)

Dynamic (based on
Priority Fixed (based on periods)
deadlines)

CPU Utilization Higher Lower

Preemptions More frequent Less frequent

Good for soft real-time Good for hard real-time


Suitability
systems systems

EDF (Earliest Deadline First) Schedule

 'X' represents execution of a task.


 Task with the nearest deadline gets CPU time first.
RM (Rate Monotonic) Schedule

 'X' represents execution of a task.


 Tasks are scheduled based on fixed priority (shortest period first).

You might also like