A scheduler which uses a GPS simulation to determine an order in which to
service entities uses a novel dynamic data structure with a
sophisticated, but simple, pointer update mechanism. Preferred
embodiments of the scheduler perform a fixed amount of work per
scheduling event. A scheduling event can be either computing a new
virtual finish timestamp upon a new arrival to the scheduler, or
determining which entities are to leave the GPS system because their
finish timestamp has expired. The scheduler may be used in packet
scheduling in a packet handling device, such as a router, scheduling
access of software processes to a computer processor or the like. The
scheduler may implement weighted fair queuing (WFQ)