Bird
Raised Fist0

In a system with many short-lived tasks, which factor most influences whether using threads or processes yields better overall throughput?

medium🪤 Complexity Trap Q6 of Q15
Operating Systems - Process vs Thread - Key Differences
In a system with many short-lived tasks, which factor most influences whether using threads or processes yields better overall throughput?
AThe overhead of creating and destroying threads is higher than processes.
BProcesses share memory, so they have lower communication overhead than threads.
CThe overhead of context switching between threads is lower than between processes.
DThreads require separate memory allocation, increasing memory pressure.
Step-by-Step Solution
Solution:
  1. Step 1: Compare creation overhead

    Thread creation is generally cheaper than process creation.
  2. Step 2: Compare context switch overhead

    Thread context switches are lighter because they share memory and resources.
  3. Step 3: Evaluate options

    The overhead of context switching between threads is lower than between processes correctly identifies context switch overhead as a key factor favoring threads.
  4. Final Answer:

    Option C -> Option C
  5. Quick Check:

    Thread context switches are cheaper than process switches [OK]
Quick Trick: Thread context switches are cheaper than process switches [OK]
Common Mistakes:
MISTAKES
  • Assuming thread creation is more expensive than process creation
  • Believing processes share memory to reduce overhead
Trap Explanation:
PITFALL
  • Candidates confuse creation overhead with context switch overhead and memory sharing.
Interviewer Note:
CONTEXT
  • Assesses understanding of overhead trade-offs in task scheduling.
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