Renesas 70 User Manual

Page of 162
Chapter 3 Introduction to MR308 
   
- 19 - 
3.3 Task 
This section describes how tasks are managed by MR308. 
3.3.1 Task 
Status 
The real-time OS monitors the task status to determine whether or not to execute the tasks. 
Figure 3.12 shows the relationship between key input task execution control and task status. When there is a 
key input, the key input task must be executed. That is, the key input task is placed in the execution (RUNNING) 
state. While the system waits for key input, task execution is not needed. In that situation, the key input task in 
the WAITING state.   
 
Key input 
Task 
RUNNIG state
WAITING state
RUNNING state 
Waiting for
key input 
Key input
processing 
Key input 
processing 
 
Figure 3.12 Task Status 
 
The MR308 controls the following six different states including the RUNNING and WAITING states. 
1. RUNNING 
state 
2. READY 
state 
3. WAITING 
state 
4. SUSPENDED 
state 
5. WAITING-SUSPENDED 
state 
6. DORMANT 
state 
Every task is in one of the above six different states. Figure 3.13 shows task status transition.