Title: Fast and scalable priority queue architecture for highspeed network switches
1Fast and scalable priority queue architecture for
high-speed network switches
Authors Ranjita Bhagwan, Bill Lin Publisher
IEEE INFOCOM 2000 Present Min-Yuan Tsai
(???) Date January, 04, 2007
Department of Computer Science and Information
Engineering National Cheng Kung University,
Taiwan R.O.C.
2Outline
- 1. Introduction
- 2. The P-HEAP Data Structure
- 3. Priority Queue Operations on the P-HEAP
- 4. Pipelining The P-HEAP Operations
3Introduction
- To implement the priority-based scheduling
policy, priority queues can be used to maintain a
real-time sorting of the queue elements in a
decreasing order of priorities. - The task of highest-priority-first scheduling can
be reduced to a simple removal of the top queue
element. - To maintain this real-time sorting at link
speeds, a fast hardware priority queue
implementation is essential.
4Introduction (contd.)
- In this paper, a new pipelined priority queue
architecture is described. - The architecture is based on a novel data
structure called a Pipelined-heap (or P-heap) for
short. This data structure is similar to a
conventional binary heap. - In addition to being very fast, our priority
queue architecture also scales very well with
respect to both the number of priority levels and
the queue size.
5Introduction (contd.)
- The Queue Manager consists
- primarily of three parts
- Priority Assignment Unit
- Stamps the incoming packets with
- a certain priority (decided depending
- upon the scheduling algorithm)
- P-heap Manager
- Contains the P-heap priority queue
- Queue Controller
- Maintains a lookup table with entries
corresponding to each - priority value.
- Each entry consists of a pointer to a list of
packets of the same priority. (refer this list as
a priority list)
6Outline
- 1. Introduction
- 2. The P-HEAP Data Structure
- 3. Priority Queue Operations on the P-HEAP
- 4. Pipelining The P-HEAP Operations
7The P-HEAP Data Structure
8The P-HEAP Data StructureB
- Definition of Binary array (B)
- Bi a node in B with index i. (Contain 3
fields) - Bi.active Boolean field. (True means the node
Bi is filled with a valid priority value
(active). False means empty (inactive)) - Bi.value If the node is active, holds the
actual priority value. - Bi.capacity Contains the number of inactive
nodes in the sub-tree rooted at Bi . - Lj the set of nodes of the jth level of B
- We define a trio for every node in B as follows
- The ith trio of B ?i Bi, Bleft(i),
Bright(i)
9The P-HEAP Data StructureB (contd.)
- The P-heap property has to be satisfied by every
node Bi of B except the leaves. -
10The P-HEAP Data StructureT
- Definition of Token array (T)
- Ti associate with level Li in of B. (Contain 3
fields) - Ti.operation Holds an instruction (the
operation need to be executed at level Li) - only holds one of the four instructions, enq,
deq, edq, nop - Ti.value Holds the priority value that need to
be inserted into B. - Ti.position Holds the index of a node at level
Li of B.
11Outline
- 1. Introduction
- 2. The P-HEAP Data Structure
- 3. Priority Queue Operations on the P-HEAP
- 4. Pipelining The P-HEAP Operations
12Enqueue OperationValid Paths
- A valid path Bi1 ? Bi2 ? ? Bil where
Bij belong to Lj and ij parent (ij 1) -
- ? For all Bij, Bij.capacity gt 0.
13Enqueue procedure (Enqueue 9)
9
9lt16
9
9lt14
9gt7, SWAP
9
9
7
7
14Enqueue procedure (contd.)
15Dequeue procedure
16Dequeue procedure (contd.)
17Enqueue-Dequeue procedure
18Outline
- 1. Introduction
- 2. The P-HEAP Data Structure
- 3. Priority Queue Operations on the P-HEAP
- 4. Pipelining The P-HEAP Operations
19Pipelining The P-HEAP Operations
- Define the ith pipeline window ai as
-
- The function f ( i ) executes one of the three
local procedures on pipeline window ai depending
on the operation field of Ti
20The Pipelining Operations of a 4-level
P-HEAP Example
- We define a P-heap cycle is the maximum time
required to execute any instance of the three
local operations. - Operations as follows
- Enqueue (9)
- Enqueue (4)
- Dequeue
- Enqueue-Dequeue (2)
21The Pipelining Operations of a 4-level
P-HEAP Cycle 1
9lt16
22The Pipelining Operations of a 4-level
P-HEAP Cycle 2
9lt14
23The Pipelining Operations of a 4-level
P-HEAP Cycle 3
- Enqueue (9) a3
- SWAP
- Enqueue (4) a1
4lt16
9gt7, SWAP
24The Pipelining Operations of a 4-level
P-HEAP Cycle 4
- Enqueue (9) a4
- Complete
- Enqueue (4) a2
4lt10
25The Pipelining Operations of a 4-level
P-HEAP Cycle 5
- Enqueue (4) a3
- Complete
- Dequeue (4) a1
14gt10
26The Pipelining Operations of a 4-level
P-HEAP Cycle 6
9gt8
27The Pipelining Operations of a 4-level
P-HEAP Cycle 7
Replace by 2
- Dequeue (4) a3
- Complete
- Enqueue
- -Dequeue (2) a1
-
2lt10,SWAP
7gt5
28The Pipelining Operations of a 4-level
P-HEAP Cycle 8
- Enqueue
- -Dequeue (2) a2
- Complete
2lt4, SWAP
29The Pipelining Operations of a 4-level
P-HEAP Result