Assume that the following jobs are to be executed on a single processor…

1997

Assume that the following jobs are to be executed on a single processor system. The jobs are assumed to have arrived at time t = 0 and in the order P, Q, R, S, T; calculate the departure time (completion time) for job P if scheduling is round robin with time slice 1.

Job

CPU Burst Time

P

4

Q

1

R

8

S

1

T

2

  1. A.

    4

  2. B.

    10

  3. C.

    11

  4. D.

    12

Attempted by 56 students.

Show answer & explanation

Correct answer: C

In Round Robin scheduling with a time slice of 1, jobs are executed in order P, Q, R, S, T. Each job runs for 1 unit of time before moving to the back of the queue.

Job P requires 4 units of CPU time. It runs at intervals: t=0-1, t=5-6, t=8-9, and finally completes at t=10-11.

Detailed timeline: - 0-1: P (3 left) - 1-2: Q (done) - 2-3: R (7 left) - 3-4: S (done) - 4-5: T (1 left) - 5-6: P (2 left) - 6-7: R (6 left) - 7-8: T (done) - 8-9: P (1 left) - 9-10: R (5 left) - 10-11: P (done)

Job P completes at time t=11.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir