Hardware Reference
In-Depth Information
/*-----------------------------------------------------------*/
/* firstdline -- returns the deadline of the first task */
/*-----------------------------------------------------------*/
long
firstdline
(queue *que)
{
return(vdes[que].dline);
}
/*-----------------------------------------------------------*/
/* empty -- returns TRUE if a queue is empty */
/*-----------------------------------------------------------*/
int
empty
(queue *que)
{
if (que == NIL)
return(TRUE);
else
return(FALSE);
}
10.5.3
SCHEDULING MECHANISM
The scheduling mechanism in DICK is realized through the functions
schedule
and
dispatch
. The
schedule
primitive verifies whether the running task is the one with the
earliest deadline. If so, there is no action, otherwise the running task is inserted in the
ready queue and the first ready task is dispatched. The
dispatch
primitive just assigns
the processor to the first ready task.
Search WWH ::
Custom Search