0 votes 0 votes Operating System operating-system process-synchronization semaphore + – monty asked Jan 6, 2017 monty 967 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes A binary semphore which allows only one process into critical section can take a value 0 or 1 at any point of time. The question ask which value it is intialized to which is obviously one. Kaushik.P.E answered Jan 6, 2017 Kaushik.P.E comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments monty commented Jan 6, 2017 reply Follow Share Binary Semaphore only two value 0,1 p1 in cs n =1 ,NOW p2 enter n=2 and we use Binary Semaphore so p2 can't be enter. v(n) n=0 for p1,p2 cs p(n) @Kaushik.P.E 0 votes 0 votes Kaushik.P.E commented Jan 6, 2017 reply Follow Share ya the value will be 1. isn't this code for P2 in your comment. p(n) n=1 for p1,p2 cs v(n) 0 votes 0 votes Kaushik.P.E commented Jan 6, 2017 reply Follow Share this is a very simple question. be open minded you'll get it. If you're trying to mean that the first section is the code for both p1 and p2. Then signalling a binary semphore whose value is already 1 will not pause the execution of P2. 0 votes 0 votes Please log in or register to add a comment.