Operating System •
MCQ • IPC, Critical Section, Semaphores, Classical Problems
Most Important 30 Objective Question - IPC, Critical Section, Semaphores, Classical Problems
Q1. IPC stands for:
A) Internal Process Control
B) Inter Process Communication
C) Input Process Communication
D) Interrupt Process Control
Answer: B
Explanation: IPC means Inter Process Communication, which allows processes to communicate and synchronize with each other.
Q2. Critical Section is:
A) Memory area
B) Part of program where shared resources are accessed
C) Hard disk section
D) CPU register area
Answer: B
Explanation: Critical Section is the part of a program where shared variables/resources are accessed.
Q3. Race Condition occurs when:
A) CPU runs fast
B) Multiple processes access shared data simultaneously
C) Memory becomes full
D) Disk becomes slow
Answer: B
Explanation: Race condition happens when multiple processes access and modify shared data at the same time.
Q4. Mutual Exclusion means:
A) Only one process enters critical section at a time
B) Multiple processes execute together
C) CPU remains idle
D) No process runs
Answer: A
Explanation: Mutual exclusion ensures that only one process can enter the critical section at a time.
Q5. Peterson’s Solution is used for:
A) Deadlock
B) CPU Scheduling
C) Mutual Exclusion
D) Paging
Answer: C
Explanation: Peterson’s Solution is a software solution for achieving mutual exclusion between two processes.
Q6. Semaphore is used for:
A) Memory allocation
B) Process synchronization
C) File deletion
D) Disk formatting
Answer: B
Explanation: Semaphore is used to control access to shared resources and for process synchronization.
Q7. Binary Semaphore can have values:
A) 0 and 1
B) 1 and 2
C) 0,1,2
D) Any positive value
Answer: A
Explanation: Binary semaphore works like a lock and can only have values 0 or 1.
Q8. Counting Semaphore is used when:
A) One resource exists
B) Multiple instances of a resource exist
C) No resource exists
D) CPU is idle
Answer: B
Explanation: Counting semaphore is used when multiple copies of a resource are available.
Q9. Producer-Consumer Problem is related to:
A) Scheduling
B) Synchronization
C) Paging
D) Deadlock detection
Answer: B
Explanation: Producer-Consumer Problem is a classical synchronization problem.
Q10. Buffer is used in:
A) Producer-Consumer Problem
B) Deadlock
C) Paging
D) File allocation
Answer: A
Explanation: The producer places data into the buffer and the consumer removes data from it.
Q11. Monitor is:
A) Hardware device
B) High-level synchronization tool
C) Scheduling algorithm
D) Memory type
Answer: B
Explanation: Monitor is a high-level synchronization construct used to control shared resource access.
Q12. Message Passing is a type of:
A) CPU Scheduling
B) IPC
C) Deadlock
D) Paging
Answer: B
Explanation: Message Passing is a method of Inter Process Communication where processes exchange messages.
Q13. Shared Memory is:
A) Separate memory for each process
B) Common memory accessed by multiple processes
C) ROM
D) Cache memory
Answer: B
Explanation: Shared memory allows multiple processes to access the same memory area.
Q14. Strict Alternation is:
A) Hardware solution
B) Software solution for mutual exclusion
C) Scheduling method
D) Page replacement algorithm
Answer: B
Explanation: Strict Alternation is a software approach for process synchronization.
Q15. Event Counter is used for:
A) Process synchronization
B) File deletion
C) CPU allocation
D) Memory compaction
Answer: A
Explanation: Event counters help synchronize events between processes.
Q16. Reader-Writer Problem deals with:
A) Memory allocation
B) Shared data access
C) CPU scheduling
D) Disk scheduling
Answer: B
Explanation: Reader-Writer Problem manages access to shared data where readers and writers compete.
Q17. In Reader-Writer Problem:
A) Writers can write together
B) Readers can read together
C) Only one reader allowed
D) No synchronization needed
Answer: B
Explanation: Multiple readers can read simultaneously if no writer is writing.
Q18. Dining Philosopher Problem is related to:
A) Synchronization
B) File system
C) Memory management
D) CPU scheduling
Answer: A
Explanation: Dining Philosopher Problem is a classical synchronization problem involving shared resources.
Q19. Deadlock may occur in:
A) Dining Philosopher Problem
B) FCFS
C) Paging
D) Segmentation
Answer: A
Explanation: If philosophers wait forever for forks, deadlock can occur.
Q20. Busy Waiting means:
A) Process continuously checks condition
B) CPU is off
C) Memory is full
D) File is deleted
Answer: A
Explanation: Busy waiting happens when a process repeatedly checks a condition without doing useful work.
Q21. Spinlock is related to:
A) Busy Waiting
B) Paging
C) File system
D) Deadlock recovery
Answer: A
Explanation: Spinlock is a lock where a process waits in a loop continuously checking availability.
Q22. Test-and-Set instruction is used in:
A) Mutual Exclusion
B) File handling
C) Scheduling
D) Paging
Answer: A
Explanation: Test-and-Set is a hardware instruction used for implementing mutual exclusion.
Q23. Which is not an IPC mechanism?
A) Shared Memory
B) Message Passing
C) Pipes
D) Paging
Answer: D
Explanation: Paging is related to memory management, not IPC.
Q24. Pipes are used for:
A) Process communication
B) CPU scheduling
C) Deadlock prevention
D) File allocation
Answer: A
Explanation: Pipes are a common IPC method used for communication between processes.
Q25. Critical Section Problem requires:
A) Mutual Exclusion
B) Progress
C) Bounded Waiting
D) All of these
Answer: D
Explanation: A correct critical section solution must satisfy all three conditions.
Q26. Progress means:
A) One process must enter critical section if no one is inside
B) CPU should be fast
C) File should open quickly
D) Memory should increase
Answer: A
Explanation: Progress ensures no unnecessary delay in allowing a process to enter the critical section.
Q27. Bounded Waiting means:
A) Infinite waiting allowed
B) Limited waiting time before entering critical section
C) No waiting needed
D) CPU stops working
Answer: B
Explanation: Bounded waiting ensures a process will not wait forever.
Q28. Mutex is:
A) Multiple access
B) Mutual Exclusion object
C) Memory unit
D) Disk scheduler
Answer: B
Explanation: Mutex is a locking mechanism used to protect shared resources.
Q29. Synchronization is needed because:
A) Multiple processes share resources
B) CPU is fast
C) Disk is slow
D) RAM is small
Answer: A
Explanation: Synchronization prevents conflicts when multiple processes use shared resources.
Q30. Semaphore was introduced by:
A) Peterson
B) Dijkstra
C) Newton
D) Turing
Answer: B
Explanation: Semaphore concept was introduced by Edsger Dijkstra.
Google AdSense Ad Placement Here 📢