SlideShare a Scribd company logo
1 of 27
S T A T I C A S S U M P T I O N
F I X E D P R I O R I T Y V E R S U S D Y N A M I C P R I O R I T Y A L G O R I T H M
M A X I M U M S C H E D U L A B L E U T I L I Z A T I O N
O P T I M A L I T Y O F R M A N D D M A L G O R I T H M S
S C H E D U L A B I L I T Y T E S T F O R F I X E D P R I O R I T Y T A S K S
S U F F I C I E N T S C H E D U L A B I L I T Y C O N D I T I O N F O R T H E R M
A N D D M A L G O R I T H M S
P R A C T I C A L F A C T O R
Priority Driven Scheduling of
Periodic Tasks
Example showing poor performance:
 Consider m+1 independent tasks.
 First m tasks Ti=(1,2ε) and last task=(1+ε,1) where ε
is a very small number.
 We will schedule them in the m processors.
 Priorities are assign on EDF basis.
 The first job Jm+1,1 in Tm+1 has the lowest priority
because it has the latest deadline.
 Jm+1,1 does not complete until 1+2ε and hence
misses its deadline.
 Total utilization = m (2 ε/1) + 1/(1+ ε)= 2m ε/1 +
1/(1+ ε) = 2mε +1/(1+ ε).
 In the limit as ε approaches zero, U approaches 1,
and yet the system remains unschedulable.
 As long as the total utilization of the first m tasks,
2mε, is equal to or less than 1, this system can be
feasibly scheduled statically on two processors.
 If we put Tm+1 on one processor and the other tasks
on the other processor and schedule the task(s) on
each processor according to either of these priority-
driven algorithms we will get feasible schedule.
Fixed Priority vs. Dynamic Priority Algorithms
 Priority-driven algorithms differ from each other in
how priorities are assigned to jobs.
 We classify algorithms for scheduling periodic tasks
into two types:
 Fixed priority and
 Dynamic priority.
 A fixed-priority algorithm assigns the same priority
to all the jobs in each task.
 In other words, the priority of each periodic task is
fixed relative to other tasks.
 Dynamic-priority algorithm assigns different
priorities to the individual jobs in each task.
 The priority of the task with respect to that of the
other tasks changes as jobs are released and
completed.
 Indeed, we have three categories of algorithms:
 Fixed-priority algorithms: Rate Monotonic (RM), Deadline
Monotonic (DM).
 Task-level dynamic-priority (and job level fixed-priority)
algorithms: EDF, FIFO, LIFO
 Job-level (and task-level) dynamic algorithms: LST
 We assume dynamic means task level dynamic and
job level fixed unless otherwise stated.
Rate Monotonic Algorithm
 The rate (of job releases) of a task = 1/period.
 The higher its rate, the higher the priority of the task.
 In other word smaller the period higher the priority
of the task.
Deadline Monotonic Algorithm
 Well known fixed priority algorithm.
 The shorter its relative deadline, the higher the
priority of the task.
 Example:
 T1 = (50,50,25,100); T2 = (0,62.5,10,20);
 T3 = (0,125,25,50)
 u1 = 0.5; u2 = 0.16; u3 = 0.2
 U = 0.86; H = 250.
 When relative deadline of every job is proportional to
its period both RM and DM algorithms are identical.
 When relative deadlines are arbitrary, DM algorithm
performs better than RM.
 We can see DM produce the feasible schedule even
when RM fails.
EDF Algorithm
 The earlier its absolute deadline ,the higher the
priority of the job.
LST Algorithm
 It assigns the priorities to individual jobs in the tasks
according to the slack time.
 At time t, the slack of a job whose remaining
execution time is e and deadline is d is equal to the
d-e-t.
 The scheduler checks the slacks of all the ready jobs
each time a new job is released and orders the jobs
on the basis of their slacks.
 Smaller the slack higher the priority.
 Example T1=(2,1) and
T2=(5,2.5)
 At time t=0
 Slack for T1=2-1-0=1
 Slack for T2=5-2.5-0=2.5
 At time t=2
 T1=4-1-2=1
 T2=5-1.5-2=1.5
 At time t=4
 T1=6-1-4=1
 T2=5-0.5-4=0.5
 At time t=5
 T1=6-0.5-5=0.5
 T2=10-2.5-5=2.5
 At time t=6
 T1=8-1-6=1
 T2=10-2-6=2
 At time =8
 T1=10-1-8=1
 T2=10-1-8=1
Time Ready Running
0 J1,1 J2,1 J1,1
1 J2,1 J2,1
2 J1,2 J2,1 J1,2
3 J2,1 J2,1
4 J1,3 J2,1 J2,1
4.5 J1,3 J1,3
5 J1,3 J2,2 J1,3
Time Ready Running
5.5 J2,2 J2,2
6 J1,4 J2,2 J1,4
7 J2,2 J2,2
8 J1,5 J2,2 J1,5
9 J2,2 J2,2
 If decisions are made only at the time when the jobs
are released or completed, it does not follow the LST
rule all the time then it is called non restrict LST
algorithm.
 If the scheduler were to follow the LST rule strictly, it
would have to monitor the slacks of all ready jobs
and compare them with slack of executing job.
 It would reassign priorities to jobs whenever their
slacks change relative to each other.
 From above example: At time t=2.6
 Slack time for T1=4-0.4-2.6=1
 Slack time for T2=5-1.5-2.6=0.9
 The runtime overhead of the strict LST algorithm
includes the time required to monitor and compare
the slack of all ready jobs as the time progress.
Maximum Schedulable Utilization
 A system is schedulable by an algorithm if the
algorithm always produces a feasible schedule of the
system.
Schedulable Utilization of the EDF Algorithm
 A system T of independent, preemptable tasks with
relative deadlines equal to their respective periods
can be feasibly scheduled on one processor if and
only if its total utilization is equal to or less than 1.
 When the relative deadlines of some tasks are less
than their period, the system may not be feasible,
even when its total utilization is less than 1.
 For example : for task T1=(2,0.9),T2=(5, 2.3) is
feasible but it would not be schedulable if its relative
deadlines were 3 instead of 5.
 The ratio of the execution time ek of a task Tk to the
minimum of its relative deadline Dk and period pk is
the density dk of the task.
 In other words, the density of Tk is ek/min(Dk , pk).
 The sum of the densities of all tasks in a system is
the density of the system and is denoted by ∆ when
Di < pi for some task Ti , ∆ > U.
 If the density of a system is larger than 1, the system
may not be feasible.
 Example: T1=(2,0.9); T2=(5,2.3,3);
 ∆ = 0.9/2+2.3/3 = 7.3/6 > 1, not feasible.
 So the tasks are not schedulable by any algorithm.
 Any system is feasible if its density is equal to or less
than 1.

More Related Content

What's hot

Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
Himanshu Ghetia
 

What's hot (20)

Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Real time operating systems (rtos) concepts 5
Real time operating systems (rtos) concepts 5Real time operating systems (rtos) concepts 5
Real time operating systems (rtos) concepts 5
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CS
 
Hard versus Soft real time system
Hard versus Soft real time systemHard versus Soft real time system
Hard versus Soft real time system
 
Real time-system
Real time-systemReal time-system
Real time-system
 
Frame Relay
Frame RelayFrame Relay
Frame Relay
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
 
Vector clock algorithm
Vector clock algorithmVector clock algorithm
Vector clock algorithm
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systems
 
Evaluation of computer performance
Evaluation of computer performanceEvaluation of computer performance
Evaluation of computer performance
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Real time system tsp
Real time system tspReal time system tsp
Real time system tsp
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 

Similar to Priority driven scheduling of periodic tasks

Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
Sri Prasanna
 
Scheduling 155 © David Lippman Creative Commons BY-SA.docx
Scheduling   155 © David Lippman  Creative Commons BY-SA.docxScheduling   155 © David Lippman  Creative Commons BY-SA.docx
Scheduling 155 © David Lippman Creative Commons BY-SA.docx
durantheseldine
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptx
naghamallella
 
CTM - 06 - PERT - Time Computations.pptx
CTM - 06 - PERT - Time Computations.pptxCTM - 06 - PERT - Time Computations.pptx
CTM - 06 - PERT - Time Computations.pptx
RaoAnkitYadav1
 
Lecture 2 data structures & algorithms - sorting techniques
Lecture 2  data structures & algorithms - sorting techniquesLecture 2  data structures & algorithms - sorting techniques
Lecture 2 data structures & algorithms - sorting techniques
Dharmendra Prasad
 
Lec03 04-time complexity
Lec03 04-time complexityLec03 04-time complexity
Lec03 04-time complexity
Abbas Ali
 
Performance analysis and randamized agoritham
Performance analysis and randamized agorithamPerformance analysis and randamized agoritham
Performance analysis and randamized agoritham
lilyMalar1
 
Tri Merge Sorting Algorithm
Tri Merge Sorting AlgorithmTri Merge Sorting Algorithm
Tri Merge Sorting Algorithm
Ashim Sikder
 

Similar to Priority driven scheduling of periodic tasks (20)

TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
 
Scheduling algorithm in real time system
Scheduling algorithm in real time systemScheduling algorithm in real time system
Scheduling algorithm in real time system
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
 
Scheduling 155 © David Lippman Creative Commons BY-SA.docx
Scheduling   155 © David Lippman  Creative Commons BY-SA.docxScheduling   155 © David Lippman  Creative Commons BY-SA.docx
Scheduling 155 © David Lippman Creative Commons BY-SA.docx
 
Flowshop scheduling
Flowshop schedulingFlowshop scheduling
Flowshop scheduling
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptx
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
 
CTM - 06 - PERT - Time Computations.pptx
CTM - 06 - PERT - Time Computations.pptxCTM - 06 - PERT - Time Computations.pptx
CTM - 06 - PERT - Time Computations.pptx
 
Lecture 2 data structures & algorithms - sorting techniques
Lecture 2  data structures & algorithms - sorting techniquesLecture 2  data structures & algorithms - sorting techniques
Lecture 2 data structures & algorithms - sorting techniques
 
Rate.docx
Rate.docxRate.docx
Rate.docx
 
Lec03 04-time complexity
Lec03 04-time complexityLec03 04-time complexity
Lec03 04-time complexity
 
algorithmanalysis and effciency.pptx
algorithmanalysis and effciency.pptxalgorithmanalysis and effciency.pptx
algorithmanalysis and effciency.pptx
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf
 
Data Structures Notes
Data Structures NotesData Structures Notes
Data Structures Notes
 
time_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdftime_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdf
 
Performance analysis and randamized agoritham
Performance analysis and randamized agorithamPerformance analysis and randamized agoritham
Performance analysis and randamized agoritham
 
Measuring algorithm performance
Measuring algorithm performanceMeasuring algorithm performance
Measuring algorithm performance
 
Tri Merge Sorting Algorithm
Tri Merge Sorting AlgorithmTri Merge Sorting Algorithm
Tri Merge Sorting Algorithm
 

More from Kamal Acharya

More from Kamal Acharya (20)

Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
 
Computer Arithmetic
Computer ArithmeticComputer Arithmetic
Computer Arithmetic
 
Introduction to Computer Security
Introduction to Computer SecurityIntroduction to Computer Security
Introduction to Computer Security
 
Session and Cookies
Session and CookiesSession and Cookies
Session and Cookies
 
Functions in php
Functions in phpFunctions in php
Functions in php
 
Web forms in php
Web forms in phpWeb forms in php
Web forms in php
 
Making decision and repeating in PHP
Making decision and repeating  in PHPMaking decision and repeating  in PHP
Making decision and repeating in PHP
 
Working with arrays in php
Working with arrays in phpWorking with arrays in php
Working with arrays in php
 
Text and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHPText and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Capacity Planning of Data Warehousing
Capacity Planning of Data WarehousingCapacity Planning of Data Warehousing
Capacity Planning of Data Warehousing
 
Data Warehousing
Data WarehousingData Warehousing
Data Warehousing
 
Search Engines
Search EnginesSearch Engines
Search Engines
 
Web Mining
Web MiningWeb Mining
Web Mining
 
Information Privacy and Data Mining
Information Privacy and Data MiningInformation Privacy and Data Mining
Information Privacy and Data Mining
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
 
Association Analysis in Data Mining
Association Analysis in Data MiningAssociation Analysis in Data Mining
Association Analysis in Data Mining
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 
Introduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data WarehousingIntroduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data Warehousing
 

Recently uploaded

Recently uploaded (20)

dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 

Priority driven scheduling of periodic tasks

  • 1. S T A T I C A S S U M P T I O N F I X E D P R I O R I T Y V E R S U S D Y N A M I C P R I O R I T Y A L G O R I T H M M A X I M U M S C H E D U L A B L E U T I L I Z A T I O N O P T I M A L I T Y O F R M A N D D M A L G O R I T H M S S C H E D U L A B I L I T Y T E S T F O R F I X E D P R I O R I T Y T A S K S S U F F I C I E N T S C H E D U L A B I L I T Y C O N D I T I O N F O R T H E R M A N D D M A L G O R I T H M S P R A C T I C A L F A C T O R Priority Driven Scheduling of Periodic Tasks
  • 2.
  • 3.
  • 4.
  • 5. Example showing poor performance:  Consider m+1 independent tasks.  First m tasks Ti=(1,2ε) and last task=(1+ε,1) where ε is a very small number.  We will schedule them in the m processors.  Priorities are assign on EDF basis.
  • 6.
  • 7.  The first job Jm+1,1 in Tm+1 has the lowest priority because it has the latest deadline.  Jm+1,1 does not complete until 1+2ε and hence misses its deadline.  Total utilization = m (2 ε/1) + 1/(1+ ε)= 2m ε/1 + 1/(1+ ε) = 2mε +1/(1+ ε).  In the limit as ε approaches zero, U approaches 1, and yet the system remains unschedulable.
  • 8.  As long as the total utilization of the first m tasks, 2mε, is equal to or less than 1, this system can be feasibly scheduled statically on two processors.  If we put Tm+1 on one processor and the other tasks on the other processor and schedule the task(s) on each processor according to either of these priority- driven algorithms we will get feasible schedule.
  • 9. Fixed Priority vs. Dynamic Priority Algorithms  Priority-driven algorithms differ from each other in how priorities are assigned to jobs.  We classify algorithms for scheduling periodic tasks into two types:  Fixed priority and  Dynamic priority.  A fixed-priority algorithm assigns the same priority to all the jobs in each task.  In other words, the priority of each periodic task is fixed relative to other tasks.
  • 10.  Dynamic-priority algorithm assigns different priorities to the individual jobs in each task.  The priority of the task with respect to that of the other tasks changes as jobs are released and completed.
  • 11.  Indeed, we have three categories of algorithms:  Fixed-priority algorithms: Rate Monotonic (RM), Deadline Monotonic (DM).  Task-level dynamic-priority (and job level fixed-priority) algorithms: EDF, FIFO, LIFO  Job-level (and task-level) dynamic algorithms: LST  We assume dynamic means task level dynamic and job level fixed unless otherwise stated.
  • 12. Rate Monotonic Algorithm  The rate (of job releases) of a task = 1/period.  The higher its rate, the higher the priority of the task.  In other word smaller the period higher the priority of the task.
  • 13.
  • 14. Deadline Monotonic Algorithm  Well known fixed priority algorithm.  The shorter its relative deadline, the higher the priority of the task.  Example:  T1 = (50,50,25,100); T2 = (0,62.5,10,20);  T3 = (0,125,25,50)  u1 = 0.5; u2 = 0.16; u3 = 0.2  U = 0.86; H = 250.
  • 15.
  • 16.
  • 17.  When relative deadline of every job is proportional to its period both RM and DM algorithms are identical.  When relative deadlines are arbitrary, DM algorithm performs better than RM.  We can see DM produce the feasible schedule even when RM fails.
  • 18. EDF Algorithm  The earlier its absolute deadline ,the higher the priority of the job.
  • 19. LST Algorithm  It assigns the priorities to individual jobs in the tasks according to the slack time.  At time t, the slack of a job whose remaining execution time is e and deadline is d is equal to the d-e-t.  The scheduler checks the slacks of all the ready jobs each time a new job is released and orders the jobs on the basis of their slacks.  Smaller the slack higher the priority.
  • 20.  Example T1=(2,1) and T2=(5,2.5)  At time t=0  Slack for T1=2-1-0=1  Slack for T2=5-2.5-0=2.5  At time t=2  T1=4-1-2=1  T2=5-1.5-2=1.5  At time t=4  T1=6-1-4=1  T2=5-0.5-4=0.5  At time t=5  T1=6-0.5-5=0.5  T2=10-2.5-5=2.5  At time t=6  T1=8-1-6=1  T2=10-2-6=2  At time =8  T1=10-1-8=1  T2=10-1-8=1
  • 21. Time Ready Running 0 J1,1 J2,1 J1,1 1 J2,1 J2,1 2 J1,2 J2,1 J1,2 3 J2,1 J2,1 4 J1,3 J2,1 J2,1 4.5 J1,3 J1,3 5 J1,3 J2,2 J1,3 Time Ready Running 5.5 J2,2 J2,2 6 J1,4 J2,2 J1,4 7 J2,2 J2,2 8 J1,5 J2,2 J1,5 9 J2,2 J2,2
  • 22.  If decisions are made only at the time when the jobs are released or completed, it does not follow the LST rule all the time then it is called non restrict LST algorithm.  If the scheduler were to follow the LST rule strictly, it would have to monitor the slacks of all ready jobs and compare them with slack of executing job.  It would reassign priorities to jobs whenever their slacks change relative to each other.
  • 23.  From above example: At time t=2.6  Slack time for T1=4-0.4-2.6=1  Slack time for T2=5-1.5-2.6=0.9  The runtime overhead of the strict LST algorithm includes the time required to monitor and compare the slack of all ready jobs as the time progress.
  • 24. Maximum Schedulable Utilization  A system is schedulable by an algorithm if the algorithm always produces a feasible schedule of the system.
  • 25. Schedulable Utilization of the EDF Algorithm  A system T of independent, preemptable tasks with relative deadlines equal to their respective periods can be feasibly scheduled on one processor if and only if its total utilization is equal to or less than 1.  When the relative deadlines of some tasks are less than their period, the system may not be feasible, even when its total utilization is less than 1.  For example : for task T1=(2,0.9),T2=(5, 2.3) is feasible but it would not be schedulable if its relative deadlines were 3 instead of 5.
  • 26.  The ratio of the execution time ek of a task Tk to the minimum of its relative deadline Dk and period pk is the density dk of the task.  In other words, the density of Tk is ek/min(Dk , pk).  The sum of the densities of all tasks in a system is the density of the system and is denoted by ∆ when Di < pi for some task Ti , ∆ > U.  If the density of a system is larger than 1, the system may not be feasible.
  • 27.  Example: T1=(2,0.9); T2=(5,2.3,3);  ∆ = 0.9/2+2.3/3 = 7.3/6 > 1, not feasible.  So the tasks are not schedulable by any algorithm.  Any system is feasible if its density is equal to or less than 1.