The following diagram shows the major states a task can be in. For each of the following scenarios.
indicate in the table below how the tasks states are changed by the RTOS. State transitions arrows
are labeled as A, B, C. and D. You may also use X, Y, or Z for "no change" for each of the states.
Important assumptions:
-Like UCOS-II, assume a priority-based preemptive RTOS, and smaller priority values indicate
higher priority.
-If two transitions occur because of the given scenario, indicate the last one.
-The scenarios in the bullet list below are independent of each other.
\textbullet Task A calls OSTimeDlyHMSM(0,0,0,300)
\textbullet Semaphore Q count is 0, and Task B calls
OSSemPend(Semaphore_Q,0,&err)
\textbullet Task C (priority 10) is pending on
Semaphore R. Task D (priority 9) calls
OSSemPost(Semaphore_R).
\textbullet MailBox M is not empty, and Task E calls
OSMboxPend(MailBox_M,0,&err)
\textbullet Task F (priority 12) calls
OSMboxPost(Mail_S,(void *)data), and
Task G (priority 11) was pending on Mail_S.
TASK
Transition (state and next state caused by the
given call)
Task A
[Select]
Task B
[Select]
Task C
[Select]
Task D
[Select]
Task E
[Select]
Task F
[Select]
Task G
[Select]