SlideShare a Scribd company logo
1 of 18
1.Real Time Systems
Presentation Outline
Definitions
Types
Features of Real Time Operating
Systems
 Scheduling
 Resource Allocation
 Other Issues
Real Time System
A system is said to be Real Time if
it is required to complete it’s work
& deliver it’s services on time.
Example – Flight Control System
 All tasks in that system must execute
on time.
Hard and Soft Real Time Systems
Hard Real Time System
 Failure to meet deadlines is fatal
 example : Flight Control System
Soft Real Time System
 Late completion of jobs is undesirable but not
fatal.
 System performance degrades as more & more
jobs miss deadlines
 Online Databases, Multimedia System,Video
Streaming System
Some Definitions
Timing constraint: constraint imposed on timing
behavior of a job: hard or soft.
Release Time: Instant of time job becomes
available for execution. If all jobs are released when
the system begins execution, then there is said to be
no release time
Deadline: Instant of time a job's execution is
required to be completed. If deadline is infinity, then
job has no deadline. Absolute deadline is equal to
release time plus relative deadline
Response time: Length of time from release time to
instant job completes.
Tasks and Jobs: Definitions
A task is like a process or thread in an
OS.
Task─ term used for the process in the
RTOSes for the embedded systems.
For example, VxWorks and μCOS-II
are the RTOSes, which use the term
task.
Job (Jij): Unit of work, scheduled and
executed by system.
Features of RTOS’s
Scheduling.
Resource Allocation.
Interrupt Handling.
Other issues like kernel size.
Other Features Of RTOS’s
1. Real-Time Operations i.e. Perform
immediate operations when needed
2. Low Power Consumption, i.e. no
power consumption when not doing any
work
3. RTOS usually has the basic and
common features of OS to eliminate
complexity.
4. Simple device interface.
Scheduling in RTOS
More information about the tasks are known
 No of tasks
 Resource Requirements
 Release Time
 Execution time
 Deadlines
Being a more deterministic system better
scheduling algorithms can be devised.
Scheduling Algorithms in RTOS
Clock Driven Scheduling
Weighted Round Robin Scheduling
Priority Scheduling
(Greedy / List / Event Driven)
Scheduling Algorithms in RTOS (contd)
Clock Driven
 All parameters about jobs (release time/
execution time/deadline) known in
advance.
 Schedule can be computed offline or at
some regular time instances.
 Minimal runtime overhead.
 Not suitable for many applications.
Scheduling Algorithms in RTOS (contd)
Weighted Round Robin
 Jobs scheduled in FIFO manner
 Time quantum given to jobs is proportional to it’s
weight
 Example use : High speed switching network
 QOS guarantee.
 Not suitable for precedence constrained jobs.
 Job A can run only after Job B. No point in giving time
quantum to Job B before Job A.
Scheduling Algorithms in RTOS (contd)
Priority Scheduling
(Greedy/List/Event Driven)
 Processor never left idle when there are
ready tasks
 Processor allocated to processes according
to priorities
 Priorities
 static - at design time
 Dynamic - at runtime
Priority Scheduling
Earliest Deadline First (EDF)
 Process with earliest deadline given highest priority
Least Slack Time First (LSF):-Least Slack Time (LST)
scheduling is a scheduling algorithm. It assigns priority based
on the slack time of a process. Slack time is the amount of time
left after a job if the job was started now.
 slack = relative deadline – execution left
Rate Monotonic Scheduling (RMS):-In computer science, rate-
monotonic scheduling (RMS) is a scheduling algorithm used
in real-time operating systems with a static-priority scheduling
class. The static priorities are assigned on the basis of the cycle
duration of the job: the shorter the cycle duration is, the higher
is the job's priority.
Resource Allocation in RTOS
Resource Allocation
 The issues with scheduling applicable here.
 Resources can be allocated based on
 Weighted Round Robin
 Priority Based
Some resources are non preemptible
 Example : semaphores
Priority Inversion if priority scheduling is used
Priority inversion
priority inversion is a problematic
scenario in scheduling in which a high
priority task is indirectly preempted by a
medium priority task effectively
"inverting" the relative priorities of the
two tasks.
Solutions to Priority Inversion
Non Blocking Critical Section
 Higher priority Thread may get blocked by
unrelated low priority thread
Priority Ceiling
 Each resource has an assigned priority
 Priority of thread is the highest of all priorities of
the resources it’s holding
Priority Inheritance
 The thread holding a resource inherits the priority
of the thread blocked on that resource
Other RTOS issues
Interrupt Latency should be very small
 Kernel has to respond to real time events
 Interrupts should be disabled for minimum
possible time
For embedded applications Kernel Size
should be small
 Should fit in ROM

More Related Content

What's hot

Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddik
Saeed Siddik
 

What's hot (20)

Operating Systems Part III-Memory Management
Operating Systems Part III-Memory ManagementOperating Systems Part III-Memory Management
Operating Systems Part III-Memory Management
 
Unit II - 1 - Operating System Process
Unit II - 1 - Operating System ProcessUnit II - 1 - Operating System Process
Unit II - 1 - Operating System Process
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddik
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusionLamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Operating System-Ch8 memory management
Operating System-Ch8 memory managementOperating System-Ch8 memory management
Operating System-Ch8 memory management
 
Resource management
Resource managementResource management
Resource management
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 
Uncertainty in AI
Uncertainty in AIUncertainty in AI
Uncertainty in AI
 
Planning in AI(Partial order planning)
Planning in AI(Partial order planning)Planning in AI(Partial order planning)
Planning in AI(Partial order planning)
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Memory management
Memory managementMemory management
Memory management
 
Rtos
RtosRtos
Rtos
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
 
Real time-system
Real time-systemReal time-system
Real time-system
 
OS Functions and Services
OS Functions and ServicesOS Functions and Services
OS Functions and Services
 

Similar to RTOS

capacityshifting1
capacityshifting1capacityshifting1
capacityshifting1
Gokul Vasan
 
Real time os(suga)
Real time os(suga) Real time os(suga)
Real time os(suga)
Nagarajan
 

Similar to RTOS (20)

rtos.ppt
rtos.pptrtos.ppt
rtos.ppt
 
Rtos
RtosRtos
Rtos
 
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
 
Lab3F22.pdf
Lab3F22.pdfLab3F22.pdf
Lab3F22.pdf
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
 
task_sched2.ppt
task_sched2.ppttask_sched2.ppt
task_sched2.ppt
 
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
 
capacityshifting1
capacityshifting1capacityshifting1
capacityshifting1
 
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
 
Rtos
RtosRtos
Rtos
 
Scheduling and Scheduler's Process and Premptive
Scheduling and Scheduler's Process and PremptiveScheduling and Scheduler's Process and Premptive
Scheduling and Scheduler's Process and Premptive
 
FreeRTOS basics (Real time Operating System)
FreeRTOS basics (Real time Operating System)FreeRTOS basics (Real time Operating System)
FreeRTOS basics (Real time Operating System)
 
Process management
Process managementProcess management
Process management
 
Real time os(suga)
Real time os(suga) Real time os(suga)
Real time os(suga)
 
ERTS UNIT 5.pptx
ERTS UNIT 5.pptxERTS UNIT 5.pptx
ERTS UNIT 5.pptx
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Cp usched 2
Cp usched  2Cp usched  2
Cp usched 2
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling Algorithms
 
RTOS
RTOSRTOS
RTOS
 

Recently uploaded

Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
BalamuruganV28
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
IJECEIAES
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 

Recently uploaded (20)

Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 

RTOS

  • 2. Presentation Outline Definitions Types Features of Real Time Operating Systems  Scheduling  Resource Allocation  Other Issues
  • 3. Real Time System A system is said to be Real Time if it is required to complete it’s work & deliver it’s services on time. Example – Flight Control System  All tasks in that system must execute on time.
  • 4. Hard and Soft Real Time Systems Hard Real Time System  Failure to meet deadlines is fatal  example : Flight Control System Soft Real Time System  Late completion of jobs is undesirable but not fatal.  System performance degrades as more & more jobs miss deadlines  Online Databases, Multimedia System,Video Streaming System
  • 5. Some Definitions Timing constraint: constraint imposed on timing behavior of a job: hard or soft. Release Time: Instant of time job becomes available for execution. If all jobs are released when the system begins execution, then there is said to be no release time Deadline: Instant of time a job's execution is required to be completed. If deadline is infinity, then job has no deadline. Absolute deadline is equal to release time plus relative deadline Response time: Length of time from release time to instant job completes.
  • 6. Tasks and Jobs: Definitions A task is like a process or thread in an OS. Task─ term used for the process in the RTOSes for the embedded systems. For example, VxWorks and μCOS-II are the RTOSes, which use the term task. Job (Jij): Unit of work, scheduled and executed by system.
  • 7. Features of RTOS’s Scheduling. Resource Allocation. Interrupt Handling. Other issues like kernel size.
  • 8. Other Features Of RTOS’s 1. Real-Time Operations i.e. Perform immediate operations when needed 2. Low Power Consumption, i.e. no power consumption when not doing any work 3. RTOS usually has the basic and common features of OS to eliminate complexity. 4. Simple device interface.
  • 9. Scheduling in RTOS More information about the tasks are known  No of tasks  Resource Requirements  Release Time  Execution time  Deadlines Being a more deterministic system better scheduling algorithms can be devised.
  • 10. Scheduling Algorithms in RTOS Clock Driven Scheduling Weighted Round Robin Scheduling Priority Scheduling (Greedy / List / Event Driven)
  • 11. Scheduling Algorithms in RTOS (contd) Clock Driven  All parameters about jobs (release time/ execution time/deadline) known in advance.  Schedule can be computed offline or at some regular time instances.  Minimal runtime overhead.  Not suitable for many applications.
  • 12. Scheduling Algorithms in RTOS (contd) Weighted Round Robin  Jobs scheduled in FIFO manner  Time quantum given to jobs is proportional to it’s weight  Example use : High speed switching network  QOS guarantee.  Not suitable for precedence constrained jobs.  Job A can run only after Job B. No point in giving time quantum to Job B before Job A.
  • 13. Scheduling Algorithms in RTOS (contd) Priority Scheduling (Greedy/List/Event Driven)  Processor never left idle when there are ready tasks  Processor allocated to processes according to priorities  Priorities  static - at design time  Dynamic - at runtime
  • 14. Priority Scheduling Earliest Deadline First (EDF)  Process with earliest deadline given highest priority Least Slack Time First (LSF):-Least Slack Time (LST) scheduling is a scheduling algorithm. It assigns priority based on the slack time of a process. Slack time is the amount of time left after a job if the job was started now.  slack = relative deadline – execution left Rate Monotonic Scheduling (RMS):-In computer science, rate- monotonic scheduling (RMS) is a scheduling algorithm used in real-time operating systems with a static-priority scheduling class. The static priorities are assigned on the basis of the cycle duration of the job: the shorter the cycle duration is, the higher is the job's priority.
  • 15. Resource Allocation in RTOS Resource Allocation  The issues with scheduling applicable here.  Resources can be allocated based on  Weighted Round Robin  Priority Based Some resources are non preemptible  Example : semaphores Priority Inversion if priority scheduling is used
  • 16. Priority inversion priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a medium priority task effectively "inverting" the relative priorities of the two tasks.
  • 17. Solutions to Priority Inversion Non Blocking Critical Section  Higher priority Thread may get blocked by unrelated low priority thread Priority Ceiling  Each resource has an assigned priority  Priority of thread is the highest of all priorities of the resources it’s holding Priority Inheritance  The thread holding a resource inherits the priority of the thread blocked on that resource
  • 18. Other RTOS issues Interrupt Latency should be very small  Kernel has to respond to real time events  Interrupts should be disabled for minimum possible time For embedded applications Kernel Size should be small  Should fit in ROM