written 5.8 years ago by |
(A) Task Management
- Kernel uses TCB for task switching.
TCB contains the following info.
(i) Task ID - Unique Task ID no.
(ii) Task state - The current state of the task.
(iii) Task type - hard real time or soft real time.
(iv) Task priority - priority of task.
(v) Task context pointer - Pointer for context saving.
(vi) Task memory pointer - Pointer to program, data and stack memory.
(vii) Task system resource pointer.
(viii) Task pointer.
(B) Task scheduling
Scheduler handles the task scheduling by implementing scheduling algorithms.
(C) Task synchronisation
It is used for concurrent access to shared resources among multiple tasks and communication between various task(intertask communication).
(D) Error/Exception handling
It is used to handle error occurred when exception such as stack overflow/underflow, insufficient memory, deadlock, divide by zero etc. are raised during execution of task.
(E) Memory management
- RTOS kernel adopts slightly different approach for memory management than general purpose OS(GPOS).
- GPOS adopts dynamic memory allocation technique whereas RTOS kernel uses memory block of fixed size and allocates memory block when needed.
(F) Interrupt Handling
Very important task of RTOS. The interrupts may be disabled if a higher priority task is already in execution.
(G) Time Management
RTFS needs accurate time management to meet the specified deadlines.
'Timer tick' interrupt takes care of time management.
'Timer tick' is used for implementing the following functions:
$\;\;$- save the current context of task in TCB when switched.
$\;\;$- update s/w timer implemented in the Kernel.
$\;\;$- activate periodic tasks.
$\;\;$- load the context of highest priority task from ready queue.