WorksheetsDeadlock
Total questions: 25
Worksheet time: 13mins
What is the main problem that the Critical Section problem aims to solve?
Deadlock
Process Synchronization
Paging
Fragmentation
Which of the following is NOT a necessary condition for a solution to the Critical Section problem?
Mutual Exclusion
Progress
Bounded Waiting
Starvation
Which synchronization mechanism can be used to solve the Critical Section problem?
Semaphore
paging
Demand Paging
Thrashing
Which of the following statements about Critical Section is true?
It is a part of the program where shared resources are accessed
It always leads to deadlock
It prevents concurrent execution
It only occurs in single-threaded programs
Which of the following is NOT a classical solution to the Critical Section problem?
Peterson’s Algorithm
Bakery Algorithm
Dekker’s Algorithm
Round-Robin Scheduling
What is the primary goal of synchronization in operating systems?
Preventing deadlock
Managing CPU scheduling
Ensuring orderly execution of concurrent processes
Increasing memory size
Which of the following is NOT a synchronization mechanism?
Semaphore
Monitor
Mutex
Fragmentation
Which type of semaphore can have only two values, 0 and 1?
Binary Semaphore
Counting Semaphore
Mutex
None of the above
Which of the following synchronization mechanisms uses condition variables?
Semaphore
Monitor
Mutex
Spin lock
What does the Producer-Consumer problem deal with?
Process Scheduling
Process Synchronization
Deadlock Avoidance
Memory Allocation
Which data structure is commonly used to implement the buffer in the Producer-Consumer problem?
Stack
Queue
Linked List
Graph
Which synchronization mechanism is typically used to solve the Producer-Consumer problem?
Semaphore
Paging
Segmentation
Fragmentation
Which condition must be checked before a consumer consumes an item?
Battery is empty
Battery if full
Producer is waiting
None of the Above
What is the primary purpose of a Mutex Lock?
Process scheduling
Deadlick
Ensuring mutual exclusion in critical sections
memory Management
How many processes can hold a Mutex Lock at a time?
1
2
3
0
What happens when a process tries to acquire a Mutex Lock that is already held by another process?
It gets the lock immediately
It waits until the lock is released
It enters the critical section
It terminates
What happens when a process tries to acquire a Mutex Lock that is already held by another process?
It gets the lock immediately
It waits until the lock is released
It enters the critical section
It terminates
Which of the following is true about Mutex Locks?
They allow multiple processes to access a resource simultaneously
They help achieve process synchronization by mutual exclusion
They do not require any waiting mechanism
They are used for memory allocation
What is the key difference between a Mutex and a Binary Semaphore?
Mutex can be acquired by multiple processes, but a Binary Semaphore cannot
Mutex has ownership, while a Binary Semaphore does not
Binary Semaphore allows only one process at a time, but Mutex does not
Mutex is used for signaling, while a Binary Semaphore is not
What is the initial state of a Mutex Lock?
Locked
Unlocked
Waiting
Suspended
Which problem can arise if a Mutex Lock is not released properly?
Deadlock
Fragmentation
Thrashing
Paging
Which function is used to acquire a Mutex Lock in a multithreading environment?
release()
wait()
lock()
acquire()
Which of the following operations are performed on a Mutex Lock?
wait() & signal()
lock() & unlock()
allocate() & free()
open() & close()
What is the key advantage of using Mutex Locks over spinlocks?
No CPU time is wasted when waiting
It allows multiple processes in the critical section
It does not require mutual exclusion
It prevents deadlock completely
Which of the following issues can be resolved using a Mutex Lock?
Deadlock
Race condition
Fragmentation
Thrashing
