Computer AwarenessHardIBPS SO IT Officer

A counting semaphore starts at 7. Then 20 wait (P) operations and 15 signal (V) operations are performed on it. What is its final value?

  1. A. 2
  2. B. 12
  3. C. −8
  4. D. 5

Correct answer: A. 2

Each P subtracts 1 and each V adds 1: 7 − 20 + 15 = 2. A negative value would mean processes are blocked on it.

हिंदी में

एक काउंटिंग सेमाफ़ोर 7 से शुरू होता है। फिर उस पर 20 वेट (P) संक्रियाएँ और 15 सिग्नल (V) संक्रियाएँ की जाती हैं। उसका अंतिम मान क्या है?

  1. A. 2
  2. B. 12
  3. C. −8
  4. D. 5

उत्तर: A. प्रत्येक P में से 1 घटता है और प्रत्येक V में 1 जुड़ता है: 7 − 20 + 15 = 2। ऋणात्मक मान का अर्थ होता कि प्रक्रियाएँ उस पर ब्लॉक्ड हैं।

More Computer Awareness questions

Exams that ask this topic