Programmable router not only forwards IP packets but also executes computing tasks.CPU scheduling in the programmable router is an important open problem till now.In this paper
the authors establish general software architecture of programmable router firstly.Based on the architecture
authors present a novel CPU scheduling algorithm based on queue length thresholds.We model this algorithm using stochastic Petri nets.The analysis results show that the scheduling algorithm can fulfill the requirements of computing of both best-effort flows and QoS flows in programmable router at the same time.