Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



22. A counting semaphore is initialized to 15. Then, 4 wait operations and 2 signal operations are completed on this semaphore. The resulting value of the semaphore is ____________.

(A) 11   (B) 13   (C) 17   (D) 19






Solution

Explanation: Each wait (P) decrements; each signal (V) increments. Initial: 15 → after 4 waits: 11 → after 2 signals: 13. $$ 15 - 4 + 2 = 13 $$


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...