All Exams Test series for 1 year @ ₹349 only
Question

At a particular time of computation, the value of a counting semaphore is 7. Then 20 P(wait) operations and 15 V(signal) operations are completed on this semaphore. What is the resulting value of the semaphore?

The correct answer is

2

Each completed P operation decreases the counting semaphore by one; each V operation increases it by one. Its final value is \(7-20+15=2\).

Was this answer helpful?

Important Questions from Operating System Solution

  1. Match List I with List II:

    List IList II
    (A)Least frequently used(I)Memory is distributed among processors
    (B)Critical Section(II)Page replacement policy in cache memory
    (C)Loosely coupled multiprocessor system(III)Program section that once begin must complete execution before another processor access the same shared resource
    (D)Distributed operating system organization(IV)O/S routines are distributed among available processors.

    Choose the correct answer from the options given below:

  2. Two atomic operations permissible on Semaphores are __________ and __________.

  3. Which interprocess communication model is defined by cooperative processes exchanging messages through explicit send and receive operations, rather than reading and writing a shared memory region?

  4. A counting semaphore is initialized to 8. 3 wait() operations and 4 signal() operations are applied. Find the current value of semaphore variable.

  5. Which of the following is/are the common services provided by an operating system?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App