search
Log In
0 votes
194 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
edited by
194 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
0
Yes iii iv will not affect result

Please log in or register to answer this question.

Related questions

1 vote
1 answer
1
699 views
Consider the code fragment: count = 3; S1; Fork L1; L1: S3; S2; goto L3; S4; Fork L2; L2: S6; goto L3; S5; L3: join count S7 Which one of the following represents correct precedence graph of the above code fragment? the answer is given but I’m getting where am I wrong?
asked Jun 12, 2019 in Operating System aditi19 699 views
0 votes
0 answers
2
161 views
User level threads doesnot require context switching- This is a true statement (Because OS cannot recognize user level threads) Can somebody elaborate more on it?? This given answer is wrong I think:https://gateoverflow.in/290648/made_easy_test_series Plz check
asked May 19, 2019 in Operating System srestha 161 views
0 votes
1 answer
3
170 views
Consider a system using demand paging architecture it takes $3ms.$ to service page fault if either empty frame is available or replaced page is not to be modified takes $10ms.$ if replaced page is modified. Main Memory access time is $1ms.$ and page to be replaced ... $60$% of time. The maximum acceptable page fault rate to get effective memory access time not more than $4ms.$ is_________(%)
asked May 15, 2019 in Operating System srestha 170 views
1 vote
2 answers
4
111 views
Which of the following best characterize by Memory Mapped -I/O? $A)$ Additional hardware for bus is required to control the IO bus and memory bus. $B)$ Some of the address space is separated from memory space and assigned them to I/O ports. $C)$ Common bus is ... /O different control signal is used $D)$ None of these I havenot got this answer to Galvin. Someone plz. give the concept used here .
asked May 14, 2019 in Operating System srestha 111 views
...