A Learning Platform

SUCCESS

Success = Discipline + Consistency + Sacrifice.
Discipline - in what you do.
Consistency - in what you do.
Sacrifice - for what you do.

                   -- Manjunatha C. P. --

OPERATING SYSTEM MCQ SET 5

1. Process synchronization is required to:
A) Increase CPU speed
B) Avoid race conditions
C) Reduce memory usage
D) Improve disk performance

B) Avoid race conditions

2. The critical section problem deals with:
A) Deadlock avoidance
B) Mutual exclusion
C) CPU scheduling
D) Memory allocation

B) Mutual exclusion

3. Which of the following is NOT a requirement for a solution to the critical section problem?
A) Mutual exclusion
B) Progress
C) Bounded waiting
D) Preemption

D) Preemption

4. A race condition occurs when:
A) CPU executes too fast
B) Output depends on timing of concurrent execution
C) Processes execute sequentially
D) Deadlock occurs

B) Output depends on timing of concurrent execution

5. Which software-based solution is used for process synchronization?
A) Test-and-set
B) Peterson’s solution
C) Semaphore
D) Mutex

B) Peterson’s solution

6. Peterson’s solution works for:
A) Multiple processes
B) Only two processes
C) Only threads
D) Distributed systems

B) Only two processes

7. Which hardware instruction is commonly used for synchronization?
A) ADD
B) MOV
C) Test-and-set
D) JMP

C) Test-and-set

8. Busy waiting occurs when:
A) Process is blocked
B) Process repeatedly checks for availability
C) CPU is idle
D) I/O is slow

B) Process repeatedly checks for availability

9. A mutex is used to:
A) Schedule processes
B) Provide mutual exclusion
C) Allocate memory
D) Avoid deadlocks

B) Provide mutual exclusion

10. Which of the following allows only one process to access a resource at a time?
A) Semaphore
B) Mutex
C) Monitor
D) Both B and C

D) Both B and C

11. A counting semaphore can have values:
A) 0 or 1 only
B) Only positive values
C) Any integer value
D) Only negative values

C) Any integer value

12. Binary semaphore is also known as:
A) Counting semaphore
B) Mutex
C) Monitor
D) Spinlock

B) Mutex

13. The P (wait) operation on semaphore:
A) Increments semaphore value
B) Decrements semaphore value
C) Tests semaphore value
D) Resets semaphore value

B) Decrements semaphore value

14. The V (signal) operation on semaphore:
A) Decrements semaphore value
B) Tests semaphore value
C) Increments semaphore value
D) Blocks process

C) Increments semaphore value

15. Which synchronization tool avoids busy waiting?
A) Spinlock
B) Semaphore with blocking
C) Test-and-set
D) Atomic instruction

B) Semaphore with blocking

16. A monitor is:
A) Hardware device
B) High-level synchronization construct
C) CPU scheduler
D) Memory manager

B) High-level synchronization construct

17. Which problem demonstrates synchronization issues?
A) Dining Philosophers
B) Page replacement
C) Disk scheduling
D) File allocation

A) Dining Philosophers

18. Starvation occurs when:
A) CPU is idle
B) Process never gets required resources
C) Deadlock happens
D) I/O is slow

B) Process never gets required resources

19. Which of the following ensures bounded waiting?
A) Mutual exclusion
B) Progress
C) Fair scheduling
D) Busy waiting

C) Fair scheduling

20. Which synchronization mechanism is easiest to use correctly?
A) Spinlock
B) Semaphore
C) Monitor
D) Test-and-set

C) Monitor

21. Which of the following problems occurs if semaphore operations are not atomic?
A) Deadlock
B) Starvation
C) Race condition
D) Context switching

C) Race condition

22. Which of the following uses busy waiting?
A) Mutex
B) Spinlock
C) Monitor
D) Blocking semaphore

B) Spinlock

23. Which synchronization primitive is commonly used inside kernels?
A) Monitor
B) Semaphore
C) Spinlock
D) Message passing

C) Spinlock

24. Which operation wakes up waiting processes?
A) wait()
B) signal()
C) test()
D) lock()

B) signal()

25. Which of the following is NOT a synchronization problem?
A) Producer–Consumer
B) Readers–Writers
C) Dining Philosophers
D) Page replacement

D) Page replacement