Queueing and scheduling algorithms for high performance routers