• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

UGC-NET | UGC NET CS 2017 Jan - II | Question 36

There are three processes P1, P2 and P3 sharing a semaphore for synchronizing a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access the semaphore in following order : (a) P2 needs to access (b) P1 needs to access (c) P3 needs to access (d) P2 exits critical section (e) P1 exits critical section The final value of semaphore will be :

(A)

0

(B)

1

(C)

-1

(D)

-2

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments