Bird
Raised Fist0

Which scenario best demonstrates the advantage of using threads over processes for tasks that require frequent communication and shared data?

easy🔍 Pattern Recognition Q2 of Q15
Operating Systems - Process vs Thread - Key Differences
Which scenario best demonstrates the advantage of using threads over processes for tasks that require frequent communication and shared data?
AA GUI application using multiple threads to update the user interface and handle user input concurrently.
BA database system using separate processes for each query to prevent data corruption.
CA batch job running multiple independent processes to process large datasets in parallel.
DA web server spawning separate processes for each client request to ensure isolation.
Step-by-Step Solution
Solution:
  1. Step 1: Identify shared data requirement

    Threads share memory within the same process, enabling efficient communication and data sharing.
  2. Step 2: Analyze each option

    A GUI application using multiple threads to update the user interface and handle user input concurrently uses threads for concurrent UI updates and input handling, benefiting from shared memory.
  3. Step 3: Contrast with processes

    Options A, B, and C use separate processes, which have higher overhead and isolated memory, making frequent communication costly.
  4. Final Answer:

    Option A -> Option A
  5. Quick Check:

    Threads share memory, ideal for frequent communication [OK]
Quick Trick: Threads share memory; processes do not [OK]
Common Mistakes:
MISTAKES
  • Assuming processes communicate as efficiently as threads
  • Confusing isolation with communication efficiency
Trap Explanation:
PITFALL
  • Candidates may overlook the overhead of inter-process communication and think processes are always better.
Interviewer Note:
CONTEXT
  • Reveals understanding of shared memory benefits in threads vs processes.
Master "Process vs Thread - Key Differences" in Operating Systems

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Operating Systems Quizzes