Real-Time Systems, 22, 119±149, 2002 # 2002 Kluwer Academic Publishers. Manufactured in The Netherlands. Integrating Priority with Share in the Priority-Based Weighted Fair Queuing Scheduler for Real-Time Networks SONG WANG wsong@ece.uci.edu YU-CHUNG WANG wangy@ece.uci.edu KWEI-JAY LIN klin@ece.uci.edu Department of Electrical and Computer Engineering, University of California, Irvine, CA 92697-2625 Abstract. The Weighted Fair Queuing (WFQ) scheduler has been closely studied due to its desirable properties of bandwidth guarantee and bounded delay. However, the queuing delay bound of a communication session is tightly coupled with the session's allocated service share. To receive a low queuing delay, a session must reserve a high share. In this paper, we study a new fair queuing algorithm called Priority-based Weighted Fair Queuing (PWFQ). PWFQ combines a session's allocated share to achieve the bandwidth guarantee and the session's priority to adjust the delay bound inside a sliding window. The new algorithm decouples the delay from the service share so that a session with a low share but a high priority may still receive a small delay. We analyze the worst-case delay bound of PWFQ and propose a simple algorithm to assign session priorities. Keywords: WFQ, priority-driven scheduling, sliding window, real-time network, queuing delay, bandwidth allocation 1. Introduction As more computers and appliances become online, future computer networks need to support a variety of services, including guaranteed bandwidth services and best-effort services. To provide guaranteed services, the Weighted Fair Queuing (WFQ) [1] scheduling algorithm has been proposed. WFQ is a packet approximation of the idealized Generalized Processor Sharing (GPS) discipline [1]. With GPS, there is a separate FIFO queue and a pre-allocated service share for each communication session sharing a link. Intuitively, GPS serves each non-empty session in turn according to its service share and sends an in®nitesimally small amount of data from each queue. WFQ, on the other hand, sends a packet from each queue at a time. Using WFQ, a virtual ®nish time is computed for each packet in each queue and the packet with the smallest virtual ®nish time is selected ®rst. The virtual ®nish time of a packet is coupled with the share allocated to the communication session. In other words, WFQ and its variants such as SCFQ [4], SFQ [5], WF 2 Q [6] consider share as the only factor for making packet scheduling decisions. Previous work has analyzed the end-to-end delay bound using WFQ [2,3]. However, one problem is that the delay bound and the share are tightly coupled [8]. If a communication session wants to have a lower delay bound, it needs to reserve a larger share. However, in some applications, certain communication sessions may need to have a short delay even though they require only a small service share. For example, consider the control session in certain communication networks. The data volume of a control session