Module 5
Source: Introduction to Embedded System by “Shibu K V”
Class 1
Real time operating system based
embedded system design
Operating system basics
Types of operating systems
-- GPOS and RTOS
Task process and threads
Preemptive task scheduling
-- Shortest time remaining scheduling
-- Round Robin scheduling
-- Priority based scheduling
Real time operating system based
embedded system design
Operating system basics
Types of operating systems
-- GPOS and RTOS
Task process and threads
Preemptive task scheduling
-- Shortest time remaining scheduling
-- Round Robin scheduling
-- Priority based scheduling
Operating system basics
The kernel
-- Process management
-- Primary memory management
-- File system management
-- I/O system management
-- Secondary storage management
-- Protection systems
-- Interrupt handler
Kernel space and user space
Operating system basics
Monolithic Kernel Microkernel
1. Monolithic Kernel :
- All kernel services run in the kernel space
- Effective utilization of low level space
- any error in kernel modules will crash the
entire system
Ex: LINUX, SOLARIS, MS-DOS
Operating system basics
2) Microkernel
-- Only the essential set of operating
system services in the kernel
-- Rest of the services on servers in
user space
-- Robustness
-- Configurability
Real time operating system based
embedded system design
Operating system basics
Types of operating systems
-- GPOS and RTOS
Task process and threads
Preemptive task scheduling
-- Shortest time remaining scheduling
-- Round Robin scheduling
-- Priority based scheduling
Types of operating systems
GPOS and RTOS
RTOS
-- The real time kernel
1. Task/Process mangament
2. Task/ Process scheduling
3. Task/ Process synchronization
4. Error/ Exception handling
5. Memory management
6. Interrupt handling
7. Time management
Types of operating system
The real time kernel
1. Task/Process mangament
2. Task/ Process scheduling
3. Task/ Process synchronization
4. Error/ Exception handling
5. Memory management
6. Interrupt handling
7. Time management
Real time kernel
1. Task/ Process Management
-- Task ID
-- Task state
-- Task type
-- Task Priority
-- Task context pointer
-- Task Memory pointer
-- Task System resource pointer
-- Task pointers
-- Other pointers
Real time kernel
2. Task/ Process Scheduling
-- Scheduler handles scheduling
3. Task/process Synchronization
4. Error/Exception Handling
-- Dead lock, Time out, WDT
5. Memory Management
6. Interrupt handling
-- Synchronous interrupts
-- Asynchronous interrupts
7. Time management :RTC, Timer tick
-- 2^32 *10^-6 /(24*60*60)= 49700 = 1.19 hrs
Real time kernel
1. Hard real time
-- Strict timing constraints
-- A late answer is a wrong answer
Ex. Air bag deployment in car
2. Soft real time
-- Missing deadlines
-- A late answer is an acceptable answer
Ex. ATM
Task, Process and Threads