SlideShare a Scribd company logo
1 of 21
Commonly used Approaches to real
time scheduling
-Shrey Dahal
-Bipin karki
-Shekhar Koirala
1
Contents
• Clock Driven Approach
• Weighted Round Robin Approach
• Priority Driven Approach
• Dynamic vs Static System
• Effective Release Time And Deadline
• Optimality and Non-eptimality of EDF and LST algorithm
• Anomalous Behavior of Priority-Driven System
2
Clock Driven Approach
• Also called time-driven approach . Decisions about what jobs execute are chosen
before the system begins execution.
• Parameters of the real-time jobs are fixed and known.
• Schedule of the jobs is computed off-line and is stored for use at runtime.
• Cannot handle aperiodic and sporadic task since such task cannot be predicted.
• Example: the helicopter example with an interrupt every 1/180thof a second
3
Weighted Round Robin
• It is Commonly used for scheduling the time shared applications.
• Jobs Join FIFO queue when becomes ready for execution.
• Each job in the queue executes for one time slice.
• If there are n jobs, then each job gets 1/n share of processor.
• Example : Jobs communicating using Unix pipes
4
Priority Driven
• It refers to large class of scheduling algorithm that never leave any resource idle intentionally.
• Jobs are placed in one or more queues ;at each event the ready job with highest priority is
executed.
• Also called event-driven approach.
• Computation is done online without knowing the knowledge of job that will be released in
future.
• Algorithm used in non-real time system:
– Priority driven, FIFO:-assign priority based on release time
– Shortest Execution Time First , Longest Execution Time First:-assign priority based on
execution time
5
Priority Driven
• Algorithm used in Real Time System:
–Earliest deadline first
–Least slack time first
• Assign priority based on deadline or some timing constriants.
6
EDF AND LST
• Earliest deadline first Least Slack time
7
• Assign priority to jobs based on
deadline
• Earlier the deadline, higher the priority
• the schedulability test for EDF is:
where the ei are the worst-case
computation-times of the n processes and
the Pi are their respective inter-arrival
periods.
• Assign priority to jobs based on slack time(tslack)
• Calculate Slack:
t_rem = exe_time - (time – relese_time)
t_slack = deadline - time - trem
• Smaller the slack time, the higher the priority
Examples:LST
8
Example:EDF
9
(r1, d1, e1) = (0, 10, 3), (r2, d2, e2) = (2, 14, 6), (r3, d3, e3) = (4, 12, 4).
Static vs Dynamic System
Static System
10
• S Dynamic System
10
• Jobs are partitioned into subsystems, and
each subsystem is bound statically to a
processor.
• Jobs can be moved among system.
• Jobs are scheduled on multiple processors,
and a job can be dispatched from the
priority run queue to any of the processors.
• Jobs is migratable.
Optimality and Non-optimality of EDF and LST
algorithm
• OPTIMALITY:
11
• they will always produce a feasible schedule if one exists.
• Constraints: on a single processor, as long as preemption is allowed and jobs do not contend for resources.
• THEOREM:
• When preemption is allowed and jobs do not contend for resources, the EDF and LST algorithms can
produce a feasible schedule of a set J of jobs with arbitrary release times and deadlines on a processor if
and only if J has feasible schedules.
12
Proof:
To show the optimality of EDF, we have to require to show any feasible schedule can be transformed into
another EDF schedule.
If J i is scheduled to execute before J k, but J i’s deadline is later than J k’s such that there exist two
conditions:
– The release time of J k is after the J i completes that means they’re already in EDF order.
– The release time of J k is before the end of the interval in which J i executes.
This is always possible to swap J i and J k since J i’s deadline is later than J k’s such that
13
We can move any jobs following idle periods forward into the idle period then
the result is an EDF schedule
When deadline of J i’s is earlier than J k’s there is no possibility to generate the other feasible
schedule and EDF failed to produce a feasible schedule. Hence the optimality of EDF is
verified .
Non-Optimality
• Neither algorithm is optimal if jobs are non- preemptable or if
there is more than one processor
14
Non-optimality of EDF and LST
• EDF and LST algorithms are not optimal if preemption is not allowed or
there is more than one processor. consider j1(0,3,10),j2(2,6,14),j3(4,4,12).
15
16
Consider we have two processors and three jobs J1, J2, J3, with execution
times 1, 1, 5 and deadlines 1, 2, 5 respectively. All with release time 0.
Effective Release Time and Deadline
• Effective release time:-
-The effective release time of a job with predecessor is equal to the maximum value
among its given release time and the effective release times of all of its predecessors.
• Effective Deadline:-
- The effective deadline of a job with successors is equal to the minimum value
among its given deadline and the effective deadline of all of its successors.
17
1818
Validating Priority-Driven Scheduling
• Priority-driven scheduling has many advantages over clock-driven scheduling:
• Scheduling anomalies can occur for multiprocessor or non-preemptable systems,
or those which share resources.
19
• Easy to implement.
• Often have simple priority assignment rule,due to which run-time overhead of maintaining
queue can be small.
• Does not require information about deadline and release times in advance so it is uited to
application with varing time and resource requirement.
Anomalous Behavior of Priority-Driven Systems
20
21
THANK YOU

More Related Content

What's hot

Unit 1 - Introduction to Software Engineering.ppt
Unit 1 - Introduction to Software Engineering.pptUnit 1 - Introduction to Software Engineering.ppt
Unit 1 - Introduction to Software Engineering.pptDrTThendralCompSci
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture Haris456
 
Multithreading models
Multithreading modelsMultithreading models
Multithreading modelsanoopkrishna2
 
Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020 Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020 MuhammadTalha436
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Schedulingsathish sak
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingVaibhav Khanna
 
Compiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLRCompiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLRRiazul Islam
 
Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statisticssadiksha kafle
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimationHaitham Ahmed
 
Software engineering project management
Software engineering project managementSoftware engineering project management
Software engineering project managementjhudyne
 
Job sequencing with deadline
Job sequencing with deadlineJob sequencing with deadline
Job sequencing with deadlineArafat Hossan
 
Interactive os
Interactive osInteractive os
Interactive osmimie_ghaz
 

What's hot (20)

Incremental model
Incremental modelIncremental model
Incremental model
 
Unit 1 - Introduction to Software Engineering.ppt
Unit 1 - Introduction to Software Engineering.pptUnit 1 - Introduction to Software Engineering.ppt
Unit 1 - Introduction to Software Engineering.ppt
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
 
Multithreading models
Multithreading modelsMultithreading models
Multithreading models
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020 Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
 
Compiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLRCompiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLR
 
Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statistics
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
 
Software engineering project management
Software engineering project managementSoftware engineering project management
Software engineering project management
 
Job sequencing with deadline
Job sequencing with deadlineJob sequencing with deadline
Job sequencing with deadline
 
Compilation v. interpretation
Compilation v. interpretationCompilation v. interpretation
Compilation v. interpretation
 
Interactive os
Interactive osInteractive os
Interactive os
 
Software process
Software processSoftware process
Software process
 
project monitoring and control
project monitoring and controlproject monitoring and control
project monitoring and control
 
The structure of agents
The structure of agentsThe structure of agents
The structure of agents
 

Similar to Commonly used Approaches to Real Time Scheduling

multiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptmultiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptnaghamallella
 
Reference Model of Real Time System
Reference Model of Real Time SystemReference Model of Real Time System
Reference Model of Real Time SystemRaaz Karkee
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptxSHUJEHASSAN
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.pptKeyreSebre
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithmsPaurav Shah
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdfAliyanAbbas1
 
3 process scheduling
3 process scheduling3 process scheduling
3 process schedulingahad alam
 
Embedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxEmbedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxSwati Shekapure
 
fggggggggggggggggggggggggggggggfffffffffffffffffff
fggggggggggggggggggggggggggggggffffffffffffffffffffggggggggggggggggggggggggggggggfffffffffffffffffff
fggggggggggggggggggggggggggggggfffffffffffffffffffadugnanegero
 
Process Scheduling Algorithms for Operating Systems
Process Scheduling Algorithms for Operating SystemsProcess Scheduling Algorithms for Operating Systems
Process Scheduling Algorithms for Operating SystemsKathirvelRajan2
 

Similar to Commonly used Approaches to Real Time Scheduling (20)

multiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptmultiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.ppt
 
Reference Model of Real Time System
Reference Model of Real Time SystemReference Model of Real Time System
Reference Model of Real Time System
 
Real Time System
Real Time SystemReal Time System
Real Time System
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
Planificacion
PlanificacionPlanificacion
Planificacion
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
 
Lect07
Lect07Lect07
Lect07
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Section05 scheduling
Section05 schedulingSection05 scheduling
Section05 scheduling
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
3 process scheduling
3 process scheduling3 process scheduling
3 process scheduling
 
Embedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxEmbedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptx
 
Extlect02
Extlect02Extlect02
Extlect02
 
Os prj ppt
Os prj pptOs prj ppt
Os prj ppt
 
3_process_scheduling.ppt
3_process_scheduling.ppt3_process_scheduling.ppt
3_process_scheduling.ppt
 
fggggggggggggggggggggggggggggggfffffffffffffffffff
fggggggggggggggggggggggggggggggffffffffffffffffffffggggggggggggggggggggggggggggggfffffffffffffffffff
fggggggggggggggggggggggggggggggfffffffffffffffffff
 
3_process_scheduling.ppt
3_process_scheduling.ppt3_process_scheduling.ppt
3_process_scheduling.ppt
 
Process Scheduling Algorithms for Operating Systems
Process Scheduling Algorithms for Operating SystemsProcess Scheduling Algorithms for Operating Systems
Process Scheduling Algorithms for Operating Systems
 

Recently uploaded

Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxEasyPrinterHelp
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfEasyPrinterHelp
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 

Recently uploaded (20)

Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 

Commonly used Approaches to Real Time Scheduling

  • 1. Commonly used Approaches to real time scheduling -Shrey Dahal -Bipin karki -Shekhar Koirala 1
  • 2. Contents • Clock Driven Approach • Weighted Round Robin Approach • Priority Driven Approach • Dynamic vs Static System • Effective Release Time And Deadline • Optimality and Non-eptimality of EDF and LST algorithm • Anomalous Behavior of Priority-Driven System 2
  • 3. Clock Driven Approach • Also called time-driven approach . Decisions about what jobs execute are chosen before the system begins execution. • Parameters of the real-time jobs are fixed and known. • Schedule of the jobs is computed off-line and is stored for use at runtime. • Cannot handle aperiodic and sporadic task since such task cannot be predicted. • Example: the helicopter example with an interrupt every 1/180thof a second 3
  • 4. Weighted Round Robin • It is Commonly used for scheduling the time shared applications. • Jobs Join FIFO queue when becomes ready for execution. • Each job in the queue executes for one time slice. • If there are n jobs, then each job gets 1/n share of processor. • Example : Jobs communicating using Unix pipes 4
  • 5. Priority Driven • It refers to large class of scheduling algorithm that never leave any resource idle intentionally. • Jobs are placed in one or more queues ;at each event the ready job with highest priority is executed. • Also called event-driven approach. • Computation is done online without knowing the knowledge of job that will be released in future. • Algorithm used in non-real time system: – Priority driven, FIFO:-assign priority based on release time – Shortest Execution Time First , Longest Execution Time First:-assign priority based on execution time 5
  • 6. Priority Driven • Algorithm used in Real Time System: –Earliest deadline first –Least slack time first • Assign priority based on deadline or some timing constriants. 6
  • 7. EDF AND LST • Earliest deadline first Least Slack time 7 • Assign priority to jobs based on deadline • Earlier the deadline, higher the priority • the schedulability test for EDF is: where the ei are the worst-case computation-times of the n processes and the Pi are their respective inter-arrival periods. • Assign priority to jobs based on slack time(tslack) • Calculate Slack: t_rem = exe_time - (time – relese_time) t_slack = deadline - time - trem • Smaller the slack time, the higher the priority
  • 9. Example:EDF 9 (r1, d1, e1) = (0, 10, 3), (r2, d2, e2) = (2, 14, 6), (r3, d3, e3) = (4, 12, 4).
  • 10. Static vs Dynamic System Static System 10 • S Dynamic System 10 • Jobs are partitioned into subsystems, and each subsystem is bound statically to a processor. • Jobs can be moved among system. • Jobs are scheduled on multiple processors, and a job can be dispatched from the priority run queue to any of the processors. • Jobs is migratable.
  • 11. Optimality and Non-optimality of EDF and LST algorithm • OPTIMALITY: 11 • they will always produce a feasible schedule if one exists. • Constraints: on a single processor, as long as preemption is allowed and jobs do not contend for resources. • THEOREM: • When preemption is allowed and jobs do not contend for resources, the EDF and LST algorithms can produce a feasible schedule of a set J of jobs with arbitrary release times and deadlines on a processor if and only if J has feasible schedules.
  • 12. 12 Proof: To show the optimality of EDF, we have to require to show any feasible schedule can be transformed into another EDF schedule. If J i is scheduled to execute before J k, but J i’s deadline is later than J k’s such that there exist two conditions: – The release time of J k is after the J i completes that means they’re already in EDF order. – The release time of J k is before the end of the interval in which J i executes. This is always possible to swap J i and J k since J i’s deadline is later than J k’s such that
  • 13. 13 We can move any jobs following idle periods forward into the idle period then the result is an EDF schedule When deadline of J i’s is earlier than J k’s there is no possibility to generate the other feasible schedule and EDF failed to produce a feasible schedule. Hence the optimality of EDF is verified .
  • 14. Non-Optimality • Neither algorithm is optimal if jobs are non- preemptable or if there is more than one processor 14
  • 15. Non-optimality of EDF and LST • EDF and LST algorithms are not optimal if preemption is not allowed or there is more than one processor. consider j1(0,3,10),j2(2,6,14),j3(4,4,12). 15
  • 16. 16 Consider we have two processors and three jobs J1, J2, J3, with execution times 1, 1, 5 and deadlines 1, 2, 5 respectively. All with release time 0.
  • 17. Effective Release Time and Deadline • Effective release time:- -The effective release time of a job with predecessor is equal to the maximum value among its given release time and the effective release times of all of its predecessors. • Effective Deadline:- - The effective deadline of a job with successors is equal to the minimum value among its given deadline and the effective deadline of all of its successors. 17
  • 18. 1818
  • 19. Validating Priority-Driven Scheduling • Priority-driven scheduling has many advantages over clock-driven scheduling: • Scheduling anomalies can occur for multiprocessor or non-preemptable systems, or those which share resources. 19 • Easy to implement. • Often have simple priority assignment rule,due to which run-time overhead of maintaining queue can be small. • Does not require information about deadline and release times in advance so it is uited to application with varing time and resource requirement.
  • 20. Anomalous Behavior of Priority-Driven Systems 20