CS FundamentalsVery hardGATE CS (PYQ pattern)
A leaky bucket holds at most 5 packets and leaks (sends) 1 packet at the end of every tick. In ticks 1 to 8, packets arrive as 3, 4, 0, 5, 2, 0, 0, 6; arrivals are added at the start of the tick and any that do not fit are dropped, then one packet leaks. How many packets are dropped in total?
- A. 9
- B. 11
- C. 7
- D. 8
Correct answer: D. 8
Tracking the occupancy tick by tick (add arrivals, cap at 5 and count overflow, then remove 1): the overflows sum to 8.
More Computer Networks questions
- A WFQ scheduler (bit-by-bit round robin approximation) serves three flows backlogged at time 0 with weights A = 2, B = 1, C = 1. Packet…
- Four flows share links: a uses L1; b uses L1 and L2; c uses L2 and L3; d uses L3. Link capacities (Mbps): L1 = 12, L2 = 6, L3 = 10. What…
- A router has four routes to the same prefix (local-pref, AS-path length, origin type, MED, learned via, IGP cost to next hop): R1 (100, 3…
- A TCP sender starts with cwnd = 1 MSS and ssthresh = 16 MSS. Each round trip: if cwnd < ssthresh the window doubles (but never beyond…
- Two TCP flows (Tahoe and Reno) both start with cwnd = 1 MSS and ssthresh = 16 MSS and grow identically (doubling up to ssthresh, then +1…
- Using the Mathis approximation, throughput = 1.22 x MSS / (RTT x sqrt(p)), what is the steady-state throughput of a TCP flow with MSS =…