deque
Noun
Meaning
deque (plural deques)
(computing) A linear data structure in which elements may be appended to or removed from either end.
Coordinate terms: list, stack, queue
This algorithm is difficult to implement with a standard queue, but with a deque it's easy.
Examples
This general data class has some possible sub-types: *An input-restricted deque is one where deletion can be made from both ends, but insertion can be made at one end only.
Operations The basic operations on a deque are enqueue and dequeue on either end.
The first one, called 'real-time deque, is presented below.
To execute the next thread, the processor gets the first element from the deque (using the "remove first element" deque operation).
When one of the processors finishes execution of its own threads (i.e. its deque is empty), it can "steal" a thread from another processor: it gets the last element from the deque of another processor ("remove last element") and executes it.