← Back to 4. Threads in Operating System

📝 Pthreads

📖 From Operating System • 4. Threads in Operating System • 138 questions available

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

🔄 Last updated: 2026-07-08

22
Easy Questions
64
Medium Questions
52
Hard Questions

📝 Sample Questions

Q1. What does the Pthreads API standard define?

🔹 A. A specification for thread behavior and synchronization
🔹 B. An implementation of thread creation
🔹 C. A Windows-specific threading library
🔹 D. A hardware-level threading protocol

💡 Difficulty: easy | ✅ Correct: A

Q2. How is shared data accessed between threads in the Pthreads example program?

🔹 A. Through thread-local storage
🔹 B. Through global variables
🔹 C. Through thread-specific arguments
🔹 D. Through inter-process communication

💡 Difficulty: medium | ✅ Correct: B

Q3. What would happen if the parent thread in the Pthreads program terminated before the child thread completed?

🔹 A. The child thread would be automatically terminated
🔹 B. The child thread might become an orphan and continue running
🔹 C. The system would crash immediately
🔹 D. The child thread would automatically join the parent

💡 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