Anonymous user menu

Virtual GATE 2015 - Question 60

Given Answer Key: C
Discuss the solution.

1Comment
Damodhar @damodhar
29 Jan 2015 06:16 pm

Here I'm considering Queue as Critical Section

1 st one true

Because in question they given f=0 so whenever queue is empty then process2 cannot dequeue the element (process1 after inserting atleast one element does up on f the process2).

 

2nd one is false e=N means it is counting semaphore so it counts no.of elememts we can insert into the Queue.

3rd option also True

if b=1and f=1then process1 OR process2 can access the queue so avoid this ambiguity we are using b.. If process 1 is in critical section then other process cannot enter into critical section .. so I and III are correct