//calculate number of packets to be served each round by connections for (each connection) connectioni.normalized_weight = connectioni.weight / connectioni.mean_packet_size;
min = findSmallestNormalizedWeight(); for (each connection) connectioni.packets_to_be_served = connectioni.normalized_weight / min;
// main loop while (true) { for (each non-empty connection) for (j=0; j< min(connectioni.packets_to_be_served, connectioni.packets_waiting); j++) servePacket (connectioni.getPacket());
}
There's a modified version of WRR called