in Operating System edited by
562 views
7 votes
7 votes

Consider a program to be run on a computer system in round-robin CPU scheduling. The size of the program is $100K$. It is given that the hard disk has a transfer rate of $1$ megabyte per second. Assume that there are no head seeks and average latency is $8$ milliseconds. What could be the acceptable time quantum for effective CPU utilization ?

  1. $2.048$ sec
  2. $0.216$ sec
  3. $0.108$ sec
  4. $0.100$ sec
in Operating System edited by
by
562 views

1 comment

Sir, what if it were a numerical data type question? What should be the answer -- 0.216 s?
0
0

1 Answer

13 votes
13 votes
Best answer
Whenever a program is to be executed, it needs to be brought into the memory from disk, where it is residing. When the program needs to be swapped out to disk, again some time is required. For effective CPU utilization, the time quantum must be substantially greater than the context switch time.

Time required to transfer process from memory =  100K/1000K = 1/10 seconds = 100 milliseconds

Add avg. latency to process transfer time , it becomes 100 +8= 108 milliseconds for one way transfer between disk and memory for the given program. The time required two way transfer is 216 ms. Thus, for efficient CPU utilization, time quantum should be substantially greater than 216 ms. The acceptable answer from options is 2.048 sec.
selected by

4 Comments

sir why you have considered two way transfer?
1
1

For effective CPU utilization, the time quantum must be substantially greater than the context switch time.?why

0
0

Hii @Bikram Sir,

In context switching why we are swapping whole process address space of currently executing program from main memory to disk.we need to only save  content of register and program counter in the PCB.

Please Sir clear my doubt

0
0
Answer:

Related questions