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

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

The correct answer is

9

Each wait decreases the semaphore by 1 and each signal increases it by 1. Its final value is 8 − 3 + 4 = 9.

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. 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?

  4. 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?

  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