← Back to 5. Process Synchronization

📝 Pthreads Synchronization

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

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

🔄 Last updated: 2026-07-09

12
Easy Questions
38
Medium Questions
16
Hard Questions

📝 Sample Questions

Q1. Which API provides mutex locks, condition variables, and read-write locks for thread synchronization at the user level?

🔹 A. Solaris thread API
🔹 B. Pthreads API
🔹 C. Kernel thread API
🔹 D. Win32 thread API

💡 Difficulty: easy | ✅ Correct: B

Q2. A developer needs to create a semaphore that can be accessed by multiple unrelated processes. Which type of POSIX semaphore should be used?

🔹 A. Unnamed semaphore
🔹 B. Named semaphore
🔹 C. Anonymous semaphore
🔹 D. Process-local semaphore

💡 Difficulty: medium | ✅ Correct: B

Q3. Consider a scenario where a counting semaphore is initialized to 5. How many threads can successfully call `sem_wait()` on this semaphore without blocking?

🔹 A. 1
🔹 B. 5
🔹 C. 0
🔹 D. Unlimited

💡 Difficulty: hard | ✅ Correct: B

⬆️ 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