recategorized by
2,204 views
2 votes
2 votes

Starvation can be avoided by which of the following statements:

  1. By using shortest job first resource allocation policy .
  2. By using first come first serve resources allocation policy.
  1. (i) only
  2. (i) and (ii) only
  3. (ii) only
  4. None of the options
recategorized by

3 Answers

4 votes
4 votes

I think of option (D) none of the options is correct.

For shortest time first, process with high burst time will starve. 

While for first come first serve, if the very first process has very large burst time say 1000 while other arriving process have very low burst time say 1. then they have to wait for very long time for first process to be completed and therefore starve. Therefore none of the above two can avoid starvation

Edit : Thanks @Kshitij_Kumre for pointing out my mistake.

So the point that is need to be understood here is the definition of starvation, starvation means “INDEFINITE waiting”  means "we don't know how much time we should wait".  In algorithm like SJF, the waiting time for processes with large burst time cannot be determined as several processes with low burst time may keep coming and therefore it is indefinite. This waiting time can be very long and is indefinite, therefore starvation.

But for FCFS although the waiting time can be very large if the first or early process have large burst time [The phenomenon is also known as convoy effect], but still it is not indefinite because we can always calculate it for any given process as the sum of burst time of all the process before it and therefore cannot be considered as starvation. 

So the correct answer is Option (C) (ii) only.

edited by
1 votes
1 votes
Option C is correct.

In case of shortest job first policy, it causes Starvation with for the job with highest burst time if shorter jobs keep coming into.
1 votes
1 votes

Here option (C) is correct.

→ For SJF  process with highest burst time causes starvation while it comes befor the process with shortest burst time.

→ In  FCFS  , if process  P1 having very  large burst time comes before the process P2 having very  low burst time then according to FCFS P1 will  shedule first and P2 will wait for long time.So this condition called CONVAY EFFECT. For this condition we can not say starvation.

NOTE→ STARVATION  will cause  when  process will be BIASED.

 

Answer:

Related questions

4 votes
4 votes
3 answers
1
admin asked Mar 31, 2020
2,213 views
Process is in a ready state _______ .when process is scheduled to run after some executionwhen process is unable to run until some task has been completedwhen process is ...
1 votes
1 votes
4 answers
2
admin asked Mar 31, 2020
2,086 views
If file size is large and if it is to be accessed randomly then which of the following allocation strategy should be best to use in a system?Linked allocationIndexed allo...
2 votes
2 votes
4 answers
3
admin asked Mar 31, 2020
17,095 views
Operating System maintains the page table for :each processeach threadeach instructioneach address
1 votes
1 votes
2 answers
4
admin asked Mar 31, 2020
2,436 views
Non-contiguous memory allocation splits program into blocks of memory called ________ that can be loaded in non-adjacent holes in main memory.PagesFramesPartitionSegments...