SlideShare a Scribd company logo
1 of 38
Real-Time Operating Systems
RTOS
BY Abebe B.
For Embedded systems
Real-Time Systems
• Result in severe consequences if logical
and timing correctness are not met
• Two types exist
– Soft real-time
• Tasks are performed as fast as possible
• Late completion of jobs is undesirable but not
fatal.
• System performance degrades as more & more
jobs miss deadlines.
Real-Time Systems (cont.)
– Hard real-time
• Tasks have to be performed on time
• Failure to meet deadlines is fatal
• Example :
– Flight Control System
Hard and Soft Real Time Systems
(Operational Definition)
• Hard Real Time System
– Validation by provably correct procedures
or extensive simulation that the system
always meets the timings constraints
• Soft Real Time System
– Demonstration of jobs meeting some
statistical constraints suffices.
• Example – Multimedia System
– 25 frames per second on an average
Most Real-Time Systems are
embedded
• An embedded system is a computer built into
a system but not seen by users as being a
computer
• Examples
– FAX machines
– Copiers
– Printers
– Scanners
– Routers
– Robots
Role of an OS in Real Time Systems
• Standalone Applications
– Often no OS involved
– Micro controller based Embedded Systems
• Some Real Time Applications are huge &
complex
– Multiple threads
– Complicated Synchronization Requirements
– File system / Network / Windowing support
– OS primitives reduce the software design time
Features of Real Time OS
(RTOS)
• Scheduling.
• Resource Allocation.
• Interrupt Handling.
• Other issues like kernel size.
Scheduling in RTOS
• More information about the tasks are
known
– Number of tasks
– Resource Requirements
– 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
Scheduling Algorithms in RTOS (cont.)
• Clock Driven
– All parameters about jobs (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 (cont.)
• Weighted Round Robin
– Jobs scheduled in FIFO manner
– Time quantum given to jobs is proportional to it’s
weight
Scheduling Algorithms in RTOS (cont.)
• Priority Scheduling
– 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)
– slack = relative deadline – execution left
• Rate Monotonic Scheduling (RMS)
– For periodic tasks
– Tasks priority inversely proportional to it’s period
Schedulers
• Also called “dispatchers”
• Schedulers are parts of the kernel
responsible for determining which task
runs next
• Most real-time kernels use priority-
based scheduling
– Each task is assigned a priority based on its
importance
– The priority is application-specific
Preemptive Kernels
• The highest-priority task ready to run
is always given control of the CPU
– If an ISR makes a higher-priority task
ready, the higher-priority task is resumed
(instead of the interrupted task)
• Most commercial real-time kernels are
preemptive
Preemptive Kernels (cont.)
Advantages of Preemptive
Kernels
• Execution of the highest-priority task
is deterministic
Resource Allocation in RTOS
• Resource Allocation
– The issues with scheduling applicable here.
– Resources can be allocated in
• Weighted Round Robin
• Priority Based
• Priority inversion problem may occur if
priority scheduling is used
Assigning Task Priorities
• Not trivial
• In most systems, not all tasks are
critical
– Non-critical tasks are obviously low-
priorities
• Most real-time systems have a
combination of soft and hard
requirements
A Technique for Assigning Task
Priorities
• Rate Monotonic Scheduling (RMS)
– Priorities are based on how often tasks
execute
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
• Sophisticated features can be removed
– No Virtual Memory
– No Protection
Linux for Real Time Applications
• Scheduling
– Priority Driven Approach
• Optimize average case response time
– Interactive Processes Given Highest
Priority
• Aim to reduce response times of processes
– Real Time Processes
• Processes with high priority
• There was no notion of deadlines
Interrupt Handling in Linux
• Interrupts were disabled in ISR/critical
sections of the kernel
• There was no worst case bound on
interrupt latency avaliable
– eg: Disk Drivers might disable interrupt for
few hundred milliseconds
Interrupt Handling in Linux
(cont.)
• Linux was not suitable for Real Time
Applications
– Interrupts may be missed
Other Problems with Linux
• Processes were not preemtible in Kernel Mode
– System calls like fork take a lot of time
– High priority thread might wait for a low priority
thread to complete it’s system call
• Processes are heavy weight
– Context switch takes several hundred
microseconds
Part II
BY Abebe B.
Characteristics of a real-time
operating system
• Real-time operating systems generally
have the following characteristics:
– Small footprint. Compared to general
OSes, real-time operating systems are
lightweight.
– High performance. RTOSes are typically
fast and responsive.
– Determinism. Repeating inputs end in the
same output.
Cont.…
• Safety and security. Safety-critical and
security standards are typically the highest
priority, as RTOSes are frequently used in
critical systems.
• Priority-based scheduling.Tasks that are
assigned a high priority are executed first
followed by lower-priority jobs.
• Timing information. RTOSes are responsible
for timing and providing application
programming interface
What are Real-Time Operating
System?
There are several examples of RTOS that
are commonly used in embedded systems:
• FreeRTOS
• VxWorks
• QNX
• ThreadX
• Micrium µC/OS
• etc
What are the Best RTOS for
Embedded Systems?
• Choosing the best RTOS for an embedded
system depends on
– the specific requirements of the project,
– Including;
• size of the system,
• performance,
• memory footprint,
• available resources, and real time
requirements.
What are the Best RTOS for
Embedded Systems?
• FreeRTOS:
– It is a popular open-source, real-time
operating system that is designed to be small,
portable, and easy to use.
– FreeRTOS provides a rich set of features,
including task management, interrupt
handling, and synchronization mechanisms.
– It is widely used in various industries,
including automotive, aerospace, and
consumer electronics.
https://www.freertos.org/index.html
What are the Best RTOS for
Embedded Systems?
• Micrium µC/OS:
– It is a scalable, real-time operating
system that provides a robust set of
features for embedded systems.
Micrium µC/OS is widely used in
various industries, including medical
devices, industrial automation, and
telecommunications.
https://blackberry.qnx.com/en
What are the Best RTOS for
Embedded Systems?
• ThreadX:
– It is a small, fast, and efficient real-time
operating system that provides a reliable and
predictable environment for running real-
time applications.
– ThreadX is widely used in various industries,
including automotive, aerospace, and
consumer electronics.
https://www.embeddedtechnology.com/doc/threadx
-rtos-0001
What are the Best RTOS for
Embedded Systems?
• VxWorks:
– It is a real-time operating system that
provides a robust set of features for
embedded systems.
– VxWorks is widely used in various industries,
including aerospace, defense, and
telecommunications.
– For nearly 35 years, VxWorks has been used to
ensure the security, safety, and reliability you need to
design and build mission-critical embedded systems
that simply must work.
https://www.windriver.com/products/vxworks
What are the Best RTOS for
Embedded Systems?
• QNX:
– It is a real-time operating system that
provides a reliable and predictable
environment for running real-time
applications.
– QNX is widely used in various industries,
including automotive, medical devices,
and industrial automation.
Description and Application
RTOS Description Common Applications
FreeRTOS
An open-source RTOS with a lightweight
kernel. Widely used in embedded systems
and microcontrollers.
Embedded devices, IoT,
satellites, drones, robotics,
industrial automation.
VxWorks
A commercial RTOS known for reliability
and scalability. Used in aerospace,
automotive, and more.
Aerospace systems, automotive
control units, industrial
machinery.
QNX
Commercial RTOS with robustness and
fault tolerance. Supports multi-core
processors.
Automotive infotainment,
medical devices, industrial
automation.
ThreadX
Compact and efficient RTOS suitable for
resource-constrained devices.
Consumer electronics, networking
equipment, IoT devices.
Nucleus RTOS
Small-footprint RTOS by Mentor Graphics.
Used in various embedded systems.
Telecommunications, automotive,
consumer electronics.
 These RTOS options cater to different needs, from open-source flexibility
to commercial reliability, making them essential for time-critical applications.
Compare
RTOS Description Pros Cons
FreeRTOS
An open-source RTOS with a
lightweight kernel. Widely used in
embedded systems and
microcontrollers.
- Open-source: Easily accessible
and customizable.
- Small footprint: Suitable for
resource-constrained devices.
- Limited features: Basic
functionality; lacks some
advanced features. -
Community support: May
vary in quality.
VxWorks
A commercial RTOS known for
reliability and scalability. Used in
aerospace, automotive, and more.
- Robustness: Proven track record
in critical applications. -
Scalability: Supports complex
systems.
- Cost: Commercial license
required. - Learning
curve: Complex
configuration and setup.
QNX
Commercial RTOS with robustness
and fault tolerance. Supports multi-
core processors.
- Fault tolerance: High reliability
and fault recovery. - Multi-core
support: Efficient utilization.
- Cost: Commercial license
required. - Vendor
dependency: Tied to
BlackBerry.
ThreadX
Compact and efficient RTOS
suitable for resource-constrained
devices.
- Low overhead: Minimal impact
on system resources. - Certified:
Used in safety-critical
applications.
- Proprietary: Closed-
source with licensing fees. -
Limited community:
Smaller user base.
Nucleus
RTOS
Small-footprint RTOS by Mentor
Graphics. Used in various
embedded systems.
- Small footprint: Ideal for
memory-constrained devices. -
Scalability: Supports various
architectures.
- Commercial license:
Requires licensing. -
Vendor-specific: Tied to
Mentor Graphics.
Next>>>Hardware Elements of Embedded System

More Related Content

Similar to Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt

rtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfrtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfreemasajin1
 
13086000.ppt
13086000.ppt13086000.ppt
13086000.pptyibe5
 
Real time operating system
Real time operating systemReal time operating system
Real time operating systemKamran Khan
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsDr.YNM
 
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
 
Insider operating system
Insider   operating systemInsider   operating system
Insider operating systemAditi Saxena
 
Real-Time Systems Intro.pptx
Real-Time Systems Intro.pptxReal-Time Systems Intro.pptx
Real-Time Systems Intro.pptx20EUEE018DEEPAKM
 
pptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfpptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfJaganBehera8
 
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjadugnanegero
 
Real Time Operating Systems for Embedded Systems
Real Time Operating Systems for Embedded SystemsReal Time Operating Systems for Embedded Systems
Real Time Operating Systems for Embedded SystemsAditya Vichare
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating SystemsPawandeep Kaur
 
How to Measure RTOS Performance
How to Measure RTOS Performance How to Measure RTOS Performance
How to Measure RTOS Performance mentoresd
 
ppt2.pptx
ppt2.pptxppt2.pptx
ppt2.pptxchere3
 
Introduction to Embedded system
Introduction to Embedded systemIntroduction to Embedded system
Introduction to Embedded systemtmnportal
 

Similar to Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt (20)

Rtos by shibu
Rtos by shibuRtos by shibu
Rtos by shibu
 
RTOS [Autosaved].pptx
RTOS [Autosaved].pptxRTOS [Autosaved].pptx
RTOS [Autosaved].pptx
 
rtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfrtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdf
 
rtos.ppt
rtos.pptrtos.ppt
rtos.ppt
 
13086000.ppt
13086000.ppt13086000.ppt
13086000.ppt
 
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 (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systems
 
Autosar Basics hand book_v1
Autosar Basics  hand book_v1Autosar Basics  hand book_v1
Autosar Basics hand book_v1
 
Rtos
RtosRtos
Rtos
 
Insider operating system
Insider   operating systemInsider   operating system
Insider operating system
 
Real-Time Systems Intro.pptx
Real-Time Systems Intro.pptxReal-Time Systems Intro.pptx
Real-Time Systems Intro.pptx
 
pptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfpptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdf
 
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
 
Real Time Operating Systems for Embedded Systems
Real Time Operating Systems for Embedded SystemsReal Time Operating Systems for Embedded Systems
Real Time Operating Systems for Embedded Systems
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
module1.pptx
module1.pptxmodule1.pptx
module1.pptx
 
How to Measure RTOS Performance
How to Measure RTOS Performance How to Measure RTOS Performance
How to Measure RTOS Performance
 
ppt2.pptx
ppt2.pptxppt2.pptx
ppt2.pptx
 
Introduction to Embedded system
Introduction to Embedded systemIntroduction to Embedded system
Introduction to Embedded system
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
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
 
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
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
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
 
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
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
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
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
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
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt

  • 1. Real-Time Operating Systems RTOS BY Abebe B. For Embedded systems
  • 2. Real-Time Systems • Result in severe consequences if logical and timing correctness are not met • Two types exist – Soft real-time • Tasks are performed as fast as possible • Late completion of jobs is undesirable but not fatal. • System performance degrades as more & more jobs miss deadlines.
  • 3. Real-Time Systems (cont.) – Hard real-time • Tasks have to be performed on time • Failure to meet deadlines is fatal • Example : – Flight Control System
  • 4. Hard and Soft Real Time Systems (Operational Definition) • Hard Real Time System – Validation by provably correct procedures or extensive simulation that the system always meets the timings constraints • Soft Real Time System – Demonstration of jobs meeting some statistical constraints suffices. • Example – Multimedia System – 25 frames per second on an average
  • 5. Most Real-Time Systems are embedded • An embedded system is a computer built into a system but not seen by users as being a computer • Examples – FAX machines – Copiers – Printers – Scanners – Routers – Robots
  • 6. Role of an OS in Real Time Systems • Standalone Applications – Often no OS involved – Micro controller based Embedded Systems • Some Real Time Applications are huge & complex – Multiple threads – Complicated Synchronization Requirements – File system / Network / Windowing support – OS primitives reduce the software design time
  • 7. Features of Real Time OS (RTOS) • Scheduling. • Resource Allocation. • Interrupt Handling. • Other issues like kernel size.
  • 8. Scheduling in RTOS • More information about the tasks are known – Number of tasks – Resource Requirements – Execution time – Deadlines • Being a more deterministic system better scheduling algorithms can be devised.
  • 9. Scheduling Algorithms in RTOS • Clock Driven Scheduling • Weighted Round Robin Scheduling • Priority Scheduling
  • 10. Scheduling Algorithms in RTOS (cont.) • Clock Driven – All parameters about jobs (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.
  • 11. Scheduling Algorithms in RTOS (cont.) • Weighted Round Robin – Jobs scheduled in FIFO manner – Time quantum given to jobs is proportional to it’s weight
  • 12. Scheduling Algorithms in RTOS (cont.) • Priority Scheduling – Processor never left idle when there are ready tasks – Processor allocated to processes according to priorities – Priorities • Static - at design time • Dynamic - at runtime
  • 13. Priority Scheduling • Earliest Deadline First (EDF) – Process with earliest deadline given highest priority • Least Slack Time First (LSF) – slack = relative deadline – execution left • Rate Monotonic Scheduling (RMS) – For periodic tasks – Tasks priority inversely proportional to it’s period
  • 14. Schedulers • Also called “dispatchers” • Schedulers are parts of the kernel responsible for determining which task runs next • Most real-time kernels use priority- based scheduling – Each task is assigned a priority based on its importance – The priority is application-specific
  • 15. Preemptive Kernels • The highest-priority task ready to run is always given control of the CPU – If an ISR makes a higher-priority task ready, the higher-priority task is resumed (instead of the interrupted task) • Most commercial real-time kernels are preemptive
  • 17. Advantages of Preemptive Kernels • Execution of the highest-priority task is deterministic
  • 18. Resource Allocation in RTOS • Resource Allocation – The issues with scheduling applicable here. – Resources can be allocated in • Weighted Round Robin • Priority Based • Priority inversion problem may occur if priority scheduling is used
  • 19. Assigning Task Priorities • Not trivial • In most systems, not all tasks are critical – Non-critical tasks are obviously low- priorities • Most real-time systems have a combination of soft and hard requirements
  • 20. A Technique for Assigning Task Priorities • Rate Monotonic Scheduling (RMS) – Priorities are based on how often tasks execute
  • 21. 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 • Sophisticated features can be removed – No Virtual Memory – No Protection
  • 22. Linux for Real Time Applications • Scheduling – Priority Driven Approach • Optimize average case response time – Interactive Processes Given Highest Priority • Aim to reduce response times of processes – Real Time Processes • Processes with high priority • There was no notion of deadlines
  • 23. Interrupt Handling in Linux • Interrupts were disabled in ISR/critical sections of the kernel • There was no worst case bound on interrupt latency avaliable – eg: Disk Drivers might disable interrupt for few hundred milliseconds
  • 24. Interrupt Handling in Linux (cont.) • Linux was not suitable for Real Time Applications – Interrupts may be missed
  • 25. Other Problems with Linux • Processes were not preemtible in Kernel Mode – System calls like fork take a lot of time – High priority thread might wait for a low priority thread to complete it’s system call • Processes are heavy weight – Context switch takes several hundred microseconds
  • 27. Characteristics of a real-time operating system • Real-time operating systems generally have the following characteristics: – Small footprint. Compared to general OSes, real-time operating systems are lightweight. – High performance. RTOSes are typically fast and responsive. – Determinism. Repeating inputs end in the same output.
  • 28. Cont.… • Safety and security. Safety-critical and security standards are typically the highest priority, as RTOSes are frequently used in critical systems. • Priority-based scheduling.Tasks that are assigned a high priority are executed first followed by lower-priority jobs. • Timing information. RTOSes are responsible for timing and providing application programming interface
  • 29. What are Real-Time Operating System? There are several examples of RTOS that are commonly used in embedded systems: • FreeRTOS • VxWorks • QNX • ThreadX • Micrium µC/OS • etc
  • 30. What are the Best RTOS for Embedded Systems? • Choosing the best RTOS for an embedded system depends on – the specific requirements of the project, – Including; • size of the system, • performance, • memory footprint, • available resources, and real time requirements.
  • 31. What are the Best RTOS for Embedded Systems? • FreeRTOS: – It is a popular open-source, real-time operating system that is designed to be small, portable, and easy to use. – FreeRTOS provides a rich set of features, including task management, interrupt handling, and synchronization mechanisms. – It is widely used in various industries, including automotive, aerospace, and consumer electronics. https://www.freertos.org/index.html
  • 32. What are the Best RTOS for Embedded Systems? • Micrium µC/OS: – It is a scalable, real-time operating system that provides a robust set of features for embedded systems. Micrium µC/OS is widely used in various industries, including medical devices, industrial automation, and telecommunications. https://blackberry.qnx.com/en
  • 33. What are the Best RTOS for Embedded Systems? • ThreadX: – It is a small, fast, and efficient real-time operating system that provides a reliable and predictable environment for running real- time applications. – ThreadX is widely used in various industries, including automotive, aerospace, and consumer electronics. https://www.embeddedtechnology.com/doc/threadx -rtos-0001
  • 34. What are the Best RTOS for Embedded Systems? • VxWorks: – It is a real-time operating system that provides a robust set of features for embedded systems. – VxWorks is widely used in various industries, including aerospace, defense, and telecommunications. – For nearly 35 years, VxWorks has been used to ensure the security, safety, and reliability you need to design and build mission-critical embedded systems that simply must work. https://www.windriver.com/products/vxworks
  • 35. What are the Best RTOS for Embedded Systems? • QNX: – It is a real-time operating system that provides a reliable and predictable environment for running real-time applications. – QNX is widely used in various industries, including automotive, medical devices, and industrial automation.
  • 36. Description and Application RTOS Description Common Applications FreeRTOS An open-source RTOS with a lightweight kernel. Widely used in embedded systems and microcontrollers. Embedded devices, IoT, satellites, drones, robotics, industrial automation. VxWorks A commercial RTOS known for reliability and scalability. Used in aerospace, automotive, and more. Aerospace systems, automotive control units, industrial machinery. QNX Commercial RTOS with robustness and fault tolerance. Supports multi-core processors. Automotive infotainment, medical devices, industrial automation. ThreadX Compact and efficient RTOS suitable for resource-constrained devices. Consumer electronics, networking equipment, IoT devices. Nucleus RTOS Small-footprint RTOS by Mentor Graphics. Used in various embedded systems. Telecommunications, automotive, consumer electronics.  These RTOS options cater to different needs, from open-source flexibility to commercial reliability, making them essential for time-critical applications.
  • 37. Compare RTOS Description Pros Cons FreeRTOS An open-source RTOS with a lightweight kernel. Widely used in embedded systems and microcontrollers. - Open-source: Easily accessible and customizable. - Small footprint: Suitable for resource-constrained devices. - Limited features: Basic functionality; lacks some advanced features. - Community support: May vary in quality. VxWorks A commercial RTOS known for reliability and scalability. Used in aerospace, automotive, and more. - Robustness: Proven track record in critical applications. - Scalability: Supports complex systems. - Cost: Commercial license required. - Learning curve: Complex configuration and setup. QNX Commercial RTOS with robustness and fault tolerance. Supports multi- core processors. - Fault tolerance: High reliability and fault recovery. - Multi-core support: Efficient utilization. - Cost: Commercial license required. - Vendor dependency: Tied to BlackBerry. ThreadX Compact and efficient RTOS suitable for resource-constrained devices. - Low overhead: Minimal impact on system resources. - Certified: Used in safety-critical applications. - Proprietary: Closed- source with licensing fees. - Limited community: Smaller user base. Nucleus RTOS Small-footprint RTOS by Mentor Graphics. Used in various embedded systems. - Small footprint: Ideal for memory-constrained devices. - Scalability: Supports various architectures. - Commercial license: Requires licensing. - Vendor-specific: Tied to Mentor Graphics.
  • 38. Next>>>Hardware Elements of Embedded System

Editor's Notes

  1. Aerospace Systems: Aerospace systems refer to a wide range of technologies, vehicles, and equipment related to both aeronautics (the study of flight within Earth’s atmosphere) and astronautics (the study of space travel beyond Earth’s atmosphere). These systems encompass everything from commercial airplanes and satellites to rockets, drones, and spacecraft. Aerospace systems play a critical role in transportation, communication, scientific exploration, national defense, and more.