A method and apparatus are provided for implementing hierarchical
scheduling of oversubscribed virtual paths with underutilized bandwidth
that works for both ATM (cell) and IP (frame) scheduling. A scheduler
includes a first calendar for pipes and autonomous flows and a second
calendar for pipe flows. A winner of a pipe or an autonomous flow is
identified from the first calendar. Responsive to an identified winner
pipe, a pipe queue is checked for an associated pipe flow for the winner
pipe. Responsive to identifying an empty pipe queue for the winner pipe,
a pipe win credit is assigned to the pipe without reattaching the winner
pipe to the first calendar. Then a next winner is identified from the
first calendar. When a winner pipe flow is identified from the second
calendar and the pipe win credit is assigned to the pipe for the winner
pipe flow, then the winner pipe flow is serviced without delay.