Answer:
a. No. of times Job interrupted = 4
b. Job Finish at Which Queue = 5th
c. Time Spends on each Queue
Queue 1 = 5ms
Queue 2 = 2x 5ms = 10ms
Queue 3 = 2x 10ms = 20ms
Queue 4 = 2x 20ms = 40ms
Queue 5 = 2x 40ms = 80 ms
Explanation:
Given Data:
Total Time Required to complete the job = 80ms
Time Quantum of First Queue = 5ms
To Find
a. No. of times Job interrupted ?
b. Job Finish at Which Queue ?
c. Time Spends on each Queue?
Solution
As Given Data
Queue 1 = 5ms
each Queue has double time Quantum than Previous one so that,
Queue 2 = 2x 5ms = 10ms
Queue 3 = 2x 10ms = 20ms
Queue 4 = 2x 20ms = 40ms
Queue 5 = 2x 40ms = 80 ms
a. The System will interrupt 4 times as there are five queue in the system.
b. As mentioned in Question that 80ms will it take to complete the job so, This task will be completed in 5th Queue.
c. Total Time Spends in each queue is calculated above as
Queue 1 = 5ms
Queue 2 = 2x 5ms = 10ms
Queue 3 = 2x 10ms = 20ms
Queue 4 = 2x 20ms = 40ms
Queue 5 = 2x 40ms = 80 ms