SlideShare une entreprise Scribd logo
1  sur  33
Real-Time Scheduling
CIS700
Insup Lee
By
SATHISHKUMAR G
(sathishsak111@gmail.com)
Outline
• Real-time systems
• Real-time scheduling algorithms
– Fixed-priority algorithm (RM)
– Dynamic-priority algorithm (EDF)
Real-Time Systems
• Definition
– Systems whose correctness depends on their temporal
aspects as well as their functional aspects
• Performance measure
– Timeliness on timing constraints (deadlines)
– Speed/average case performance are less significant.
• Key property
– Predictability on timing constraints
Real-Time System Example
• Digital control systems
– periodically performs the following job:
senses the system status and
actuates the system according to its current status
Control-Law
Computation
Sensor
Actuator
Real-Time System Example
Multimedia
• Multimedia applications
– periodically performs the following job:
reads, decompresses, and displays video and audio
streams
Fundamental Real-Time Issue
• To specify the timing constraints of real-time
systems
• To achieve predictability on satisfying their timing
constraints, possibly, with the existence of other
real-time systems
Scheduling Framework Example
CPU
OS Scheduler
Digital Controller Multimedia
Real-Time Workload
• Job (unit of work)
– a computation, a file read, a message transmission, etc
• Attributes
– Resources required to make progress
– Timing parameters
Released
Absolute
deadline
Relative deadline
Execution time
Real-Time Task
• Task : a sequence of similar jobs
– Periodic task (p,e)
• Its jobs repeat regularly
• Period p = inter-release time (0 < p)
• Execution time e = maximum execution time (0 < e < p)
• Utilization U = e/p
5 10 150
Deadlines: Hard vs. Soft
• Hard deadline
– Disastrous or very serious consequences may occur if
the deadline is missed
– Validation is essential : can all the deadlines be met,
even under worst-case scenario?
– Deterministic guarantees
• Soft deadline
– Ideally, the deadline should be met for maximum
performance. The performance degrades in case of
deadline misses.
– Best effort approaches / statistical guarantees
Schedulability
• Property indicating whether a real-time system (a set
of real-time tasks) can meet their deadlines
(4,1)
(5,2)
(7,2)
Real-Time Scheduling
• Determines the order of real-time task executions
• Static-priority scheduling
• Dynamic-priority scheduling
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
RM (Rate Monotonic)
• Optimal static-priority scheduling
• It assigns priority according to period
• A task with a shorter period has a higher priority
• Executes a job with the shortest period
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
RM (Rate Monotonic)
• Executes a job with the shortest period
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
RM (Rate Monotonic)
• Executes a job with the shortest period
(4,1)
(5,2)
(7,2)
Deadline Miss !
5
5
10
10 15
15
T1
T2
T3
Response Time
• Response time
– Duration from released time to finish time
(4,1)
(5,2)
(10,2)
5
5
10
10 15
15
T1
T2
T3
Response Time
• Response time
– Duration from released time to finish time
(4,1)
(5,2)
(10,2)
Response Time
5
5
10
10 15
15
T1
T2
T3
Response Time
• Response Time (ri) [Audsley et al., 1993]
• HP(Ti) : a set of higher-priority tasks than Ti
(4,1)
(5,2)
(10,2)
k
THPT k
i
ii e
p
r
er
ik
⋅





+= ∑∈ )(
5
5
10
10
T1
T2
T3
RM - Schedulability Analysis
• Real-time system is schedulable under RM
if and only if ri ≤ pi for all task Ti(pi,ei)
Joseph & Pandya,
“Finding response times in a real-time system”,
The Computer Journal, 1986.
RM – Utilization Bound
• Real-time system is schedulable under RM if
∑Ui ≤ n (21/n
-1)
Liu & Layland,
“Scheduling algorithms for multi-programming in a
hard-real-time environment”, Journal of ACM, 1973.
RM – Utilization Bound
• Real-time system is schedulable under RM if
∑Ui ≤ n (21/n
-1)
• Example: T1(4,1), T2(5,1), T3(10,1),
∑Ui = 1/4 + 1/5 + 1/10
= 0.55
3 (21/3
-1) ≈ 0.78
Thus, {T1, T2, T3} is schedulable under RM.
RM Utilization Bounds
0.5
0.6
0.7
0.8
0.9
1
1.1
1 4 16 64 256 1024 4096
The Number of Tasks
Utilization
RM – Utilization Bound
• Real-time system is schedulable under RM if
∑Ui ≤ n (21/n
-1)
EDF (Earliest Deadline First)
• Optimal dynamic priority scheduling
• A task with a shorter deadline has a higher priority
• Executes a job with the earliest deadline
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
EDF (Earliest Deadline First)
• Executes a job with the earliest deadline
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
EDF (Earliest Deadline First)
• Executes a job with the earliest deadline
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
EDF (Earliest Deadline First)
• Executes a job with the earliest deadline
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
EDF (Earliest Deadline First)
• Optimal scheduling algorithm
– if there is a schedule for a set of real-time tasks,
EDF can schedule it.
(4,1)
(5,2)
(7,2)
5
5
10
10 15
15
T1
T2
T3
Processor Demand Bound
• Demand Bound Function : dbf(t)
– the maximum processor demand by workload over any
interval of length t
(4,1)
(5,2)
(7,2)
t
5
5
10
10 15
15
T1
T2
T3
EDF - Schedulability Analysis
• Real-time system is schedulable under EDF
if and only if dbf(t) ≤ t for all interval t
Baruah et al.
“Algorithms and complexity concerning the preemptive
scheduling of periodic, real-time tasks on one
processor”, Journal of Real-Time Systems, 1990.
• Demand Bound Function : dbf(t)
– the maximum processor demand by workload over any
interval of length t
EDF – Utilization Bound
• Real-time system is schedulable under EDF if and only
if
∑Ui ≤ 1
Liu & Layland,
“Scheduling algorithms for multi-programming in a
hard-real-time environment”, Journal of ACM, 1973.
• Domino effect during overload conditions
– Example: T1(4,3), T2(5,3), T3(6,3), T4(7,3)
EDF – Overload Conditions
T1
50 7
T2 T3 T4
3 6
Deadline Miss !
T1
50 7
T3
3 6
Better schedules :
T1
50 7
T4
3 6
RM vs. EDF
• Rate Monotonic
– Simpler implementation, even in systems without explicit
support for timing constraints (periods, deadlines)
– Predictability for the highest priority tasks
• EDF
– Full processor utilization
– Misbehavior during overload conditions
• For more details: Buttazzo, “Rate monotonic vs. EDF:
Judgement Day”, EMSOFT 2003.
THANK YOU

Contenu connexe

Tendances

Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)
Sri Prasanna
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
vivek223
 

Tendances (20)

Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Approaches to real time scheduling
Approaches to real time schedulingApproaches to real time scheduling
Approaches to real time scheduling
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1
 
Real time operating system
Real time operating systemReal time operating system
Real time operating system
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and Concepts
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
Priority driven scheduling of periodic tasks
Priority driven scheduling of periodic tasksPriority driven scheduling of periodic tasks
Priority driven scheduling of periodic tasks
 
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
 
Real-Time Scheduling Algorithms
Real-Time Scheduling AlgorithmsReal-Time Scheduling Algorithms
Real-Time Scheduling Algorithms
 
Real time-embedded-system-lec-02
Real time-embedded-system-lec-02Real time-embedded-system-lec-02
Real time-embedded-system-lec-02
 
Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
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
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 

Similaire à Real-Time Scheduling

Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
jeronimored
 
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdfWeek 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
devinezekiel2003
 
3 process scheduling
3 process scheduling3 process scheduling
3 process scheduling
ahad alam
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
Rohit Joshi
 

Similaire à Real-Time Scheduling (20)

Real time system tsp
Real time system tspReal time system tsp
Real time system tsp
 
Rtos 8051
Rtos 8051Rtos 8051
Rtos 8051
 
Real Time System
Real Time SystemReal Time System
Real Time System
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline First
 
Priority Scheduling.pptx
Priority Scheduling.pptxPriority Scheduling.pptx
Priority Scheduling.pptx
 
Real time-embedded-system-lec-02
Real time-embedded-system-lec-02Real time-embedded-system-lec-02
Real time-embedded-system-lec-02
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
 
Rtos presentation
Rtos presentationRtos presentation
Rtos presentation
 
Embedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxEmbedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptx
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 
Commonly used Approaches to Real Time Scheduling
Commonly used Approaches to Real Time SchedulingCommonly used Approaches to Real Time Scheduling
Commonly used Approaches to Real Time Scheduling
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - Scheduling
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
OS Process Chapter 3.pdf
OS Process Chapter 3.pdfOS Process Chapter 3.pdf
OS Process Chapter 3.pdf
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling Algorithms
 
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdfWeek 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
 
3 process scheduling
3 process scheduling3 process scheduling
3 process scheduling
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 

Plus de sathish sak

Plus de sathish sak (20)

TRANSPARENT CONCRE
TRANSPARENT CONCRETRANSPARENT CONCRE
TRANSPARENT CONCRE
 
Stationary Waves
Stationary WavesStationary Waves
Stationary Waves
 
Electrical Activity of the Heart
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heart
 
Electrical Activity of the Heart
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heart
 
Software process life cycles
Software process life cyclesSoftware process life cycles
Software process life cycles
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
 
Real-Time Signal Processing: Implementation and Application
Real-Time Signal Processing:  Implementation and ApplicationReal-Time Signal Processing:  Implementation and Application
Real-Time Signal Processing: Implementation and Application
 
DIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEWDIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEW
 
FRACTAL ROBOTICS
FRACTAL  ROBOTICSFRACTAL  ROBOTICS
FRACTAL ROBOTICS
 
Electro bike
Electro bikeElectro bike
Electro bike
 
ROBOTIC SURGERY
ROBOTIC SURGERYROBOTIC SURGERY
ROBOTIC SURGERY
 
POWER GENERATION OF THERMAL POWER PLANT
POWER GENERATION OF THERMAL POWER PLANTPOWER GENERATION OF THERMAL POWER PLANT
POWER GENERATION OF THERMAL POWER PLANT
 
mathematics application fiels of engineering
mathematics application fiels of engineeringmathematics application fiels of engineering
mathematics application fiels of engineering
 
Plastics…
Plastics…Plastics…
Plastics…
 
ENGINEERING
ENGINEERINGENGINEERING
ENGINEERING
 
ENVIRONMENTAL POLLUTION
ENVIRONMENTALPOLLUTIONENVIRONMENTALPOLLUTION
ENVIRONMENTAL POLLUTION
 
RFID TECHNOLOGY
RFID TECHNOLOGYRFID TECHNOLOGY
RFID TECHNOLOGY
 
green chemistry
green chemistrygreen chemistry
green chemistry
 
NANOTECHNOLOGY
  NANOTECHNOLOGY	  NANOTECHNOLOGY
NANOTECHNOLOGY
 
The Cyclotron
The CyclotronThe Cyclotron
The Cyclotron
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Dernier (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Real-Time Scheduling

  • 2. Outline • Real-time systems • Real-time scheduling algorithms – Fixed-priority algorithm (RM) – Dynamic-priority algorithm (EDF)
  • 3. Real-Time Systems • Definition – Systems whose correctness depends on their temporal aspects as well as their functional aspects • Performance measure – Timeliness on timing constraints (deadlines) – Speed/average case performance are less significant. • Key property – Predictability on timing constraints
  • 4. Real-Time System Example • Digital control systems – periodically performs the following job: senses the system status and actuates the system according to its current status Control-Law Computation Sensor Actuator
  • 5. Real-Time System Example Multimedia • Multimedia applications – periodically performs the following job: reads, decompresses, and displays video and audio streams
  • 6. Fundamental Real-Time Issue • To specify the timing constraints of real-time systems • To achieve predictability on satisfying their timing constraints, possibly, with the existence of other real-time systems
  • 7. Scheduling Framework Example CPU OS Scheduler Digital Controller Multimedia
  • 8. Real-Time Workload • Job (unit of work) – a computation, a file read, a message transmission, etc • Attributes – Resources required to make progress – Timing parameters Released Absolute deadline Relative deadline Execution time
  • 9. Real-Time Task • Task : a sequence of similar jobs – Periodic task (p,e) • Its jobs repeat regularly • Period p = inter-release time (0 < p) • Execution time e = maximum execution time (0 < e < p) • Utilization U = e/p 5 10 150
  • 10. Deadlines: Hard vs. Soft • Hard deadline – Disastrous or very serious consequences may occur if the deadline is missed – Validation is essential : can all the deadlines be met, even under worst-case scenario? – Deterministic guarantees • Soft deadline – Ideally, the deadline should be met for maximum performance. The performance degrades in case of deadline misses. – Best effort approaches / statistical guarantees
  • 11. Schedulability • Property indicating whether a real-time system (a set of real-time tasks) can meet their deadlines (4,1) (5,2) (7,2)
  • 12. Real-Time Scheduling • Determines the order of real-time task executions • Static-priority scheduling • Dynamic-priority scheduling (4,1) (5,2) (7,2) 5 5 10 10 15 15
  • 13. RM (Rate Monotonic) • Optimal static-priority scheduling • It assigns priority according to period • A task with a shorter period has a higher priority • Executes a job with the shortest period (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 14. RM (Rate Monotonic) • Executes a job with the shortest period (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 15. RM (Rate Monotonic) • Executes a job with the shortest period (4,1) (5,2) (7,2) Deadline Miss ! 5 5 10 10 15 15 T1 T2 T3
  • 16. Response Time • Response time – Duration from released time to finish time (4,1) (5,2) (10,2) 5 5 10 10 15 15 T1 T2 T3
  • 17. Response Time • Response time – Duration from released time to finish time (4,1) (5,2) (10,2) Response Time 5 5 10 10 15 15 T1 T2 T3
  • 18. Response Time • Response Time (ri) [Audsley et al., 1993] • HP(Ti) : a set of higher-priority tasks than Ti (4,1) (5,2) (10,2) k THPT k i ii e p r er ik ⋅      += ∑∈ )( 5 5 10 10 T1 T2 T3
  • 19. RM - Schedulability Analysis • Real-time system is schedulable under RM if and only if ri ≤ pi for all task Ti(pi,ei) Joseph & Pandya, “Finding response times in a real-time system”, The Computer Journal, 1986.
  • 20. RM – Utilization Bound • Real-time system is schedulable under RM if ∑Ui ≤ n (21/n -1) Liu & Layland, “Scheduling algorithms for multi-programming in a hard-real-time environment”, Journal of ACM, 1973.
  • 21. RM – Utilization Bound • Real-time system is schedulable under RM if ∑Ui ≤ n (21/n -1) • Example: T1(4,1), T2(5,1), T3(10,1), ∑Ui = 1/4 + 1/5 + 1/10 = 0.55 3 (21/3 -1) ≈ 0.78 Thus, {T1, T2, T3} is schedulable under RM.
  • 22. RM Utilization Bounds 0.5 0.6 0.7 0.8 0.9 1 1.1 1 4 16 64 256 1024 4096 The Number of Tasks Utilization RM – Utilization Bound • Real-time system is schedulable under RM if ∑Ui ≤ n (21/n -1)
  • 23. EDF (Earliest Deadline First) • Optimal dynamic priority scheduling • A task with a shorter deadline has a higher priority • Executes a job with the earliest deadline (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 24. EDF (Earliest Deadline First) • Executes a job with the earliest deadline (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 25. EDF (Earliest Deadline First) • Executes a job with the earliest deadline (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 26. EDF (Earliest Deadline First) • Executes a job with the earliest deadline (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 27. EDF (Earliest Deadline First) • Optimal scheduling algorithm – if there is a schedule for a set of real-time tasks, EDF can schedule it. (4,1) (5,2) (7,2) 5 5 10 10 15 15 T1 T2 T3
  • 28. Processor Demand Bound • Demand Bound Function : dbf(t) – the maximum processor demand by workload over any interval of length t (4,1) (5,2) (7,2) t 5 5 10 10 15 15 T1 T2 T3
  • 29. EDF - Schedulability Analysis • Real-time system is schedulable under EDF if and only if dbf(t) ≤ t for all interval t Baruah et al. “Algorithms and complexity concerning the preemptive scheduling of periodic, real-time tasks on one processor”, Journal of Real-Time Systems, 1990. • Demand Bound Function : dbf(t) – the maximum processor demand by workload over any interval of length t
  • 30. EDF – Utilization Bound • Real-time system is schedulable under EDF if and only if ∑Ui ≤ 1 Liu & Layland, “Scheduling algorithms for multi-programming in a hard-real-time environment”, Journal of ACM, 1973.
  • 31. • Domino effect during overload conditions – Example: T1(4,3), T2(5,3), T3(6,3), T4(7,3) EDF – Overload Conditions T1 50 7 T2 T3 T4 3 6 Deadline Miss ! T1 50 7 T3 3 6 Better schedules : T1 50 7 T4 3 6
  • 32. RM vs. EDF • Rate Monotonic – Simpler implementation, even in systems without explicit support for timing constraints (periods, deadlines) – Predictability for the highest priority tasks • EDF – Full processor utilization – Misbehavior during overload conditions • For more details: Buttazzo, “Rate monotonic vs. EDF: Judgement Day”, EMSOFT 2003.