Function of lists and queues in Operating Systems
The operating system uses lists and queues extensively. One of the most common usages of these structures is to hold in an orderly manner the control blocks that represent the tasks that are in various stages of execution. (A task can run, it can wait for an external event such as an input/output operation, or it can be ready to run but held because its priority is not high enough). The control blocks are moved in and out of these stages.
A list is an abstract data type structure, which is flexible and is particularly useful when the numbers of elements in the list are not known beforehand, or can change during a process. Each element in the list generally has a pointer, pointing to the next element in the list. These are called linked lists, and can be stored scattered in memory because of the pointers linking the list. A good implementation of the linked ...