Bird
Raised Fist0

If you extend a multithreaded application to run across multiple CPU cores, which new challenge must you address that was not present in the single-core multithreaded version?

hard🎤 Interviewer Follow-up Q10 of Q15
Operating Systems - Process vs Thread - Key Differences
If you extend a multithreaded application to run across multiple CPU cores, which new challenge must you address that was not present in the single-core multithreaded version?
AContext switching overhead increases dramatically on multicore systems.
BThreads no longer share memory, so communication becomes impossible.
CSynchronization must handle memory consistency across cores due to cache coherence issues.
DThreads automatically serialize execution, reducing concurrency.
Step-by-Step Solution
Solution:
  1. Step 1: Understand multicore memory model

    Multiple cores have separate caches, requiring synchronization to maintain memory consistency.
  2. Step 2: Analyze new challenges

    Cache coherence protocols and memory barriers become critical to avoid stale data.
  3. Step 3: Evaluate options

    Synchronization must handle memory consistency across cores due to cache coherence issues correctly identifies the need to handle memory consistency across cores.
  4. Step 4: Discard incorrect options

    Threads still share memory; context switch overhead does not necessarily increase; threads do not serialize automatically.
  5. Final Answer:

    Option C -> Option C
  6. Quick Check:

    Multicore requires synchronization for cache coherence [OK]
Quick Trick: Multicore needs synchronization for cache coherence [OK]
Common Mistakes:
MISTAKES
  • Thinking threads lose shared memory on multicore
  • Assuming context switch overhead always increases
Trap Explanation:
PITFALL
  • Candidates overlook hardware-level memory consistency challenges in multicore systems.
Interviewer Note:
CONTEXT
  • Tests deep understanding of threading challenges on multicore architectures.
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