← Back to 5. Process Synchronization

📝 Semaphore Implementation

📖 From Operating System • 5. Process Synchronization • 55 questions available

Practice MCQs for Semaphore Implementation. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.

🔄 Last updated: 2026-07-09

22
Easy Questions
23
Medium Questions
10
Hard Questions

📝 Sample Questions

Q1. What is the main problem with the busy-waiting implementation of semaphores?

🔹 A. It causes deadlocks.
🔹 B. It wastes CPU cycles.
🔹 C. It does not guarantee mutual exclusion.
🔹 D. It is difficult to implement.

💡 Difficulty: easy | ✅ Correct: B

Q2. What does the `block()` operation do?

🔹 A. It wakes up a process.
🔹 B. It suspends the process that invokes it.
🔹 C. It increments the semaphore value.
🔹 D. It decrements the semaphore value.

💡 Difficulty: medium | ✅ Correct: B

Q3. In the modified `wait()` implementation, when does a process block?

🔹 A. When `S->value` is positive.
🔹 B. When `S->value` is zero.
🔹 C. When `S->value` is negative after decrementing.
🔹 D. When `S->value` is zero after decrementing.

💡 Difficulty: hard | ✅ Correct: C

⬆️ View all questions in the quiz below

🔗 Related Topics

📝 Computer System Architecture📝 Computer System Organization📝 Computing Environments📝 Kernel Data Structures📝 Memory Management
🚀 Start Quiz 📝 Practice Mode