Professional Documents
Culture Documents
Systems
Nam Ho
Dr. Anh-Vu Dinh-Duc
Module Outline
FLASH
TASK1’s TASK2’s
Segments Segments
Code Code
Data kernel system call Data
Stack Stack
SRAM
Heap Heap
Shared Data Shared Data
Shared Code Shared Code
kernel
TASK 1 TASK n
TCB TCB
Task_Rountine() Task_Rountine()
status {
status {
while(1)
pc while(1) pc
{ {
sp ….. sp …..
} }
priority priority }
}
Memory … … …
CPU
sp
Context
pc
CPU register
8/20/2010 Embedded Systems Course: Real-Time Operating Systems - 2010 7
Task Context Switch
Cyclic Scheduler ?
The concept implementation is the same
as table-driven scheduler„s
Priority-Based Scheduler ?
Complex
Using several queues or link lists in each
of task states
Case study: cOS-II
8/20/2010 Embedded Systems Course: Real-Time Operating Systems - 2010 14
Scheduler Implementation –
Priority Scheduler