Powered By Blogger

Aug 12, 2024

Operating Systems MCQ Unit-3

 The critical section problem is primarily concerned with:

a) Process creation

b) Memory management

c) Process synchronization

d) Deadlock prevention


Which of the following conditions must be satisfied to solve the critical section problem?

a) Mutual Exclusion, Progress, Bounded Waiting

b) Mutual Exclusion, Deadlock, Fairness

c) Progress, Fairness, Memory Management

d) Mutual Exclusion, Paging, Swapping


The principle of mutual exclusion ensures that:

a) Multiple processes can enter their critical sections simultaneously

b) Only one process is allowed to execute in its critical section at a time

c) Processes execute independently without synchronization

d) No process enters the critical section


A mutex lock is used to:

a) Allow multiple processes to enter the critical section

b) Protect a critical section by ensuring mutual exclusion

c) Switch between user and kernel modes

d) Handle memory allocation dynamically


If a process holds a mutex lock, and another process tries to acquire it:

a) The other process will proceed immediately

b) The other process will be blocked until the lock is released

c) Both processes will enter the critical section

d) The lock will be shared between the processes


Which of the following problems can occur if a mutex lock is not used properly?

a) Deadlock

b) Starvation

c) Race Condition

d) All of the above


The Dining Philosophers problem is an example of:

a) Deadlock

b) Starvation

c) Mutual Exclusion

d) All of the above


In the Producer-Consumer problem, the buffer is used to:

a) Store processes

b) Store resources

c) Store items produced by the producer before they are consumed by the consumer

d) Store memory allocation information


In the Readers-Writers problem, a writer is allowed to write if:

a) No other process is writing

b) No process is reading or writing

c) At least one reader is reading

d) Another writer is writing


Which of the following is a solution to prevent deadlock in the Dining Philosophers problem?

a) Allowing at most 3 philosophers to sit at the table at the same time

b) Using semaphores to restrict the number of philosophers that can pick up forks

c) Allowing philosophers to eat in turns

d) Avoiding the use of shared resources


No comments:

Post a Comment

Featured Post

Data Analysis

    What is data analysis and its significance?   Data analysis is the process of collecting, transforming, and organizing data to dr...

Popular Posts