Hardware Reference
In-Depth Information
vdes
ready
0
0
1
2
3
4
5
6
7
Figure 10.9
Implementation of the ready queue as a list of Task Control Blocks.
used to store the identifier of the server associated with the task, or, if the scheduling
mechanism supports tolerant deadlines, a field can store the tolerance value for that
task.
Finally, since a TCB has to be inserted in the lists handled by the kernel, an additional
field has to be reserved for the pointer to the next element of the list.
In DICK, a TCB is an element of the vdes[MAXPROC] array, whose size is equal to
the maximum number of tasks handled by the kernel. Using this approach, each TCB
can be identified by a unique index, corresponding to its position in the vdes array.
Hence, any queue of tasks can be accessed by an integer variable containing the index
of the TCB at the head of the queue. Figure 10.9 shows a possible configuration of the
ready queue within the vdes array.
Similarly, the information concerning a semaphore is stored in a Semaphore Control
Block (SCB), which contains at least the following three fields (see also Figure 10.10):
A counter, which represents the value of the semaphore;
A queue, for enqueueing the tasks blocked on the semaphore;
A pointer to the next SCB, to form a list of free semaphores.
Search WWH ::




Custom Search