Command queue

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Sam Van Kooten (talk | contribs) at 17:54, 27 November 2020 (→‎Command queue: Improved tone of the text). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, a command queue is a queue for enabling the delay of command execution, either in order of priority, on a first-in first-out basis, or in any order that serves the current purpose. Instead of waiting each command to be executed before sending the next one, the program just puts all the commands in the queue and goes on doing other things while the queue is processed by the executor component (e.g. hard drive).

This delegation not only frees the program from handling the queue, but also allows a more optimized execution in some situations. For instance, when handling multiple requests from several users, a network server's hard drive can reorder all the requests in its queue to minimize the mechanical movement. A non-computational example is an elevator, which will travel through requested floors according to their physical arrangement as opposed to the order in which users requested stops at those floors.

Examples

See also

References