562 views

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

### 1 comment

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

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.
by

sir why you have considered two way transfer?

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

Hii

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.

1 vote
1
130 views