The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+19 votes
2k views

Which of the following statements are true?

  1. Shortest remaining time first scheduling may cause starvation
  2. Preemptive scheduling may cause starvation
  3. Round robin is better than FCFS in terms of response time
    1. I only
    2. I and III only
    3. II and III only
    4. I, II and III
asked in Operating System by Veteran (101k points)
edited by | 2k views

2 Answers

+35 votes
Best answer

Answer is (D).

  1. In SRTF ,job with the shorest CPU burst will be scheduled first bcz of this process with large CPU burst may suffer from starvation
     
  2. In preemptive scheduling , suppose process $P1$ is executing in $CPU$ and  after some time process $P2$ with high priority then $P1$ will arrive in ready queue then $p1$ is prrempted and $p2$ will brought into CPU for execution. In this way if process which is arriving in ready queue is of higher prioirity then $p1$, then $p1$ is always preempted and it may possible that it suffer from starvation.
     
  3. Round robin will give better response time then FCFS ,in FCFS when process is executing ,it executed upto its complete burst time, but in round robin it will execute upto time quantum.
answered by Active (4.1k points)
edited by
0
please point me to link where can i find info about preemptive scheduling ?
+4

preemtive just means a process before completing its execution is stopped and other process can start execution. The stopped process can later come back and continue from where it was stopped. 
http://web.cs.wpi.edu/~cs3013/c07/lectures/Section05-Scheduling.ppt

0
I am confused what is Response time exactly ? had it been SRTF instead of FCFS what would be the answer then ?
0
Response time is not related to FCFS and SRTF.
0
I have a doubt...

Statement III can be wrong when Time Quantum is greater than largest burst time.

I am not sure. I am just asking you.
+1
Yes, then RR will degenerate to FCFS. So response time will no more be better.
0

can we say that all scheduling  algo suffers starvation?

but m not getting any valid reason for FCFS

https://gateoverflow.in/80024/cpu-scheduling

0

Why option II is correct.

There are many examples of preemptive scheduling algorithm out of which some may cause starvation and some will not cause any starvation.

Eg. Shortest Remaining time first -starvation may be present,

      Round Robin algorithm - starvation is not possible.

So how can we say that Option II is correct??

0
if statement 1 is correct then statement 2 will also be correct because SRTF is preemptive version of SJF
0

@Yogesh Dhawale we need atleast one reason to say that  "preemptive scheduling algorithm may cause starvation" that we got in our statement 1 i.e "Shortest remaining time first scheduling may cause starvation"(True) so statement 2 is correct.

0

they are saying  in preemptive scheduling algorithm may cause starvation.they are not saying always.there is chance of starvation it is clearly stated in option 

  1. Shortest remaining time first scheduling may cause starvation
–1 vote
A) True

It is possible that new process may come which has smaller time then current executing process which may lead to starvation

B) True

As stated in option A

C) True if time quantum is larger then the largest process then it will be equal to FCFS and in rest of the case RR is always better then round robin
answered by Boss (16.5k points)
edited by
0
IF time quantum is that much greater then there is no round robin concept


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

39,529 questions
46,674 answers
139,823 comments
57,593 users