CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A counting semaphore was initialized to 10, then 6p (wait) operations and 4V (signal) operations were completed on this semaphore. The resulting value of the semaphore is

A
0
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
8
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
10
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
12
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B 8

A counting semaphore was initialized to 10, then 6p (wait) operations and 4V (signal) operations were completed on this semaphore. The resulting value of the semaphore is 8.

A semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system.

A semaphore is a synchronization object that controls access by multiple processes to a common resource in a parallel programming environment. Semaphores are widely used to control access to files and shared memory.



flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Algebraic Operations
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon