
CHAPTER 2 KERNEL
User’s Manual U14833EJ2V0UM
21
2.3
Functions
This section overviews the functions of the scheduler and management modules.
Refer to
CHAPTER 3 SCHEDULER
to
CHAPTER 5 SYNCHRONOUS COMMUNICATION MANAGEMENT
for
details of the individual management modules.
1. Scheduler
The scheduler manages and determines the order in which tasks are executed and assigns tasks the right to
use the CPU. In the RX4000, the task execution order is determined according to an assigned priority and by
applying the FCFS (First Come First Served) system. When activated, the scheduler determines the priorities
assigned to the tasks, selects an optimum task from those ready to be executed (running or ready state) (by
assessing which task has the highest priority and entered the ready state the earliest) and assigns that task
the right to use the CPU.
2. Task management
This module manipulates and manages the states of a task, the minimum unit in which processing is
performed by the RX4000. The module can, for example, create, activate, execute, stop, terminate, and delete
a task.
3. Task-associated synchronization
This module is used to perform synchronization that is not reliant on objects other than tasks, such as
semaphores. This module can, for example, put a task unconditionally into a self-imposed waiting state,
interrupt execution of another task, or release another task from a waiting state. For further details of this
module, refer to the explanation in
CHAPTER 4 TASK MANAGEMENT
.
4. Task exception management
This module is newly added for
μ
ITRON4.0 and is used to enable the writing of not only the routine for normal
execution of the main body of tasks (task main processing routine), but also a task exception processing
routine that is activated by the occurrence of an event exceptional to a task. A more detailed explanation of the
task exception management function can be found in
CHAPTER 4 TASK MANAGEMENT
.
5. Synchronous communication management
This module provides the following five functions related to exclusive control, wait, and communication, which
comprise the three types of synchronous communication between tasks. Note that in accordance with
μ
ITRON4.0, the correct categorization of a mutex is as an extended synchronous communication function.
Table 2-1. Synchronous Communication Function
Type
Provided Function
Exclusion
Semaphores, mutexes
Wait
Event flags
Communication
Data queues, mailboxes