Question : Which classical synchronization problem can be solved using counting semaphores?
Solution :
Correct Answer : Producer–Consumer problem
Description -
Question : Which operations are used to modify the value of a semaphore?
Solution :
Correct Answer : wait() and signal()
Description -
Question : What happens when the semaphore value becomes zero in a counting semaphore?
Solution :
Correct Answer : Processes must wait until resources become available
Description -
Question : In a counting semaphore, the initial value of the semaphore represents:
Solution :
Correct Answer : Number of available resources
Description -
Question : What is a counting semaphore used for in an operating system?
Solution :
Correct Answer : Synchronizing processes with multiple resource instances
Description -
Question : Counting semaphore allows values:
Solution :
Correct Answer : Greater than or equal to 1 and also 0
Description -
Question : Which type of semaphore allows only two values (0 and 1)?
Solution :
Correct Answer : Binary semaphore
Description -
Question : What happens when the semaphore value is zero during a wait operation?
Solution :
Correct Answer : Process must wait
Description -
Question : Which two basic operations are used in semaphores?
Solution :
Correct Answer : Wait and Signal
Description -
Question : What is a semaphore in an operating system?
Solution :
Correct Answer : An integer variable used for synchronization
Description -
Question : In the producer–consumer problem, the consumer goes to sleep when:
Solution :
Correct Answer : Buffer is empty
Description -
Question : In the producer–consumer problem, the producer goes to sleep when:
Solution :
Correct Answer : Buffer is full
Description -
Question : The sleep and wake mechanism is commonly used to solve which synchronization problem?
Solution :
Correct Answer : Producer–Consumer
Description -
Question : The wakeup() system call is used to:
Solution :
Correct Answer : Resume a blocked process
Description -
Question : In an operating system, the sleep() system call is used to:
Solution :
Correct Answer : Block a process until another process wakes it
Description -
Question : The main advantage of synchronization without busy waiting is:
Solution :
Correct Answer : Efficient CPU utilization
Description -
Question : When the semaphore value becomes negative during wait(), what happens?
Solution :
Correct Answer : Process is moved to waiting queue
Description -
Question : What data structure is associated with each semaphore to avoid busy waiting?
Solution :
Correct Answer : Queue (waiting queue)
Description -
Question : Which two operations are used in semaphore implementation without busy waiting?
Solution :
Correct Answer : block() and wakeup()
Description -
Question : In synchronization without busy waiting, when a process cannot enter the critical section it is:
Solution :
Correct Answer : Blocked and placed in a waiting queue
Description -