Operating Systems Concepts - Engineering

Q1:

The initial value of the semaphore that allows only one of the many processes to enter their critical sections, is

A 8

B 1

C 16

D 0

E None of the above

ANS:B - 1

Semaphores are of two types:

Binary Semaphore".

This is also known as mutex lock. It can have only two values " 0 and 1. "Its value is initialized to 1". It is used to implement the solution of critical section problems with multiple processes.

Counting Semaphore".

Its value can range over an unrestricted domain. It is used to control access to a resource that has multiple instances.