SlideShare a Scribd company logo
1 of 26
Real-Time Task Scheduling
N.Preetha/ME-I.
Basic concepts..
Outline
īŽ Introduction
īŽ Important concepts
īŽ Types of real-time task & their
characteristics
īŽ Task scheduling
īŽ Basic concepts
īŽ Classification of scheduling algorithms
N.Preetha/ME-I.
Introduction
īŽ Real-time tasks get generated in response to some events that
may either be external or internal to the system.
īŽ Every real-time system usually consists of a number of real-
time tasks.
īŽ The time bounds on different tasks may be different.
īŽ Selection of appropriate task scheduling algorithm is central to
the proper functioning of a real time system(to meet the time
constraint of the task).
N.Preetha/ME-I.
Important concepts
īŽ Task instance
īŽ Relative deadline Vs Absolute deadline
īŽ Response time
īŽ Task precedence
īŽ Data sharing
N.Preetha/ME-I.
Task instance
īŽ A task is generated when some specific event occurs.
īŽ Real time tasks normally recur a large number of times at
different instants of time depending on event occurrence time.
īŽ Most real-time tasks recurs with certain fixed periods.
īŽ E.g. : A temperature sensing task in chemical plant might
recur indefinitely with a certain period because the
temperature is sampled periodically, whereas a task
handling a device interrupt might recur at random instants.
N.Preetha/ME-I.
Cont..
īŽ Each time a task recurs, it is called an instance of the task.
The īŦrst time a task occurs, it is called the īŦrst instance of
the task.
īŽ The next occurrence of the task is called its second
instance, and so on.
īŽ The jth instance of a task Ti would be denoted as Ti(j).
īŽ Each instance of a real-time task is associated with a
deadline by which it needs to complete and produce
results.
N.Preetha/ME-I.
Relative Deadline Vs Absolute
Deadline
Absolute Deadline
īŽ The absolute deadline of a task is the ab-solute time value (counted from
time 0) by which the results from the task are expected.
īŽ Thus , absolute deadline is equal to the interval of time between the time 0
and the actual instant at which the deadline occurs as measured by some
physical clock.
Relative Deadline
īŽ Relative deadline is the time in-terval between the start of the task and the
instant at which the deadline occurs.
īŽ In other words, relative deadline is the time interval between the arrival of
a task and the corresponding dead-line.
īŽ the relative deadline of the task Ti(1) is d, whereas its absolute dead-line
is
N.Preetha/ME-I.
N.Preetha/ME-I.
Response Time
īŽ The response time of a task is the time it takes (as measured
from the task arrival time) for the task to produce its results.
īŽ As already remarked, task instances get generated due to
occurrence of events.
īŽ These events may be internal to the system, such as clock
interrupts, or external to the system such as a robot
encountering an obstacle.
N.Preetha/ME-I.
Task Precedence
īŽ A task is said to precede another task,if the first task must complete before the second
task can start.
īŽ When a task Ti precedes Tj , then each instance of Ti precedes corresponding instance of
Tj .
īŽ A precedence order defines a partial order among tasks.
īŽ E.g. : partial ordering among tasks - T1 precedes T2, but we cannot relate T1 with either
T3 or T4.
N.Preetha/ME-I.
Data Sharing
īŽ Tasks often need to share their results among each other
when one task needs to share the results produced by another
task; clearly, the second task must precede the īŦrst task.
īŽ In fact, precedence relation between two tasks sometimes
implies data sharing between the two tasks (e.g., īŦrst task
passing some results to the second task). However, this is not
always true.
īŽ A task may be required to precede another even when there is
no data sharing.
īŽ E.g. in a chemical plant it may be required that the reaction
chamber must be īŦlled with water before chemicals are
introduced.
N.Preetha/ME-I.
Contâ€Ļ
īŽ In this case, the task handling īŦlling up the
reaction chamber with water must complete,
before the task handling introduction of the
chemicals is activated.
īŽ It is, therefore, not appropriate to represent
data sharing using precedence relation
N.Preetha/ME-I.
Contâ€Ļ
īŽ Data sharing among the tasks does not necessarily impose any particular
ordering among the tasks.
īŽ Here, T2 uses the results of T3.T2 may even start executing first , after
sometimes it may receive some data from T3, and continues its execution.
N.Preetha/ME-I.
TYPES OF REAL-TIME TASKS
& THEIR CHARACTERISTICS
īŽ Based on the way real-time tasks recur over a
period of time, it is possible to classify them into
three main categories:
īŽ
Periodic tasks
īŽ
Sporadic tasks
īŽ
Aperiodic tasks.
N.Preetha/ME-I.
Periodic Tasks
īŽ A periodic task is one that repeats after a certain īŦxed time interval.
īŽ Periodic tasks are sometimes referred to as clock-driven tasks.
īŽ The īŦxed time interval after which a task repeats is called the period of
the task.
īŽ If Ti is a periodic task, then the time from 0 till the occurrence of the īŦrst
instance of Ti(i.e., Ti(1)) is denoted by ; and is called the phase of the
task.
īŽ Periodic task Ti can be represented using four tuples:
īŽ Pi -is the period of task,
īŽ ei - is the worst case execution time of the task,
īŽ di - is the relative deadline of the task.
N.Preetha/ME-I.
Cont..
īŽ A vast majority of the tasks present in a typical real-time system are
periodic.
īŽ for example, monitoring certain conditions, polling information from
sensors at regular intervals to carry out certain action at regular intervals.
īŽ The instances of the temperature, pressure, and chemical concentration
monitoring tasks are normally generated through the interrupts received
from a periodic timer.
N.Preetha/ME-I.
Sporadic Task
īŽ A sporadic task is one that recurs at random instants.
īŽ A sporadic task Ti can be is represented by three tuples:
īŽ ei - worst case execution of instance of the task.
īŽ gi - the minimum separation between two consecutive instances of the task.
īŽ di - relative deadline.
īŽ The minimum separation gi indicates that once an instance of
a sporadic task occurs , the next instance cannot occur before
gi time unit have elapsed.
N.Preetha/ME-I.
Cont..
īŽ E.g. In a robot a task that gets generated to handle an obstacle that appears
suddenly is a sporadic task.
īŽ In a factory , the task that handles fire condition is a sporadic task.
īŽ Criticality varies from highly critical to moderately
critical.
īŽ E.g. an I/O interrupt or DMA interrupt is moderately critical.
īŽ Task handling the reporting of fire condition is highly critical.
N.Preetha/ME-I.
Aperiodic Task
īŽ An aperiodic task can arise at random instants.
īŽ Two or more instances of an aperiodic task might occur at the same time
instant because minimum separation gi,between two consecutive
instances can be 0.
īŽ Aperiodic task can recur in quick succession . It , therefore ,becomes
very difficult to meet the deadlines of all instances of an aperiodic task.
īŽ Soft real time systems can tolerate a few deadline misses .so ,aperiodic
tasks are generally soft real time tasks.
īŽ E.g. Logging task in a distributed systems.
īŽ The logging task can be started by different tasks running on different nodes.
īŽ The logging request from different tasks may arrive at the logger almost at the same
time.
īŽ Other egs are Keyboard presses, mouse movements etc..
N.Preetha/ME-I.
Task scheduling
īŽ Basic concepts
īŽ Important concepts and terminologies for schedulers :
īŽ
Valid schedule
īŽ
Feasible schedule
īŽ
Proficient scheduler
īŽ
Optimal scheduler
īŽ
Scheduling Points
īŽ
Preemptive scheduler
īŽ
Utilization
īŽ
Jitter
N.Preetha/ME-I.
Description
Valid schedule
īŽ A valid schedule for set of tasks is one where at most one task
is assigned to a processor at a time, no task is scheduled before
its arrival time, and the precedence and resource constraints of
all tasks are satisīŦed.
Feasible schedule
īŽ A valid schedule is called a feasible schedule, only if all tasks
meet their respective time constraints in the schedule.
N.Preetha/ME-I.
Cont..
Proficient scheduler
īŽ A task scheduler sch. 1 is said to be more proīŦcient than another
scheduler sch. 2, if sch. 1can feasibly schedule all task sets that sch.
2can, but there exists at least one task set that sch. 2can not feasibly
schedule, whereas sch. 1can.
īŽ If sch. 1can feasibly schedule all task sets that sch. 2can feasibly
schedule and vice versa, then sch. 1and sch. 2 are called equally
proīŦcient schedulers.
Optimal scheduler
īŽ Optimal scheduler can feasibly schedule any task set that can be feasibly
scheduled by any other scheduler.
N.Preetha/ME-I.
Cont..
īŽ In other words, it would not be possible to īŦnd a more proīŦcient
scheduling algorithm than an optimal scheduler.
īŽ If an optimal scheduler can not schedule some task set, then no other
scheduler should be able to produce a feasible schedule for that task set.
Scheduling Points
īŽ The scheduling points of a scheduler are the points on time line at which
the scheduler makes decisions regarding which task is to be run next.
īŽ A task scheduler does not need to run continuously, it is activated by the
operating system only at the scheduling points to make the scheduling
decision as to which task to be run next.
N.Preetha/ME-I.
Cont..
Preemptive scheduler
īŽ A preemptive scheduler is one which when a higher priority task arrives , suspends
any lower priority task that may be executing and takes up the higher priority task
for execution.
īŽ A preempted lower priority task can resume its execution only when no higher
priority task is ready.
Utilization
īŽ The utilization of a task is the average time for which it executes per unit time
interval.
īŽ For a periodic task Ti , utilization Ui is
ei – execution time
Pi – period of Ti
N.Preetha/ME-I.
Cont..
Jitter
īŽ It is the deviation of a periodic task from its strict periodic
behavior.
īŽ The arrival time jitter is the deviation of the task from
arriving at the precise periodic time of arrival.
īŽ It may be caused by imprecise clocks , or other factors
such as network congestions.
īŽ The completion time jitter is the deviation of task from its
prÊcised deadline.
N.Preetha/ME-I.
Thank You !!!!!!!!
N.Preetha/ME-I.

More Related Content

What's hot

Real time-system
Real time-systemReal time-system
Real time-systemysush
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos conceptsanishgoel
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time KernelsArnav Soni
 
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
 
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
 
Reference model of real time system
Reference model of real time systemReference model of real time system
Reference model of real time systemKamal Acharya
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systemsknowdiff
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture Haris456
 
Metrics for project size estimation
Metrics for project size estimationMetrics for project size estimation
Metrics for project size estimationNur Islam
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systemsleo3004
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical ClocksDilum Bandara
 
Vector clock algorithm
Vector clock algorithmVector clock algorithm
Vector clock algorithmS. Anbu
 
Full solution manual real time system by jane w s liu solution manual
Full solution manual real time system by jane w s liu solution manualFull solution manual real time system by jane w s liu solution manual
Full solution manual real time system by jane w s liu solution manualneeraj7svp
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsHariharan Ganesan
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingVimal Dewangan
 
Distributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmDistributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmpinki soni
 

What's hot (20)

Real time-system
Real time-systemReal time-system
Real time-system
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time Kernels
 
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
 
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
 
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
 
Reference model of real time system
Reference model of real time systemReference model of real time system
Reference model of real time system
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
 
Metrics for project size estimation
Metrics for project size estimationMetrics for project size estimation
Metrics for project size estimation
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
 
Vector clock algorithm
Vector clock algorithmVector clock algorithm
Vector clock algorithm
 
Full solution manual real time system by jane w s liu solution manual
Full solution manual real time system by jane w s liu solution manualFull solution manual real time system by jane w s liu solution manual
Full solution manual real time system by jane w s liu solution manual
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systems
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
 
Distributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmDistributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithm
 

Similar to Real time scheduling - basic concepts

Scheduling algorithm in real time system
Scheduling algorithm in real time systemScheduling algorithm in real time system
Scheduling algorithm in real time systemVishalPandat2
 
Real time system tsp
Real time system tspReal time system tsp
Real time system tspPradeep Kumar TS
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsIOSR Journals
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxnaghamallella
 
ERTS UNIT 5.pptx
ERTS UNIT 5.pptxERTS UNIT 5.pptx
ERTS UNIT 5.pptxPavithra525349
 
Rate.docx
Rate.docxRate.docx
Rate.docxkradha5
 
operating system 1
operating system 1operating system 1
operating system 1Monika Sharma
 
Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...
Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...
Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...IJECEIAES
 
capacityshifting1
capacityshifting1capacityshifting1
capacityshifting1Gokul Vasan
 
6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdfTigabu Yaya
 
Real time systems 1 and 2
Real time systems 1 and 2Real time systems 1 and 2
Real time systems 1 and 2satya srikanth V
 
RTS Short Topics
RTS Short TopicsRTS Short Topics
RTS Short TopicsSilas Kanth
 
Hard versus Soft real time system
Hard versus Soft real time systemHard versus Soft real time system
Hard versus Soft real time systemKamal Acharya
 
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...Editor IJMTER
 

Similar to Real time scheduling - basic concepts (20)

Scheduling algorithm in real time system
Scheduling algorithm in real time systemScheduling algorithm in real time system
Scheduling algorithm in real time system
 
RTS
RTSRTS
RTS
 
RTOS
RTOSRTOS
RTOS
 
task_sched2.ppt
task_sched2.ppttask_sched2.ppt
task_sched2.ppt
 
Real time system tsp
Real time system tspReal time system tsp
Real time system tsp
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling Algorithms
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time 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
 
Real time-embedded-system-lec-02
Real time-embedded-system-lec-02Real time-embedded-system-lec-02
Real time-embedded-system-lec-02
 
ERTS UNIT 5.pptx
ERTS UNIT 5.pptxERTS UNIT 5.pptx
ERTS UNIT 5.pptx
 
Rate.docx
Rate.docxRate.docx
Rate.docx
 
operating system 1
operating system 1operating system 1
operating system 1
 
Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...
Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...
Schedulability of Rate Monotonic Algorithm using Improved Time Demand Analysi...
 
capacityshifting1
capacityshifting1capacityshifting1
capacityshifting1
 
6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf
 
Real time systems 1 and 2
Real time systems 1 and 2Real time systems 1 and 2
Real time systems 1 and 2
 
RTS Short Topics
RTS Short TopicsRTS Short Topics
RTS Short Topics
 
Hard versus Soft real time system
Hard versus Soft real time systemHard versus Soft real time system
Hard versus Soft real time system
 
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
 

Recently uploaded

Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)
Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)
Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 

Recently uploaded (20)

Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)
Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)
Call Us â‰Ŋ 8377877756 â‰ŧ Call Girls In Shastri Nagar (Delhi)
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 

Real time scheduling - basic concepts

  • 2. Outline īŽ Introduction īŽ Important concepts īŽ Types of real-time task & their characteristics īŽ Task scheduling īŽ Basic concepts īŽ Classification of scheduling algorithms N.Preetha/ME-I.
  • 3. Introduction īŽ Real-time tasks get generated in response to some events that may either be external or internal to the system. īŽ Every real-time system usually consists of a number of real- time tasks. īŽ The time bounds on different tasks may be different. īŽ Selection of appropriate task scheduling algorithm is central to the proper functioning of a real time system(to meet the time constraint of the task). N.Preetha/ME-I.
  • 4. Important concepts īŽ Task instance īŽ Relative deadline Vs Absolute deadline īŽ Response time īŽ Task precedence īŽ Data sharing N.Preetha/ME-I.
  • 5. Task instance īŽ A task is generated when some specific event occurs. īŽ Real time tasks normally recur a large number of times at different instants of time depending on event occurrence time. īŽ Most real-time tasks recurs with certain fixed periods. īŽ E.g. : A temperature sensing task in chemical plant might recur indefinitely with a certain period because the temperature is sampled periodically, whereas a task handling a device interrupt might recur at random instants. N.Preetha/ME-I.
  • 6. Cont.. īŽ Each time a task recurs, it is called an instance of the task. The īŦrst time a task occurs, it is called the īŦrst instance of the task. īŽ The next occurrence of the task is called its second instance, and so on. īŽ The jth instance of a task Ti would be denoted as Ti(j). īŽ Each instance of a real-time task is associated with a deadline by which it needs to complete and produce results. N.Preetha/ME-I.
  • 7. Relative Deadline Vs Absolute Deadline Absolute Deadline īŽ The absolute deadline of a task is the ab-solute time value (counted from time 0) by which the results from the task are expected. īŽ Thus , absolute deadline is equal to the interval of time between the time 0 and the actual instant at which the deadline occurs as measured by some physical clock. Relative Deadline īŽ Relative deadline is the time in-terval between the start of the task and the instant at which the deadline occurs. īŽ In other words, relative deadline is the time interval between the arrival of a task and the corresponding dead-line. īŽ the relative deadline of the task Ti(1) is d, whereas its absolute dead-line is N.Preetha/ME-I.
  • 9. Response Time īŽ The response time of a task is the time it takes (as measured from the task arrival time) for the task to produce its results. īŽ As already remarked, task instances get generated due to occurrence of events. īŽ These events may be internal to the system, such as clock interrupts, or external to the system such as a robot encountering an obstacle. N.Preetha/ME-I.
  • 10. Task Precedence īŽ A task is said to precede another task,if the first task must complete before the second task can start. īŽ When a task Ti precedes Tj , then each instance of Ti precedes corresponding instance of Tj . īŽ A precedence order defines a partial order among tasks. īŽ E.g. : partial ordering among tasks - T1 precedes T2, but we cannot relate T1 with either T3 or T4. N.Preetha/ME-I.
  • 11. Data Sharing īŽ Tasks often need to share their results among each other when one task needs to share the results produced by another task; clearly, the second task must precede the īŦrst task. īŽ In fact, precedence relation between two tasks sometimes implies data sharing between the two tasks (e.g., īŦrst task passing some results to the second task). However, this is not always true. īŽ A task may be required to precede another even when there is no data sharing. īŽ E.g. in a chemical plant it may be required that the reaction chamber must be īŦlled with water before chemicals are introduced. N.Preetha/ME-I.
  • 12. Contâ€Ļ īŽ In this case, the task handling īŦlling up the reaction chamber with water must complete, before the task handling introduction of the chemicals is activated. īŽ It is, therefore, not appropriate to represent data sharing using precedence relation N.Preetha/ME-I.
  • 13. Contâ€Ļ īŽ Data sharing among the tasks does not necessarily impose any particular ordering among the tasks. īŽ Here, T2 uses the results of T3.T2 may even start executing first , after sometimes it may receive some data from T3, and continues its execution. N.Preetha/ME-I.
  • 14. TYPES OF REAL-TIME TASKS & THEIR CHARACTERISTICS īŽ Based on the way real-time tasks recur over a period of time, it is possible to classify them into three main categories: īŽ Periodic tasks īŽ Sporadic tasks īŽ Aperiodic tasks. N.Preetha/ME-I.
  • 15. Periodic Tasks īŽ A periodic task is one that repeats after a certain īŦxed time interval. īŽ Periodic tasks are sometimes referred to as clock-driven tasks. īŽ The īŦxed time interval after which a task repeats is called the period of the task. īŽ If Ti is a periodic task, then the time from 0 till the occurrence of the īŦrst instance of Ti(i.e., Ti(1)) is denoted by ; and is called the phase of the task. īŽ Periodic task Ti can be represented using four tuples: īŽ Pi -is the period of task, īŽ ei - is the worst case execution time of the task, īŽ di - is the relative deadline of the task. N.Preetha/ME-I.
  • 16. Cont.. īŽ A vast majority of the tasks present in a typical real-time system are periodic. īŽ for example, monitoring certain conditions, polling information from sensors at regular intervals to carry out certain action at regular intervals. īŽ The instances of the temperature, pressure, and chemical concentration monitoring tasks are normally generated through the interrupts received from a periodic timer. N.Preetha/ME-I.
  • 17. Sporadic Task īŽ A sporadic task is one that recurs at random instants. īŽ A sporadic task Ti can be is represented by three tuples: īŽ ei - worst case execution of instance of the task. īŽ gi - the minimum separation between two consecutive instances of the task. īŽ di - relative deadline. īŽ The minimum separation gi indicates that once an instance of a sporadic task occurs , the next instance cannot occur before gi time unit have elapsed. N.Preetha/ME-I.
  • 18. Cont.. īŽ E.g. In a robot a task that gets generated to handle an obstacle that appears suddenly is a sporadic task. īŽ In a factory , the task that handles fire condition is a sporadic task. īŽ Criticality varies from highly critical to moderately critical. īŽ E.g. an I/O interrupt or DMA interrupt is moderately critical. īŽ Task handling the reporting of fire condition is highly critical. N.Preetha/ME-I.
  • 19. Aperiodic Task īŽ An aperiodic task can arise at random instants. īŽ Two or more instances of an aperiodic task might occur at the same time instant because minimum separation gi,between two consecutive instances can be 0. īŽ Aperiodic task can recur in quick succession . It , therefore ,becomes very difficult to meet the deadlines of all instances of an aperiodic task. īŽ Soft real time systems can tolerate a few deadline misses .so ,aperiodic tasks are generally soft real time tasks. īŽ E.g. Logging task in a distributed systems. īŽ The logging task can be started by different tasks running on different nodes. īŽ The logging request from different tasks may arrive at the logger almost at the same time. īŽ Other egs are Keyboard presses, mouse movements etc.. N.Preetha/ME-I.
  • 20. Task scheduling īŽ Basic concepts īŽ Important concepts and terminologies for schedulers : īŽ Valid schedule īŽ Feasible schedule īŽ Proficient scheduler īŽ Optimal scheduler īŽ Scheduling Points īŽ Preemptive scheduler īŽ Utilization īŽ Jitter N.Preetha/ME-I.
  • 21. Description Valid schedule īŽ A valid schedule for set of tasks is one where at most one task is assigned to a processor at a time, no task is scheduled before its arrival time, and the precedence and resource constraints of all tasks are satisīŦed. Feasible schedule īŽ A valid schedule is called a feasible schedule, only if all tasks meet their respective time constraints in the schedule. N.Preetha/ME-I.
  • 22. Cont.. Proficient scheduler īŽ A task scheduler sch. 1 is said to be more proīŦcient than another scheduler sch. 2, if sch. 1can feasibly schedule all task sets that sch. 2can, but there exists at least one task set that sch. 2can not feasibly schedule, whereas sch. 1can. īŽ If sch. 1can feasibly schedule all task sets that sch. 2can feasibly schedule and vice versa, then sch. 1and sch. 2 are called equally proīŦcient schedulers. Optimal scheduler īŽ Optimal scheduler can feasibly schedule any task set that can be feasibly scheduled by any other scheduler. N.Preetha/ME-I.
  • 23. Cont.. īŽ In other words, it would not be possible to īŦnd a more proīŦcient scheduling algorithm than an optimal scheduler. īŽ If an optimal scheduler can not schedule some task set, then no other scheduler should be able to produce a feasible schedule for that task set. Scheduling Points īŽ The scheduling points of a scheduler are the points on time line at which the scheduler makes decisions regarding which task is to be run next. īŽ A task scheduler does not need to run continuously, it is activated by the operating system only at the scheduling points to make the scheduling decision as to which task to be run next. N.Preetha/ME-I.
  • 24. Cont.. Preemptive scheduler īŽ A preemptive scheduler is one which when a higher priority task arrives , suspends any lower priority task that may be executing and takes up the higher priority task for execution. īŽ A preempted lower priority task can resume its execution only when no higher priority task is ready. Utilization īŽ The utilization of a task is the average time for which it executes per unit time interval. īŽ For a periodic task Ti , utilization Ui is ei – execution time Pi – period of Ti N.Preetha/ME-I.
  • 25. Cont.. Jitter īŽ It is the deviation of a periodic task from its strict periodic behavior. īŽ The arrival time jitter is the deviation of the task from arriving at the precise periodic time of arrival. īŽ It may be caused by imprecise clocks , or other factors such as network congestions. īŽ The completion time jitter is the deviation of task from its prÊcised deadline. N.Preetha/ME-I.