Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

4.2 Mathematical Modeling of Queuing: GPS and WFQ

Lesson 25 of 34 in the free High Speed Networks notes on Siksha Sarovar, written by Rohit Jangra.

4.2.1 Fair Queuing (FQ) Basics

In standard FIFO, a large "bulky" packet blocks a small "interactive" packet. FQ creates separate queues for each flow and services them bit-by-bit logically.

4.2.2 Generalized Processor Sharing (GPS)

GPS is the theoretical "ideal" fluid-flow model.

  • Concept: The server processes bits from all non-empty queues simultaneously.
  • Guarantees: Flow $i$ is guaranteed a rate $R_i = rac{w_i}{sum w_j} C$.
  • Efficiency: If a flow is idle, its capacity is redistributed proportionally to active flows.

4.2.3 Weighted Fair Queuing (WFQ)

Since we cannot send bits in parallel from different packets, WFQ emulates GPS by sending packets in order of their Virtual Finishing Times.

Finishing Time Calculation Algorithm:

For packet $k$ of flow $i$: $$F_{i,k} = max(F_{i,k-1}, V(a_{i,k})) + rac{L_{i,k}}{w_i}$$

  1. $a_{i,k}$: Arrival time.
  2. $L_{i,k}$: Packet length.
  3. $w_i$: Flow weight.
  4. $V(t)$: Virtual Time (Round Number) of the system.

Numerical Scenario Trace:

Suppose Flow 1 ($w=1$) and Flow 2 ($w=2$) share a 30Mbps link. All packets size 1000 bits.

  • Packet 1 (Flow 1) arrives at $t=0$: $F_{1,1} = 0 + 1000/1 = 1000$.
  • Packet 1 (Flow 2) arrives at $t=0$: $F_{2,1} = 0 + 1000/2 = 500$.
  • Result: Packet 2 (Flow 2) is transmitted first, as its Finishing Time is earlier.

4.2.4 Bit-Round Fair Queuing (BRFQ)

BRFQ is a variation that uses "bit-rounds" (the time to send one bit from each active flow) as the unit of Virtual Time. It is computationally simpler for high-speed switch ASICs.