SlideShare a Scribd company logo
RTOS
Design & Implementation
Introduction
 A variant of OS that operates in
constrained environment in which
computer memory and processing
power is limited. Moreover they often
need to provide their services in
definite amount of time.
 Hard, Soft & Firm RTOS
 Example RTOS: VxWorks, pSOS,
Nucleus, RTLinux…
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
Structure of a RTOS
Custom-Hardware
RTOS-kernel
Applications
BSP
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
Components of RTOS
 The most important
component of RTOS is its
kernel (Monolithic & Microkernel).
 BSP or Board Support
Package makes an RTOS
target-specific (It’s a processor specific
code onto (processor) which we like to have our
RTOS running).
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Tasks(1)
 A task is basic unit of
execution in RTOS.
 RTOS scheduler needs to be
deterministic ~ O(1) or O(n).
Scheduling policies that are
available in a RTOS are:
Clock driven
Priority driven (RMS & EDF)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Tasks(2)
.
.
TID
SAVED_TASK_STATE
Resource 1 (signals)
Resource 2 (events)
Resource 3 (shared memory)
System Variables
Task Control Block
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Tasks(3)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Tasks(4)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Tasks(5)
RMS, EDF
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Tasks(6)
 XXX_CreateTask
 XXX_AddtoProcessQueue
 XXX_ChangePriority
 XXX_KillTask
 XXX_CreateTaskQueues
…
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Memory(1)
 Memory is premium in
environments where RTOS
work.
 Supports Virtual Memory
(MMU) and Memory
Protection (MPU) models.
 User space and Kernel space
memory.
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Memory(2)
Virtual Memory Concept
Physical Address Virtual AddressM
.
.
.
.
.
PHY1 VIRT1
PHY2 VIRT2
PHY3 VIRT3
PHY4 VIRT4
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Memory(3)
Virtual Memory Concept
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Memory(4)
Participation of User space programs with kernel for
services and as a central pool of memory for
specialized applications.
Kernel Space Memory
User Space memory
P1 P2
M1 M2
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Memory(5)
 XXX_Kmap
 XXX_PassToUserSpace
 XXX_Mmap
 XXX_PurgeMemory/Kfree
 XXX_Kmalloc
…
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Timer(1)
 Timer is software entity
derived from hardware clock.
 Timer provides mechanism to
introduce task-delays and/or
to help synchronize and
provide time off-course.
 Watchdog Timers,
Programmable Timers
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Timer(2)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Timer(3)
 Based upon these hardware-
programmable timers, RTOS
kernel can use to create
software structures of timers
associated with tasks.
 Scheduling, Synchronization,
time-stamping…
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: Timer(4)
 XXX_SetTimer
 XXX_AddtoTimerQueue
 XXX_isExpired
 XXX_RunAtExpiry
 XXX_PurgeTimerQueue
…
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: I/O(1)
 I/O is slow as compared to
CPU.
 I/O: Interrupt-driven, Polling,
DMA.
 I/O map: Memory Space & IO
Space.
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: I/O(2)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: I/O(3)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: I/O(4)
DMA driven I/O• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: I/O(5)
 XXX_IORead/IOWrite
 XXX_IOMap/Unmap
 XXX_BindInterrupt
…
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Inter-process Communication(1)
 Most of the time tasks cannot
run in isolation. They require
to talk to each other.
 Synchronization, Protection
and Sharing are goals of IPC.
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Inter-process Communication(2)
 Semaphores
(Binary, Mutual)
 Message Queues
 Pipes/Named
Pipes
 Shared Memory
 Signals/Slots
 Mail slots
 Sockets/XTI …
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Inter-process Communication(3)
 A common
shared data-
structure
residing in
kernel or user
space.
 Mechanism to
access it.
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Device Drivers(1)
 A piece of software that enables
devices connected to particular
processor, via various
interfaces.
 Controls, manages and
configures devices connected to
system.
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Device Drivers(2)
Client Drivers
Protocol Layers
Host Controller Drivers
Hardware
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Device Drivers(3)
 A host controller driver enables
system to accept a particular type of
device.
 Client drivers are device specific.
 Protocol layer converts device
request to form that is understood
by corresponding host controllers
through their drivers.
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
Expectations from RTOS
 Deadline-driven
 Work with Dearth of Resources
 Intricate I/O interfaces (Touch
panels, Push buttons …)
 Fail-safe and Robust
 Availability
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
An Example RTOS
EMERALDS architecture
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
Relevant books and
websites
 http://www.intelinfo.com/it_training_materials_and_books/free_real_time_
operating_systems_training_materials.html
 Linux Device Drivers – Alexander Rubini, Oreilly publications
 http://www.ddjembedded.com : Dr. Dobb’s Journal
 http://www.embedded.com
Some RTOS based Embedded Systems
 http://www.ll.mit.edu/HPEC/agendas/proc02/abstracts/ahlander.pdf
 http://www.cs.berkeley.edu/~culler/cs294-f03/papers/emeralds.pdf

More Related Content

What's hot

Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
Praveen Penumathsa
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
Sundaresan Sundar
 
Design for Testability
Design for TestabilityDesign for Testability
Design for Testability
Stanislav Tiurikov
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMprakrutijsh
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
Vijay Kumar
 
ASIC vs SOC vs FPGA
ASIC  vs SOC  vs FPGAASIC  vs SOC  vs FPGA
ASIC vs SOC vs FPGA
Verification Excellence
 
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSINTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
JOLLUSUDARSHANREDDY
 
Embedded c
Embedded cEmbedded c
Embedded c
Ami Prakash
 
What is JTAG?
What is JTAG?What is JTAG?
What is JTAG?
killerdolton
 
SoC Design
SoC DesignSoC Design
Processes and threads
Processes and threadsProcesses and threads
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Dilum Bandara
 
Linux device drivers
Linux device drivers Linux device drivers
Spectre & Meltdown
Spectre & MeltdownSpectre & Meltdown
Spectre & Meltdown
Murray Security Services
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
Vinit Raut
 
Microcontroller part 1
Microcontroller part 1Microcontroller part 1
Microcontroller part 1
Keroles karam khalil
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
anishgoel
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
deval patel
 

What's hot (20)

Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
Design for Testability
Design for TestabilityDesign for Testability
Design for Testability
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
ASIC vs SOC vs FPGA
ASIC  vs SOC  vs FPGAASIC  vs SOC  vs FPGA
ASIC vs SOC vs FPGA
 
SOC design
SOC design SOC design
SOC design
 
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSINTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
 
Embedded c
Embedded cEmbedded c
Embedded c
 
What is JTAG?
What is JTAG?What is JTAG?
What is JTAG?
 
SoC Design
SoC DesignSoC Design
SoC Design
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Spectre & Meltdown
Spectre & MeltdownSpectre & Meltdown
Spectre & Meltdown
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Microcontroller part 1
Microcontroller part 1Microcontroller part 1
Microcontroller part 1
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 

Viewers also liked

RTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draftRTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draft
Jou Neo
 
Rtos by shibu
Rtos by shibuRtos by shibu
Rtos by shibu
Shibu Krishnan
 
RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems
Bayar shahab
 
Introduction to RTOS
Introduction to RTOSIntroduction to RTOS
Introduction to RTOS
Yong Heui Cho
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOS
Vishwa Mohan
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and Concepts
Dr.YNM
 
Noyau temps réel freertos cheriet mohammed el amine
Noyau temps réel freertos cheriet mohammed el amineNoyau temps réel freertos cheriet mohammed el amine
Noyau temps réel freertos cheriet mohammed el amine
CHERIET Mohammed El Amine
 

Viewers also liked (8)

RTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draftRTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draft
 
Rtos part2
Rtos part2Rtos part2
Rtos part2
 
Rtos by shibu
Rtos by shibuRtos by shibu
Rtos by shibu
 
RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems
 
Introduction to RTOS
Introduction to RTOSIntroduction to RTOS
Introduction to RTOS
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOS
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and Concepts
 
Noyau temps réel freertos cheriet mohammed el amine
Noyau temps réel freertos cheriet mohammed el amineNoyau temps réel freertos cheriet mohammed el amine
Noyau temps réel freertos cheriet mohammed el amine
 

Similar to Rtos

Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
Ashwani Garg
 
What Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaWhat Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versa
Brendan Gregg
 
Operating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware BasicsOperating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware Basics
Peter Tröger
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
Pratik Gohel
 
POWER ISA introduction and what’s new in ISA V3.1 (Overview)
POWER ISA introduction and what’s new in ISA V3.1 (Overview)POWER ISA introduction and what’s new in ISA V3.1 (Overview)
POWER ISA introduction and what’s new in ISA V3.1 (Overview)
Ganesan Narayanasamy
 
Large Scale Computing Infrastructure - Nautilus
Large Scale Computing Infrastructure - NautilusLarge Scale Computing Infrastructure - Nautilus
Large Scale Computing Infrastructure - Nautilus
Gabriele Di Bernardo
 
L11-RTOS.ppt
L11-RTOS.pptL11-RTOS.ppt
L11-RTOS.ppt
DrAVaniprabhasns
 
ch1.ppt
ch1.pptch1.ppt
RTOS [Autosaved].pptx
RTOS [Autosaved].pptxRTOS [Autosaved].pptx
RTOS [Autosaved].pptx
AswathRangaraj1
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdf
wisard1
 
Challenges in Embedded Computing
Challenges in Embedded ComputingChallenges in Embedded Computing
Challenges in Embedded Computing
Pradeep Kumar TS
 
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .pptReal-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
lematadese670
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Adam Dunkels
 
Lecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptxLecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptx
SekharSankuri1
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CanSecWest
 
Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.
Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.
Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.
Atollic
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architecture
Taha Malampatti
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.ppt
FarhanaMariyam1
 

Similar to Rtos (20)

Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
What Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaWhat Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versa
 
Operating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware BasicsOperating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware Basics
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
POWER ISA introduction and what’s new in ISA V3.1 (Overview)
POWER ISA introduction and what’s new in ISA V3.1 (Overview)POWER ISA introduction and what’s new in ISA V3.1 (Overview)
POWER ISA introduction and what’s new in ISA V3.1 (Overview)
 
Large Scale Computing Infrastructure - Nautilus
Large Scale Computing Infrastructure - NautilusLarge Scale Computing Infrastructure - Nautilus
Large Scale Computing Infrastructure - Nautilus
 
L11-RTOS.ppt
L11-RTOS.pptL11-RTOS.ppt
L11-RTOS.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
RTOS [Autosaved].pptx
RTOS [Autosaved].pptxRTOS [Autosaved].pptx
RTOS [Autosaved].pptx
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdf
 
Challenges in Embedded Computing
Challenges in Embedded ComputingChallenges in Embedded Computing
Challenges in Embedded Computing
 
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .pptReal-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
 
gg
gggg
gg
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
 
Lecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptxLecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptx
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
 
Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.
Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.
Advanced debugging on ARM Cortex devices such as STM32, Kinetis, LPC, etc.
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architecture
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.ppt
 

Recently uploaded

Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 

Recently uploaded (20)

Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 

Rtos

  • 2. Introduction  A variant of OS that operates in constrained environment in which computer memory and processing power is limited. Moreover they often need to provide their services in definite amount of time.  Hard, Soft & Firm RTOS  Example RTOS: VxWorks, pSOS, Nucleus, RTLinux… • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 3. Structure of a RTOS Custom-Hardware RTOS-kernel Applications BSP • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 4. Components of RTOS  The most important component of RTOS is its kernel (Monolithic & Microkernel).  BSP or Board Support Package makes an RTOS target-specific (It’s a processor specific code onto (processor) which we like to have our RTOS running). • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 5. RTOS KERNEL • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 6. RTOS KERNEL: Tasks(1)  A task is basic unit of execution in RTOS.  RTOS scheduler needs to be deterministic ~ O(1) or O(n). Scheduling policies that are available in a RTOS are: Clock driven Priority driven (RMS & EDF) • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 7. RTOS KERNEL: Tasks(2) . . TID SAVED_TASK_STATE Resource 1 (signals) Resource 2 (events) Resource 3 (shared memory) System Variables Task Control Block • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 8. RTOS KERNEL: Tasks(3) • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 9. RTOS KERNEL: Tasks(4) • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 10. RTOS KERNEL: Tasks(5) RMS, EDF • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 11. RTOS KERNEL: Tasks(6)  XXX_CreateTask  XXX_AddtoProcessQueue  XXX_ChangePriority  XXX_KillTask  XXX_CreateTaskQueues … • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 12. RTOS KERNEL: Memory(1)  Memory is premium in environments where RTOS work.  Supports Virtual Memory (MMU) and Memory Protection (MPU) models.  User space and Kernel space memory. • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 13. RTOS KERNEL: Memory(2) Virtual Memory Concept Physical Address Virtual AddressM . . . . . PHY1 VIRT1 PHY2 VIRT2 PHY3 VIRT3 PHY4 VIRT4 • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 14. RTOS KERNEL: Memory(3) Virtual Memory Concept • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 15. RTOS KERNEL: Memory(4) Participation of User space programs with kernel for services and as a central pool of memory for specialized applications. Kernel Space Memory User Space memory P1 P2 M1 M2 • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 16. RTOS KERNEL: Memory(5)  XXX_Kmap  XXX_PassToUserSpace  XXX_Mmap  XXX_PurgeMemory/Kfree  XXX_Kmalloc … • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 17. RTOS KERNEL: Timer(1)  Timer is software entity derived from hardware clock.  Timer provides mechanism to introduce task-delays and/or to help synchronize and provide time off-course.  Watchdog Timers, Programmable Timers • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 18. RTOS KERNEL: Timer(2) • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 19. RTOS KERNEL: Timer(3)  Based upon these hardware- programmable timers, RTOS kernel can use to create software structures of timers associated with tasks.  Scheduling, Synchronization, time-stamping… • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 20. RTOS KERNEL: Timer(4)  XXX_SetTimer  XXX_AddtoTimerQueue  XXX_isExpired  XXX_RunAtExpiry  XXX_PurgeTimerQueue … • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 21. RTOS KERNEL: I/O(1)  I/O is slow as compared to CPU.  I/O: Interrupt-driven, Polling, DMA.  I/O map: Memory Space & IO Space. • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 22. RTOS KERNEL: I/O(2) • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 23. RTOS KERNEL: I/O(3) • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 24. RTOS KERNEL: I/O(4) DMA driven I/O• Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 25. RTOS KERNEL: I/O(5)  XXX_IORead/IOWrite  XXX_IOMap/Unmap  XXX_BindInterrupt … • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 26. RTOS KERNEL: Inter-process Communication(1)  Most of the time tasks cannot run in isolation. They require to talk to each other.  Synchronization, Protection and Sharing are goals of IPC. • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 27. RTOS KERNEL: Inter-process Communication(2)  Semaphores (Binary, Mutual)  Message Queues  Pipes/Named Pipes  Shared Memory  Signals/Slots  Mail slots  Sockets/XTI … • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 28. RTOS KERNEL: Inter-process Communication(3)  A common shared data- structure residing in kernel or user space.  Mechanism to access it. • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 29. RTOS KERNEL: Device Drivers(1)  A piece of software that enables devices connected to particular processor, via various interfaces.  Controls, manages and configures devices connected to system. • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 30. RTOS KERNEL: Device Drivers(2) Client Drivers Protocol Layers Host Controller Drivers Hardware • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 31. RTOS KERNEL: Device Drivers(3)  A host controller driver enables system to accept a particular type of device.  Client drivers are device specific.  Protocol layer converts device request to form that is understood by corresponding host controllers through their drivers. • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 32. Expectations from RTOS  Deadline-driven  Work with Dearth of Resources  Intricate I/O interfaces (Touch panels, Push buttons …)  Fail-safe and Robust  Availability • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 33. An Example RTOS EMERALDS architecture • Introduction • Structure of RTOS • Components of RTOS • RTOS Kernel • Tasks • Memory • Timers • I/O • IPCs • Device Drivers • Expectations • Examples
  • 34. Relevant books and websites  http://www.intelinfo.com/it_training_materials_and_books/free_real_time_ operating_systems_training_materials.html  Linux Device Drivers – Alexander Rubini, Oreilly publications  http://www.ddjembedded.com : Dr. Dobb’s Journal  http://www.embedded.com Some RTOS based Embedded Systems  http://www.ll.mit.edu/HPEC/agendas/proc02/abstracts/ahlander.pdf  http://www.cs.berkeley.edu/~culler/cs294-f03/papers/emeralds.pdf