Professional Documents
Culture Documents
Custom-Hardware
Components of RTOS
• Introduction
• Structure of RTOS The most important
• Components of RTOS
• RTOS Kernel
component of RTOS is its
• Tasks kernel (Monolithic & Microkernel).
• Memory
• Timers
BSP or Board Support
• I/O
Package makes an RTOS
• IPCs
• Device Drivers target-specific (It’s a processor specific
• Expectations code onto (processor) which we like to have our
• Examples RTOS running ).
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)
• Introduction
• Structure of RTOS A task is basic unit of
• Components of RTOS
• RTOS Kernel
execution in RTOS.
• Tasks RTOS scheduler needs to be
• Memory
• Timers deterministic ~ O(1) or O(n).
• I/O
• IPCs
Scheduling policies that are
• Device Drivers available in a RTOS are:
• Expectations
• Examples
Clock driven
Priority driven (RMS & EDF)
RTOS KERNEL: Tasks(2)
• Introduction
TID
• Structure of RTOS
• Components of RTOS
SAVED_TASK_STATE
• RTOS Kernel
• Tasks
Resource 1 (signals)
• Memory
• Timers Resource 2 (events)
• I/O
• IPCs Resource 3 (shared memory)
• Device Drivers
• Expectations .
• Examples
.
System Variables
memory.
RTOS KERNEL: Memory(2)
• Introduction
Physical Address M Virtual Address
• Structure of RTOS
• Components of RTOS
• RTOS Kernel PHY1 VIRT1
• Tasks
PHY2 VIRT2
• Memory
PHY3 VIRT3
• Timers
• I/O PHY4 VIRT4
• IPCs .
• Device Drivers .
.
• Expectations
.
• Examples
.
Programmable Timers
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)
• Introduction
• Structure of RTOS Based upon these hardware-
• Components of RTOS
• RTOS Kernel
programmable timers, RTOS
• Tasks kernel can use to create
• Memory
• Timers
software structures of timers
• I/O associated with tasks.
• IPCs
• Device Drivers
Scheduling, Synchronization,
• Expectations
time-stamping…
• Examples
RTOS KERNEL: Timer(4)
• Introduction
• Structure of RTOS XXX_SetTimer
• Components of RTOS
• RTOS Kernel
XXX_AddtoTimerQueue
• Tasks
XXX_isExpired
• Memory
• Timers XXX_RunAtExpiry
• I/O
• IPCs XXX_PurgeTimerQueue
• Device Drivers
• Expectations …
• Examples
RTOS KERNEL: I/O(1)
• Introduction
• Structure of RTOS I/O is slow as compared to
• Components of RTOS
• RTOS Kernel
CPU.
• Tasks I/O: Interrupt-driven, Polling,
• Memory
• Timers DMA.
• I/O
I/O map: Memory Space & IO
• IPCs
• Device Drivers Space.
• 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)
• Introduction DMA driven I/O
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL: I/O(5)
• Introduction
• Structure of RTOS
XXX_IORead/IOWrite
• Components of RTOS
XXX_IOMap/Unmap
• RTOS Kernel
• Tasks XXX_BindInterrupt
• Memory
• Timers …
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Inter-process Communication(1)
• Introduction
• Structure of RTOS Most of the time tasks cannot
• Components of RTOS
• RTOS Kernel
run in isolation. They require
• Tasks to talk to each other.
• Memory
• Timers
Synchronization, Protection
• I/O
and Sharing are goals of IPC.
• IPCs
• Device Drivers
• Expectations
• Examples
RTOS KERNEL:
Inter-process Communication(2)
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel Semaphores
• Tasks (Binary, Mutual)
• Memory Message Queues
• Timers
Pipes/Named
• I/O
Pipes
• IPCs
• Device Drivers
Shared Memory
• Expectations Signals/Slots
• Examples Mail slots
Sockets/XTI …
RTOS KERNEL:
Inter-process Communication(3)
• Introduction
• Structure of RTOS A common
• Components of RTOS
• RTOS Kernel
shared data-
• Tasks structure
• Memory residing in
• Timers
• I/O
kernel or user
• IPCs space.
• Device Drivers
• Expectations
Mechanism to
• Examples access it.
RTOS KERNEL:
Device Drivers(1)
• Introduction
• Structure of RTOS
A piece of software that enables
• Components of RTOS devices connected to particular
• RTOS Kernel
processor, via various
• Tasks
• Memory interfaces.
• Timers Controls, manages and
• I/O
• IPCs
configures devices connected to
• Device Drivers system.
• Expectations
• Examples
RTOS KERNEL:
Device Drivers(2)
• Introduction
• Structure of RTOS
• Components of RTOS Client Drivers
• RTOS Kernel
• Tasks
• Memory
• Timers Protocol Layers
• I/O
• IPCs
• Device Drivers
• Expectations Host Controller Drivers
• Examples
Hardware
RTOS KERNEL:
Device Drivers(3)
• Introduction
• Structure of RTOS
A host controller driver enables
• Components of RTOS system to accept a particular type of
• RTOS Kernel
device.
• Tasks
• Memory Client drivers are device specific.
• Timers
• I/O
Protocol layer converts device
• IPCs request to form that is understood
• Device Drivers by corresponding host controllers
• Expectations
• Examples
through their drivers.
Expectations from RTOS
• Introduction
• Structure of RTOS Deadline-driven
• Components of RTOS
• RTOS Kernel
Work with Dearth of Resources
• Tasks
Intricate I/O interfaces (Touch
• Memory
• Timers panels, Push buttons …)
• I/O
• IPCs Fail-safe and Robust
• Device Drivers
• Expectations
Availability
• Examples
An Example RTOS
• Introduction
• Structure of RTOS
• Components of RTOS
• RTOS Kernel
• Tasks
• Memory
• Timers
• I/O
• IPCs
• Device Drivers
• Expectations
• Examples
EMERALDS architecture
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