Bird
0
0

Why might a developer choose child processes over worker threads despite the overhead of separate memory?

hard📝 Conceptual Q10 of 15
Node.js - Worker Threads
Why might a developer choose child processes over worker threads despite the overhead of separate memory?
ABecause child processes are easier to communicate with.
BBecause child processes share memory and are faster.
CBecause worker threads cannot perform asynchronous I/O.
DTo achieve better fault isolation and run different Node.js versions.
Step-by-Step Solution
Solution:
  1. Step 1: Consider fault isolation benefits

    Child processes run independently, so a crash in one does not affect others.
  2. Step 2: Consider environment flexibility

    Child processes can run different Node.js versions or scripts, unlike worker threads.
  3. Final Answer:

    To achieve better fault isolation and run different Node.js versions. -> Option D
  4. Quick Check:

    Fault isolation and environment flexibility = D [OK]
Quick Trick: Child processes isolate faults and allow different Node versions [OK]
Common Mistakes:
  • Assuming child processes share memory
  • Thinking worker threads can't do async I/O
  • Believing child processes are easier to communicate with

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes