\begin{table}[h]
\centering
\begin{tabular}{ll}
$a_i^k$ & arrival time of the $k^{th}$ packet on session $i$ \\
$b_{i,s}^k$ & the time the $k^{th}$ packet on session $i$ begins service under the $s$ server \\
$d_{i,s}^k$ & the time the $k^{th}$ packet on session $i$ departs under the $s$ server \\
$B_s(\tau)$ & the set of backlogged sessions at time $\tau$ under the $s$ server \\
$Q_{i,s}(\tau)$ & the queue size of session $i$ at time $\tau$ under the $s$ server \\
$W_{i,s}(t_1,t_2)$ & the amount of work received by session $i$ during the time interval $[t_1,t_2]$ under the $s$ server \\
$L_i^k$ & size of the $k^{th}$ packet on session $i$ in number of bits \\
$L_{i,\max}$ & maximum packet size of session $i$ \\
$L_{\max}$ & maximum packet size among all sessions \\
$r$ & link speed \\
$r_i$ & guaranteed rate for session $i$ \\
\end{tabular}
\caption{Notation Used in this Paper}
\label{table_1}
\end{table}

bucket constrained at the source. He also proposed a packet approximation algorithm for GPS which he called Packet-by-Packet Generalized Processor Sharing or PGPS. It turns out that PGPS is identical to the weighted version of Fair Queueing or WFQ. Parekh has established several important relationships between a fluid GPS system and it's corresponding packet WFQ system:

1. in terms of delay, a packet will finish service in a WFQ system later than in the corresponding GPS system by no more than the transmission time of one maximum size packet;

2. in terms of total number of bits served for each session, a WFQ system does not fall behind a corresponding GPS system by more than one maximum size packet.

The above result can easily be mis-interpreted to say that the packet WFQ discipline and the fluid GPS discipline provide almost identical service except for a difference of one packet. Contrary to this popular (but incorrect) belief, we will demonstrate that there could be large discrepancies between the services provided by WFQ and GPS. In fact, what has been proved is that WFQ cannot fall behind GPS by one maximum size packet. However, WFQ can be far ahead of GPS in terms of number of bits served for a session. Since many congestion control algorithms \cite{9,14} were designed with the assumption that WFQ will provide almost identical service with GPS, large discrepancies between the two disciplines and the lack of knowledge that such discrepancies exist will result in unstable and less efficient network control algorithms.

To overcome the limitation of WFQ, we propose a new and better packet approximation algorithm of GPS called Worst-case Fair Weighted Fair Queueing or WF$^2$Q. We show that WF$^2$Q provides almost identical service to GPS with a maximum difference of one packet size, and it shares both the bounded-delay and fairness properties of GPS.

\section{GPS and WFQ}

In this section, we first define GPS and its most popular packet approximation algorithm WFQ, then describe the important difference between these two disciplines.

A GPS server serving $N$ sessions is characterized by positive real numbers, $\phi_1, \phi_2, \cdots, \phi_N$. The server operates at a fixed rate $r$ and is work-conserving\footnote{A server is work-conserving if it is never idle whenever there are packets to be transmitted. Otherwise, it is non-work-conserving.}. Let $W_i(t_1,t_2)$ be the amount of session $i$ traffic served in the interval $[t_1,t_2]$, then a GPS server is defined as one for which

\begin{equation}
\frac{W_i(t_1,t_2)}{W_j(t_1,t_2)} \ge \frac{\phi_i}{\phi_j}, \quad j = 1,2,\cdots,N
\end{equation}

holds for any session $i$ that is backlogged throughout the interval $[t_1,t_2]$ \cite{13}. From the definition, it immediately follows that if $B_{GPS}(\tau)$, the set of backlogged sessions at time $\tau$, remains unchanged during any time interval $[t_1,t_2]$, the service rate of session $i$ during the interval will be exactly

\begin{equation}
r_i^*(t_1,t_2) = \frac{\phi_i}{\sum_{j \in B_{GPS}(t_1)} \phi_j} r
\end{equation}

where $r$ is the link speed. Since $B_{GPS}(t_1)$ is a subset of all the sessions at the server, it is easy to see that

\begin{equation}
r_i^*(t_1,t_2) \ge r_i
\end{equation}

holds where

\begin{equation}
r_i = \frac{\phi_i}{\sum_{j=1}^{N} \phi_j} r
\end{equation}

Therefore, session $i$ is guaranteed a minimum service rate of $r_i$ during any interval when it is backlogged. Let the time interval length go to zero, we get the instantaneous service rate of the session, $r_i^*(\tau)$.

Notice that GPS is an idealized server that does not transmit packets as entities. It assumes that the server can serve all backlogged sessions simultaneously and that the traffic is infinitely divisible. In a more realistic packet system, only one session can receive service at a time and an entire packet must be served before another packet can be served. There are different ways of emulating GPS service in a packet system. The most popular one is the Weighted Fair Queueing discipline (WFQ) \cite{4}, also known as Packet Generalized Processor Sharing or PGPS \cite{13}.