a scheduler for a network processor includes a scheduling queue in which weighted fair queuing is applied . the scheduling queue has a range r . flows are attached to the scheduling queue at a distance d from a current pointer for the scheduling queue . the distance d is calculated for each flow according to the formula d =/ sf ), where wf is a weighting factor applicable to a respective flow ; fs is a frame size attributable to the respective flow ; and sf is a scaling factor . the scaling factor sf is adjusted depending on a comparison of the distance d to the range r .