An electronic device, comprising: a queue including two or more sub-queues, each of the two or more sub-queues including a separate subset of a set of entries for the queue, the sub-queues being arranged in a logical hierarchy from a lowest sub-queue to a highest sub-queue; a memory associated with each sub-queue of the two or more sub-queues, each of the memories storing an age matrix for the associated sub-queue, each age matrix including only elements on a first side of a reflecting line for which values can be used to determine values for elements on a second side of the reflecting line, the values in the elements of each age matrix identifying relative ages of items stored in entries in the associated sub-queue; and a controller configured to: store items in the queue by storing items in the lowest sub-queue until the lowest sub-queue becomes full, and then storing items in successively next higher sub-queues in the hierarchy as each next higher sub-queue becomes full; remove an item from the queue by removing an item that is ready for removal from an entry in the lowest sub-queue; and shift items stored in sub-queues in the hierarchy to fill the entry in the lowest sub-queue by, starting from the lowest sub-queue and proceeding through sub-queues in the hierarchy, for each sub-queue: when a next higher sub-queue in the hierarchy exists and stores at least one item, determining, using the age matrix associated with the next higher sub-queue, an entry in which an oldest item in the next higher sub-queue is stored; and moving the oldest item from the entry in the next higher sub-queue into that sub-queue. a queue including two or more sub-queues, each of the two or more sub-queues including a separate subset of a set of entries for the queue, the sub-queues being arranged in a logical hierarchy from a lowest sub-queue to a highest sub-queue; a memory associated with each sub-queue of the two or more sub-queues, each of the memories storing an age matrix for the associated sub-queue, each age matrix including only elements on a first side of a reflecting line for which values can be used to determine values for elements on a second side of the reflecting line, the values in the elements of each age matrix identifying relative ages of items stored in entries in the associated sub-queue; and a controller configured to: store items in the queue by storing items in the lowest sub-queue until the lowest sub-queue becomes full, and then storing items in successively next higher sub-queues in the hierarchy as each next higher sub-queue becomes full; remove an item from the queue by removing an item that is ready for removal from an entry in the lowest sub-queue; and shift items stored in sub-queues in the hierarchy to fill the entry in the lowest sub-queue by, starting from the lowest sub-queue and proceeding through sub-queues in the hierarchy, for each sub-queue: when a next higher sub-queue in the hierarchy exists and stores at least one item, determining, using the age matrix associated with the next higher sub-queue, an entry in which an oldest item in the next higher sub-queue is stored; and moving the oldest item from the entry in the next higher sub-queue into that sub-queue. store items in the queue by storing items in the lowest sub-queue until the lowest sub-queue becomes full, and then storing items in successively next higher sub-queues in the hierarchy as each next higher sub-queue becomes full; remove an item from the queue by removing an item that is ready for removal from an entry in the lowest sub-queue; and shift items stored in sub-queues in the hierarchy to fill the entry in the lowest sub-queue by, starting from the lowest sub-queue and proceeding through sub-queues in the hierarchy, for each sub-queue: when a next higher sub-queue in the hierarchy exists and stores at least one item, determining, using the age matrix associated with the next higher sub-queue, an entry in which an oldest item in the next higher sub-queue is stored; and moving the oldest item from the entry in the next higher sub-queue into that sub-queue. when a next higher sub-queue in the hierarchy exists and stores at least one item, determining, using the age matrix associated with the next higher sub-queue, an entry in which an oldest item in the next higher sub-queue is stored; and moving the oldest item from the entry in the next higher sub-queue into that sub-queue.