1.

A semaphore is a shared integer variable __________(a) that can not drop below zero(b) that can not be more than zero(c) that can not drop below one(d) that can not be more than oneThe question was posed to me during a job interview.This question is from Process Synchronization in section Processes of Operating System

Answer»

Right CHOICE is (a) that can not drop below ZERO

Explanation: A semaphore is a shared integer variable that can not drop below zero. In binary semaphore, if the value of the semaphore variable is zero that means there is a process that uses a CRITICAL RESOURCE and no other process can access the same critical resource until it is released. In COUNTING semaphore, if the value of the semaphore variable is zero that means there is no resource available.



Discussion

No Comment Found

Related InterviewSolutions