475 views
1 votes
1 votes
Consider a uniprocessor system with n processes in the ready queue. Round robin scheduling with time quantum x is used for process scheduling. Assume each process requires kx seconds to complete and the context switch takes 0 seconds. At what time the first process will complete the execution? (assume all the variables as integers).

A) nkx

 B) k(nx-1)

C) k(nk+n)

D) x(nk-n+1)

2 Answers

2 votes
2 votes

Since each process takes kx time, for any process to be completed, it needs to go through k cycles of scheduling.
Now, since we were asked about 1st process, we don't need to calculate for all k cycles, we only need to calculate for (k-1) cycles and plus x for last cycle.
i.e (k-1) cycles + x
We have n process in each cycle and each process takes x time, therefore time taken for (k-1) cycles is
n(k-1)x
total execution time for 1st process is
=> n(k-1)x + x
=> x(n(k-1) + 1)
=> x(nk - n + 1)

which is the answer

Related questions

1.5k
views
1 answers
0 votes
anupamsworld asked Jun 6, 2022
1,497 views
Lets consider one situation where,OS is scheduling processes(P1,P2,P3...Pn) with Round Robin method and current running process is P1 and next scheduled process ... quantum=3unit for the given data below. AT=Arrival Time, BT=Burst Time
4.7k
views
6 answers
8 votes
rahul sharma 5 asked Aug 26, 2017
4,716 views
If we have only one process in ready queue with burst time "m", then how many context switching will happen using round robing scheduling with time quantum ... that dispatching the process first time is not counted as a context switch.
1.4k
views
1 answers
1 votes
jayadev asked Oct 10, 2021
1,388 views
in round robin algorithm if a process with burst time = 10 arrived at t=0 and time quantum is 2 units, context switch time is 2 units . Then completion time of the process will be?
2.4k
views
1 answers
0 votes
admin asked Oct 25, 2019
2,388 views
Explain how time quantum value and context switching time affect each other, in a round-robin scheduling algorithm.