Escolar Documentos
Profissional Documentos
Cultura Documentos
System uCOS-II
Enric Pastor
Dept. Arquitectura de Computadors
µC/OS-II Overview
µC/OS-II
z Task Management
z Rate Monotonic Scheduling
z Memory Management
µC/GUI
µC/FS
1
Books and Resources
µC/OS-II
2
µC/OS - II
Task Feature
Task Creation
Task Stack & Stack Checking
Task Deletion
Change a Task’s Priority
Suspend and Resume a Task
Get Information about a Task
3
Task Feature
∑Ei / Ti ≤ n(21/n – 1)
4
Rate Monotonic Scheduling: Example
General Solution?
z As n →∞, the right-hand side of the inequality goes to ln(2)=
0.6931. Thus, you should design your system to use less
than 60-70% of the CPU
Process Cycle
5
Task Creation
Task Management
WAITING
DORMANT
ISR
READY RUNNING
6
Task Management
7
Memory Management
Memory Management
8
Time Management
Time Management
Five services:
z OSTimeDLY()
z OSTimeDLYHMSM()
z OSTimeDlyResume()
z OSTimeGet()
z OSTimeSet()
9
Inter-task communication
Inter-task communication
10
Inter-task communication
Inter-task communication
Tasks can wait and signal along with an optional time out
11
Inter-task communication
Inter-task communication
12
Inter-task communication
µC/OS-II message-queues
Available services: Create, Post (FIFO), PostFront (LIFO),
Pend, Accept, Query, Flush
z N = #of entries in the queue: Queue full if Post or PostFront
called N times before a Pend or Accept
Inter-task communication
13
Writing Applications Under µC/OS-II
14
µC/GUI
µC/GUI
15
µCGUI (Contd..)
µCGUI (contd..)
16
µC/FS
µC/FS
17
µC/FS Device Drivers
18