Deque and randomized queue assignment