Computer Networks · TEE · papers

Q1(c) · Round-robin scheduling

2023-01-27 · AI-only Sem V

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

Q1(c). Set 1 contains packets 1,4,6; set 2 contains 2,3,5,7. Packet 1 arrives before t=0; 2,3,4 arrive during (0,1); 5 during (2,3); 6,7 during (3,4). Each packet takes one slot, starting at a slot boundary after arrival. Round-robin begins with set 1 and uses FIFO within a set. Give departures at t=1 through 7 and justify. [5 marks]

Answer

Given

Arrival groups in the question; one-unit service; slot-boundary starts; FIFO inside each queue.

To find

Departure order at t=1 through7.

Formula and why

At each slot start, consider only packets that have already arrived.

Round robin alternates nonempty queues, skipping an empty queue.

Solution

Step 1. Apply the queue rule at each boundary

Service intervalDeparture packetReason
[0,1)1Only packet1 has arrived.
[1,2)2Use set2: oldest is2.
[2,3)4Use set1: oldest is4.
[3,4)3Use set2: oldest is3.
[4,5)6Use set1:6 has arrived.
[5,6)5Use set2:oldest is5.
[6,7)7Set1 empty; set2 supplies7.

Step 2. Write the required ordered digits

1 2 4 3 6 5 7