in GATE retagged by
691 views
1 vote
1 vote
A program is running on a computer system in round-robin CPU scheduling. The size of the program is $100$$K$. 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$. When a program is to be executed, it needs to be brought into memory from the disk (where it resides).

The acceptable time quantum for effective $CPU$ utilization could be  _________ $seconds$.
in GATE retagged by
by
691 views

1 comment

@Bikram sir,

what about the size of the program whether it is 100 KB or Kb???
3
3

1 Answer

1 vote
1 vote
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 becomes 108 milliseconds for one way transfer between disk and memory for the given program. Now the time required two way transfer is 216 ms. Thus, for efficient CPU utilization, time quantum should be substantially greater than 216 ms. Which is equal to is 0.216  sec.
selected by

4 Comments

Yes, swapping out - to disk should be mentioned in question. And also it asks for min. 50% efficency?
2
2
By "average" latency, I'm assuming you mean the rotational latency, which is half the time it takes for the disk to make a full rotation. Then some requests will take less, and some more than 8 ms. So, we should take twice that latency (= 16 ms) to make sure every request is satisfied within that limit.
0
0

@Arjun Sir,

In general round robin scheduling it is not like that everytime quantum expires process is swapped out ..it is added to FCFS queue instead hence context switch time is storiing PCB to end loading one at front ..am I right ?

0
0
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

64.3k questions

77.9k answers

244k comments

80.0k users