The Gateway to Computer Science Excellence
+1 vote
State True/False

    Bakery algorithm ensures that no process is starved.

1.  True

2.  False
in Operating System by (255 points) | 66 views

1 Answer

0 votes

True , Lamport Bakery Algorithm satisfies deadlock free  and starvation . We know that in Bakery Algorithm Each process is given a ticket number say (i). Now all those process which have ticket number less than i will enter and exit CS ,but for process with ticket number >i  cant enter in CS because process with ticket =i is not yet enter .

And if you think process with ticket > i can enter CS, then its not possible because of the below statement

(the concept of bakery algorithm)

∀j:j!=i:Num[j] = 0∨(NUM[j], IDj)≥(NUM[i] ,IDi)

This question has been asked indirectly In gate2016 OS . However you can refer to below video where they have explained the approach for it

by Loyal (9.9k points)
Yes it would be deadlock free and starved ftee
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
50,833 questions
57,723 answers
107,785 users