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

    Bakery algorithm ensures that no process is starved.

1.  True

2.  False
in Operating System by (249 points) | 60 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

http://web.cs.iastate.edu/~chaudhur/cs611/Sp09/notes/lec03.pdf

https://www.youtube.com/watch?v=3pUScfud9Sg

by Loyal (9.8k points)
0
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,645 questions
56,601 answers
195,856 comments
102,231 users