Professional Documents
Culture Documents
(Ekansh Garg) RTS Assignment - EDF
(Ekansh Garg) RTS Assignment - EDF
Graded Assignment #1
Ekansh Garg(2020HS11509)
Title: Earliest Deadline First Algorithm (EDF)
Problem:
Implement Earliest Deadline First Algorithm (EDF)
Algorithm Details:
Earliest Deadline First (EDF) is a dynamic priority scheduling algorithm which is used in Real time Systems.
EDF is an optimal scheduling algorithm on pre-emptive uniprocessors.
EDF schedules independent jobs, each characterized by an arrival time, an execution requirement and a
deadline, in a way that all the jobs complete by their deadline.
Example:
Consider following example of 3 processes:
Executio Deadlin
Process Release Period n e
P1 0 4 1 4
P2 0 6 2 6
P3 0 8 3 8
Util Factor = 1/4 +2/6 +3/8 = 0.25 + 0.333 +0.375 = 0.95 = 95%
Util Factor is less than 100%. It is EDF Schedulable.
Execution of EDF:
Code Details:
Following code calculates the index of process which has minimum deadline:
Following code calculates the next deadline and keeps track of process execution:
Code Output of EDF Schedulable Processes:
Executio Deadlin
Process Release Period n e
P1 0 5 3 5
P2 0 7 3 7
P3 0 25 8 25