The Gateway to Computer Science Excellence
0 votes
128 views

Consider the following proposed solution to dining Philosopher’s problem to avoid deadlock. Consider the binary semaphore lock is initialized to 1.

Which of the following is correct?

Removing (i) and (ii) will not affect the code. The code will still work fine.

Removing (iii) and (iv) will not affect the code. The code still work fine.

Removing both (i), (ii), (iii) and (iv) will not affect the code. The code will still work fine.

All (i), (ii), (iii) and (iv) are necessary. Removal of any of them will affect the code.

in Operating System by Loyal (5.7k points)
edited by | 128 views
0
Where is question?
0
I think removal of 3 and 4 won't affect the result

But removal of 1 and 2 will cause deadlock
0
can u explain in detail
0
I think all 4 necessary
otherwise remove all 4

Please log in or register to answer this question.

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
50,737 questions
57,291 answers
198,209 comments
104,897 users