Os MCQ Unit2
Os MCQ Unit2
Os MCQ Unit2
Answer: a
Answer: c
a) Ensures that only one process can enter the critical section at a time
Answer: a
Answer: b
5. In process synchronization, which problem involves readers and writers trying to access a shared
database?
a) Producer-consumer problem
c) Readers-writers problem
d) Banker's algorithm
Answer: c
Answer: b
Answer: b
Answer: b
c) To detect deadlocks
Answer: b
b) To avoid deadlocks
Answer: c
Answer: b
Answer: b
c) A type of semaphore
d) A scheduling algorithm
Answer: a
Answer: c
17. What is the key idea behind the Banker's algorithm for deadlock avoidance?
Answer: d
b) Circular wait
c) Shared resources
d) Paging
Answer: b
a) A state where the system can allocate resources without entering deadlock
Answer: a
20. Which of the following methods handles deadlocks by periodically checking for their
occurrence?
a) Deadlock avoidance
b) Deadlock detection
c) Deadlock prevention
d) Mutual exclusion
Answer: b
Answer: b
22. In the context of paging, what does a page frame refer to?
Answer: a
Answer: b
24. In deadlock detection, what is the resource allocation graph used for?
Answer: b
25. What is the purpose of the "turn" variable in Peterson's solution?
Answer: a
Answer: a
b) A condition where a set of processes cannot proceed because they are waiting on each other
Answer: b
a) A condition where only one process can access a shared resource at a time
b) A strategy to prevent deadlock
Answer: a
29. Which of the following prevents the circular wait condition in deadlock?
Answer: a
Answer: b
31. What role does the "flag" variable play in Peterson's solution?
Answer: b
Answer: b
34. Which of the following synchronization tools can be used to avoid the critical section problem?
a) Virtual memory
b) Paging
c) Semaphores
d) Swapping
Answer: c
Answer: a
Answer: a
Answer: b
39. What is the primary difference between deadlock prevention and deadlock avoidance?
a) Deadlock prevention guarantees no deadlocks, while deadlock avoidance may allow deadlocks
Answer: a
Answer: c
Answer: a
Answer: c
Answer: d
Answer: a
Answer: b
Answer: b
Answer: a
48. Which of the following deadlock handling methods involves killing one or more processes?
a) Deadlock prevention
b) Deadlock detection
c) Deadlock recovery
d) Deadlock avoidance
Answer: c
49. Which of the following conditions is necessary for deadlock avoidance?
Answer: a
b) To prevent deadlocks
Answer: c
Answer: a
52. What happens when a process performs a "wait" operation on a semaphore with a value of 0?
Answer: b
Answer: a
Answer: b
55. Which of the following memory management techniques can cause internal fragmentation?
a) Segmentation
b) Paging
c) Swapping
d) Virtual memory
Answer: b
56. What is the main characteristic of the "Dining Philosophers" problem?
a) It illustrates how processes can cause deadlock if they don’t communicate properly
Answer: a
Answer: b
Answer: b
59. Which condition is necessary for a resource allocation graph to indicate a deadlock?
a) No available resources
b) A cycle in the graph
d) Multiple semaphores
Answer: b
c) To prevent deadlocks
Answer: b
61. What does the term "bounded buffer" refer to in process synchronization?
Answer: b
Answer: d
Answer: b
Answer: a
Answer: b
Answer: a
68. In deadlock prevention, how can the hold and wait condition be avoided?
Answer: b
b) To check for deadlocks by showing which processes are waiting for resources
Answer: c
Answer: a
Answer: b
Answer: c
74. Which condition is violated if a resource can be forcibly taken away from a process?
a) Mutual exclusion
c) Circular wait
d) No preemption
Answer: d
Answer: a
b) Internal fragmentation wastes space inside memory partitions; external fragmentation wastes
space outside partitions
c) Internal fragmentation occurs during deadlock; external fragmentation occurs during paging
d) Internal fragmentation happens with virtual memory; external fragmentation happens with
physical memory
Answer: b
Answer: a
a) A problem where processes must alternate between reading and writing shared data
c) A synchronization issue where multiple readers or writers want to access shared data
Answer: c
b) To move processes between main memory and disk when memory is full
Answer: b