Real-Time Scheduling

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
1 de 33

Recomendados

Real Time Systems por
Real Time SystemsReal Time Systems
Real Time SystemsDeepak John
17.6K vistas84 diapositivas
Real time Scheduling in Operating System for Msc CS por
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 CSThanveen
16.6K vistas62 diapositivas
Real time Operating System por
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
106.4K vistas32 diapositivas
Approaches to real time scheduling por
Approaches to real time schedulingApproaches to real time scheduling
Approaches to real time schedulingKamal Acharya
11.3K vistas56 diapositivas
Reference model of real time system por
Reference model of real time systemReference model of real time system
Reference model of real time systemKamal Acharya
11.4K vistas55 diapositivas
Semaphores por
SemaphoresSemaphores
SemaphoresMohd Arif
29.5K vistas29 diapositivas

Más contenido relacionado

La actualidad más candente

Real time-system por
Real time-systemReal time-system
Real time-systemysush
5.9K vistas26 diapositivas
Data Hazard and Solution for Data Hazard por
Data Hazard and Solution for Data HazardData Hazard and Solution for Data Hazard
Data Hazard and Solution for Data HazardCOMSATS Institute of Information Technology
17.3K vistas21 diapositivas
Shortest job first Scheduling (SJF) por
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)ritu98
4.1K vistas9 diapositivas
CPU Scheduling Algorithms por
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling AlgorithmsShubhashish Punj
99.5K vistas22 diapositivas
scheduling por
schedulingscheduling
schedulingGaurav Shinde
7.9K vistas156 diapositivas
Real time system tsp por
Real time system tspReal time system tsp
Real time system tspPradeep Kumar TS
2K vistas27 diapositivas

La actualidad más candente(20)

Real time-system por ysush
Real time-systemReal time-system
Real time-system
ysush5.9K vistas
Shortest job first Scheduling (SJF) por ritu98
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
ritu984.1K vistas
Real time scheduling - basic concepts por Student
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
Student9.5K vistas
Real Time Operating Systems por Rohit Joshi
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
Rohit Joshi4.2K vistas
Pipeline hazard por AJAL A J
Pipeline hazardPipeline hazard
Pipeline hazard
AJAL A J61.8K vistas
Scheduling algorithms por Chankey Pathak
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Chankey Pathak28.6K vistas
Rtos concepts por anishgoel
Rtos conceptsRtos concepts
Rtos concepts
anishgoel5.3K vistas
Memory management por Rajni Sirohi
Memory managementMemory management
Memory management
Rajni Sirohi70.2K vistas
Clock driven scheduling por Kamal Acharya
Clock driven schedulingClock driven scheduling
Clock driven scheduling
Kamal Acharya10.4K vistas
OS - Process Concepts por Mukesh Chinta
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta23.9K vistas
Real Time OS For Embedded Systems por Himanshu Ghetia
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
Himanshu Ghetia45.5K vistas
Physical and Logical Clocks por Dilum Bandara
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
Dilum Bandara9.6K vistas
Hardware multithreading por Fraboni Ec
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec14K vistas

Similar a Real-Time Scheduling

Rtos 8051 por
Rtos 8051Rtos 8051
Rtos 8051ranjithkumar palanivel
1K vistas42 diapositivas
Real Time System por
Real Time SystemReal Time System
Real Time SystemAKANSH SINGHAL
258 vistas17 diapositivas
ESC UNIT 3.ppt por
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.pptSarvesh Warjurkar
2 vistas49 diapositivas
RTAI - Earliest Deadline First por
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstStefano Bragaglia
2.6K vistas27 diapositivas
Priority Scheduling.pptx por
Priority Scheduling.pptxPriority Scheduling.pptx
Priority Scheduling.pptxSarupyaDatta1
5 vistas12 diapositivas
Real time-embedded-system-lec-02 por
Real time-embedded-system-lec-02Real time-embedded-system-lec-02
Real time-embedded-system-lec-02University of Computer Science and Technology
1.2K vistas19 diapositivas

Similar a Real-Time Scheduling(20)

Chapter 19 - Real Time Systems por Wayne Jones Jnr
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
Wayne Jones Jnr4.5K vistas
Ch05 cpu-scheduling por Nazir Ahmed
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
Nazir Ahmed515 vistas
Commonly used Approaches to Real Time Scheduling por Raaz Karkee
Commonly used Approaches to Real Time SchedulingCommonly used Approaches to Real Time Scheduling
Commonly used Approaches to Real Time Scheduling
Raaz Karkee1.4K vistas
Operating Systems 1 (10/12) - Scheduling por Peter Tröger
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - Scheduling
Peter Tröger3.2K vistas
OS Process Chapter 3.pdf por Kp Sharma
OS Process Chapter 3.pdfOS Process Chapter 3.pdf
OS Process Chapter 3.pdf
Kp Sharma10 vistas
Survey of Real Time Scheduling Algorithms por IOSR Journals
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling Algorithms
IOSR Journals431 vistas
3 process scheduling por ahad alam
3 process scheduling3 process scheduling
3 process scheduling
ahad alam184 vistas
Worst-Case Scheduling of Software Tasks por Lionel Briand
Worst-Case Scheduling of Software TasksWorst-Case Scheduling of Software Tasks
Worst-Case Scheduling of Software Tasks
Lionel Briand617 vistas
Introduction to Scheduling por pec2013
Introduction to SchedulingIntroduction to Scheduling
Introduction to Scheduling
pec2013666 vistas

Más de sathish sak

TRANSPARENT CONCRE por
TRANSPARENT CONCRETRANSPARENT CONCRE
TRANSPARENT CONCREsathish sak
9.9K vistas15 diapositivas
Stationary Waves por
Stationary WavesStationary Waves
Stationary Wavessathish sak
2.9K vistas18 diapositivas
Electrical Activity of the Heart por
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heartsathish sak
2.2K vistas53 diapositivas
Electrical Activity of the Heart por
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heartsathish sak
11.6K vistas53 diapositivas
Software process life cycles por
Software process life cyclesSoftware process life cycles
Software process life cycles sathish sak
1K vistas28 diapositivas
Digital Logic Circuits por
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuitssathish sak
2.8K vistas58 diapositivas

Más de sathish sak(20)

TRANSPARENT CONCRE por sathish sak
TRANSPARENT CONCRETRANSPARENT CONCRE
TRANSPARENT CONCRE
sathish sak9.9K vistas
Stationary Waves por sathish sak
Stationary WavesStationary Waves
Stationary Waves
sathish sak2.9K vistas
Electrical Activity of the Heart por sathish sak
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heart
sathish sak2.2K vistas
Electrical Activity of the Heart por sathish sak
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heart
sathish sak11.6K vistas
Software process life cycles por sathish sak
Software process life cyclesSoftware process life cycles
Software process life cycles
sathish sak1K vistas
Digital Logic Circuits por sathish sak
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
sathish sak2.8K vistas
Real-Time Signal Processing: Implementation and Application por sathish sak
Real-Time Signal Processing:  Implementation and ApplicationReal-Time Signal Processing:  Implementation and Application
Real-Time Signal Processing: Implementation and Application
sathish sak3.9K vistas
DIGITAL SIGNAL PROCESSOR OVERVIEW por sathish sak
DIGITAL SIGNAL PROCESSOR OVERVIEWDIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEW
sathish sak432 vistas
FRACTAL ROBOTICS por sathish sak
FRACTAL  ROBOTICSFRACTAL  ROBOTICS
FRACTAL ROBOTICS
sathish sak915 vistas
ROBOTIC SURGERY por sathish sak
ROBOTIC SURGERYROBOTIC SURGERY
ROBOTIC SURGERY
sathish sak5.1K vistas
POWER GENERATION OF THERMAL POWER PLANT por sathish sak
POWER GENERATION OF THERMAL POWER PLANTPOWER GENERATION OF THERMAL POWER PLANT
POWER GENERATION OF THERMAL POWER PLANT
sathish sak4K vistas
mathematics application fiels of engineering por sathish sak
mathematics application fiels of engineeringmathematics application fiels of engineering
mathematics application fiels of engineering
sathish sak1.1K vistas
ENVIRONMENTAL POLLUTION por sathish sak
ENVIRONMENTALPOLLUTIONENVIRONMENTALPOLLUTION
ENVIRONMENTAL POLLUTION
sathish sak121 vistas
RFID TECHNOLOGY por sathish sak
RFID TECHNOLOGYRFID TECHNOLOGY
RFID TECHNOLOGY
sathish sak287 vistas
green chemistry por sathish sak
green chemistrygreen chemistry
green chemistry
sathish sak1.7K vistas
NANOTECHNOLOGY por sathish sak
  NANOTECHNOLOGY	  NANOTECHNOLOGY
NANOTECHNOLOGY
sathish sak215 vistas
The Cyclotron por sathish sak
The CyclotronThe Cyclotron
The Cyclotron
sathish sak4.7K vistas

Último

Les nouveautés produit Neo4j por
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4jNeo4j
27 vistas46 diapositivas
Citi TechTalk Session 2: Kafka Deep Dive por
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Diveconfluent
17 vistas60 diapositivas
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... por
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...Deltares
15 vistas17 diapositivas
What Can Employee Monitoring Software Do?​ por
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​wAnywhere
18 vistas11 diapositivas
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida por
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - PridaDSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - PridaDeltares
17 vistas9 diapositivas
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema por
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDeltares
12 vistas13 diapositivas

Último(20)

Les nouveautés produit Neo4j por Neo4j
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4j
Neo4j27 vistas
Citi TechTalk Session 2: Kafka Deep Dive por confluent
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
confluent17 vistas
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... por Deltares
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
Deltares15 vistas
What Can Employee Monitoring Software Do?​ por wAnywhere
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​
wAnywhere18 vistas
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida por Deltares
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - PridaDSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida
Deltares17 vistas
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema por Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares12 vistas
DSD-INT 2023 SFINCS Modelling in the U.S. Pacific Northwest - Parker por Deltares
DSD-INT 2023 SFINCS Modelling in the U.S. Pacific Northwest - ParkerDSD-INT 2023 SFINCS Modelling in the U.S. Pacific Northwest - Parker
DSD-INT 2023 SFINCS Modelling in the U.S. Pacific Northwest - Parker
Deltares8 vistas
Software testing company in India.pptx por SakshiPatel82
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptx
SakshiPatel827 vistas
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan... por Deltares
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
Deltares10 vistas
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut... por HCLSoftware
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
HCLSoftware6 vistas
Neo4j : Graphes de Connaissance, IA et LLMs por Neo4j
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j : Graphes de Connaissance, IA et LLMs
Neo4j : Graphes de Connaissance, IA et LLMs
Neo4j46 vistas
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... por Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller31 vistas
Neo4j y GenAI por Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j35 vistas
Consulting for Data Monetization Maximizing the Profit Potential of Your Data... por Flexsin
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Flexsin 15 vistas
Tridens DevOps por Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 vistas
Applying Platform Engineering Thinking to Observability.pdf por Natan Yellin
Applying Platform Engineering Thinking to Observability.pdfApplying Platform Engineering Thinking to Observability.pdf
Applying Platform Engineering Thinking to Observability.pdf
Natan Yellin12 vistas
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon por Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares11 vistas
Software evolution understanding: Automatic extraction of software identifier... por Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...

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.