Axis based MxN cross bar switch implementation using
Variables and Constants const integer N // Nb of queues const integer Q[1..N] // Per queue quantum integer DC[1..N] // Per queue deficit counter queue queue[1..N] // The queues
Scheduling Loop while (true) for i in 1..N if not queue[i].empty() DC[i]:= DC[i] + Q[i] while( not queue[i].empty() and DC[i] >= queue[i].head().size() ) DC[i]:= DC[i] - queue[i].head().size() send( queue[i].head() ) queue[i].dequeue() end while if queue[i].empty() DC[i]:= 0 end if end if end for end while