Figure: A Task Queue
Task
Task
The routine will be called when the element on the task queue is processed and it will be passed a pointer to the data.
Anything in the kernel, for example a device driver, can create and use task
- timer
- This
queue is used to queue work that will be done as soon after the next systemclock tick as is possible. Eachclock tick , this queue is checked to see if it contains any entries and, if it does, the timer queue bottom half handler is made active. The timerqueue bottom half handler is processed, along with all the other bottom half handlers, when the scheduler next runs. This queue should not be confused with system timers, which are a much more sophisticated mechanism. - immediate
- This
queue is also processed when the scheduler processes the active bottom half handlers. The immediate bottom half handler is not as high in priority as the timerqueue bottom half handler and so these tasks will be run later. - scheduler
- This task
queue is processed directly by the scheduler. It is used to support other task queues in the system and, in this case, the task to be run will be a routine that processes a task queue, say for adevice driver .
When task queues are processed, the pointer to the first element in the queue is
removed from the