Scheduling – What is Weighted Round Robin Arbitration

processscheduling

In NVMe Protocol, NVMe Controller uses Weighted Round Robin Arbitration to select the Submission Queue, from which commands can be taken.

So what is exactly Weighted Round Robin Arbitration?

My understanding is that, suppose you have high priority class of weight 3, medium priority of weight 2 and low priority of weight 1. So in WRR Arbitration, in 6 rounds, Controller 3 times selects high priority class, 2 times medium priority class and 1 time low priority class, whereas in Round Robin Arbitration, it would be 2, 2, 2.

Kindly comment on my thoughts.

Best Answer

You're exactly right. I'm not familiar with NVMe, so I can't comment on the specific weightings and number of queues, but the general technique is quite popular in process scheduling.

Note that the weighted technique differs from the "priority-based" round-robin technique, where all the higher-priority tasks will be run (using round robin between them) before moving onto a round-robin rotation of the lower priority tasks.

You might also find this page on process scheduling interesting.