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

Fault tolerance techniques for real time operating system
Fault tolerance techniques for real time operating systemFault tolerance techniques for real time operating system
Fault tolerance techniques for real time operating systemanujos25
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic conceptsStudent
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMprakrutijsh
 
Hardware Software Codesign
Hardware Software CodesignHardware Software Codesign
Hardware Software Codesigndestruck
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded SystemsHimanshu Ghetia
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsDr.YNM
 
Basic functions & types of RTOS ES
Basic functions & types of  RTOS ESBasic functions & types of  RTOS ES
Basic functions & types of RTOS ESJOLLUSUDARSHANREDDY
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.Ravi Kumar Patel
 
Functional Parameter & Scheduling Hierarchy | Real Time System
Functional Parameter & Scheduling Hierarchy | Real Time SystemFunctional Parameter & Scheduling Hierarchy | Real Time System
Functional Parameter & Scheduling Hierarchy | Real Time Systemshubham ghimire
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...Arti Parab Academics
 
Embedded os
Embedded osEmbedded os
Embedded oschian417
 
Reference Model of Real Time System
Reference Model of Real Time SystemReference Model of Real Time System
Reference Model of Real Time SystemRaaz Karkee
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentationusmankiyani1
 
Cloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computingCloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computinghrmalik20
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software conceptsPrajakta Rane
 

What's hot (20)

Fault tolerance techniques for real time operating system
Fault tolerance techniques for real time operating systemFault tolerance techniques for real time operating system
Fault tolerance techniques for real time operating system
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
 
Hardware Software Codesign
Hardware Software CodesignHardware Software Codesign
Hardware Software Codesign
 
Task assignment and scheduling
Task assignment and schedulingTask assignment and scheduling
Task assignment and scheduling
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and Concepts
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Basic functions & types of RTOS ES
Basic functions & types of  RTOS ESBasic functions & types of  RTOS ES
Basic functions & types of RTOS ES
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Functional Parameter & Scheduling Hierarchy | Real Time System
Functional Parameter & Scheduling Hierarchy | Real Time SystemFunctional Parameter & Scheduling Hierarchy | Real Time System
Functional Parameter & Scheduling Hierarchy | Real Time System
 
Intel Pentium Pro
Intel Pentium ProIntel Pentium Pro
Intel Pentium Pro
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
 
Embedded os
Embedded osEmbedded os
Embedded os
 
Reference Model of Real Time System
Reference Model of Real Time SystemReference Model of Real Time System
Reference Model of Real Time System
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Cloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computingCloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computing
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts
 

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
 
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
 
3_process_scheduling.ppt----------------
3_process_scheduling.ppt----------------3_process_scheduling.ppt----------------
3_process_scheduling.ppt----------------DivyaBorade3
 

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
 
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
 
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
 
3_process_scheduling.ppt----------------
3_process_scheduling.ppt----------------3_process_scheduling.ppt----------------
3_process_scheduling.ppt----------------
 
3_process_scheduling.ppt
3_process_scheduling.ppt3_process_scheduling.ppt
3_process_scheduling.ppt
 

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

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