Chapter 3 Introduction to MR308
- 20 -
Forced
termination
request
from other
task
SUSPENDED state clear
request from other task SUSPEND request
from other task
READY state RUNNING state
WAITING state
WAITING-SUSPENDED
state
DORMANT
state
SUSPENDED
state
WAITING state
clear
t
SUSPEND request
from other task
SUSPENDED state
clear request
MPU execlusive right relinquishment
MPU execlusive right acquisition
Entering the
WAITING state
Task ac tivati on
Forced termination
request from other task
WAITING state
Figure 3.13 MR308 Task Status Transition
1. RUNNING state
In this state, the task is being executed. Since only one microcomputer is used, it is natural that only
one task is being executed.
The currently executed task changes into a different state when any of the following conditions occurs.
The task has normally terminated itself.9
The task has placed itself in the WAITING state.10
Due to interruption or other event occurrence, the interrupt handler has placed a different task
having a higher priority in the READY state.
The priority assigned to the task has been changed so that the priority of another READY task is
rendered higher.11
Due to interruption or other event occurrence, the priority of the task or a different READY task
has been changed so that the priority of the different task is rendered higher.12
When the ready queue of the issuing task priority is rotated by the rot_rdq or irot_rdq service call
and control of execution is thereby abandoned
When any of the above conditions occurs, rescheduling takes place so that the task having the highest
priority among those in the RUNNING or READY state is placed in the RUNNING state, and the exe-
cution of that task starts.
2. READY state
The READY state refers to the situation in which the task that meets the task execution conditions is
still waiting for execution because a different task having a higher priority is currently being executed.
When any of the following conditions occurs, the READY task that can be executed second according
9 Depends on the ext_tsk service call.
10 Depends on the dly_tsk, slp_tsk, tslp_tsk, wai_flg, twai_flg, wai_sem, twai_sem, rcv_mbx, trcv_mbx,snd_dtq,tsnd_dtq,rcv_dtq, trcv_dtq,
vtsnd_dtq, vsnd_dtq,vtrcv_dtq,tget_mpf, get_mpf or vrcv_dtq service call.
11 Depends on the chg_pri service call.
12 Depends on the ichg_pri service call.