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

How to Measure RTOS Performance
How to Measure RTOS Performance How to Measure RTOS Performance
How to Measure RTOS Performance
mentoresd
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
National Cheng Kung University
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
Praveen Penumathsa
 
Communication stack
Communication stackCommunication stack
Communication stack
Medhat HUSSAIN
 
Real time operating systems (rtos) concepts 7
Real time operating systems (rtos) concepts 7Real time operating systems (rtos) concepts 7
Real time operating systems (rtos) concepts 7
Abu Bakr Ramadan
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
Dr. Pankaj Zope
 
Hardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ ProcessorsHardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ Processors
The Linux Foundation
 
Free rtos seminar
Free rtos seminarFree rtos seminar
Free rtos seminar
Cho Daniel
 
Introduction to RTOS
Introduction to RTOSIntroduction to RTOS
Introduction to RTOS
Yong Heui Cho
 
Autosar MCAL (Microcontroller Abstraction Layer)
Autosar MCAL (Microcontroller Abstraction Layer)Autosar MCAL (Microcontroller Abstraction Layer)
Autosar MCAL (Microcontroller Abstraction Layer)
Embitel Technologies (I) PVT LTD
 
DISASSEMBLER-DECOMPILER.pptx
DISASSEMBLER-DECOMPILER.pptxDISASSEMBLER-DECOMPILER.pptx
DISASSEMBLER-DECOMPILER.pptx
ssuser13dc7d
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
Aarav Soni
 
Autosar basics by ARCCORE
Autosar basics by ARCCOREAutosar basics by ARCCORE
Autosar basics by ARCCORE
ARCCORE
 
Autosar software component
Autosar software componentAutosar software component
Autosar software component
Farzad Sadeghi
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
nikeAthena
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
Zakaria Gomaa
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
Vandana Salve
 
FlexRay
FlexRayFlexRay
FlexRay
Greeshma S
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
Anil Kumar Pugalia
 
Multicore and AUTOSAR
Multicore and AUTOSARMulticore and AUTOSAR
Multicore and AUTOSAR
Hansang Lee
 

What's hot (20)

How to Measure RTOS Performance
How to Measure RTOS Performance How to Measure RTOS Performance
How to Measure RTOS Performance
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
Communication stack
Communication stackCommunication stack
Communication stack
 
Real time operating systems (rtos) concepts 7
Real time operating systems (rtos) concepts 7Real time operating systems (rtos) concepts 7
Real time operating systems (rtos) concepts 7
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
Hardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ ProcessorsHardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ Processors
 
Free rtos seminar
Free rtos seminarFree rtos seminar
Free rtos seminar
 
Introduction to RTOS
Introduction to RTOSIntroduction to RTOS
Introduction to RTOS
 
Autosar MCAL (Microcontroller Abstraction Layer)
Autosar MCAL (Microcontroller Abstraction Layer)Autosar MCAL (Microcontroller Abstraction Layer)
Autosar MCAL (Microcontroller Abstraction Layer)
 
DISASSEMBLER-DECOMPILER.pptx
DISASSEMBLER-DECOMPILER.pptxDISASSEMBLER-DECOMPILER.pptx
DISASSEMBLER-DECOMPILER.pptx
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 
Autosar basics by ARCCORE
Autosar basics by ARCCOREAutosar basics by ARCCORE
Autosar basics by ARCCORE
 
Autosar software component
Autosar software componentAutosar software component
Autosar software component
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
FlexRay
FlexRayFlexRay
FlexRay
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Multicore and AUTOSAR
Multicore and AUTOSARMulticore and AUTOSAR
Multicore and AUTOSAR
 

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 part2
Rtos part2Rtos part2
Rtos part2
navakishore
 
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
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
prakrutijsh
 
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
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
 
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
 
gg
gggg
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
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
Pruthvi Koli
 
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

ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
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
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
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
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 

Recently uploaded (20)

ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
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
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 

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