← Back to CS Fundamentals

Mutex vs Semaphore

CS Fundamentalsconcurrency

The Question

What is the difference between a mutex and a semaphore?

What a Strong Answer Covers

  • mutex has ownership
  • "semaphore is a counter
  • no ownership
  • use case for each

Related Questions

  • Process vs Thread
  • Race Condition
  • Deadlock — 4 Conditions, Prevention
  • Thread Safety — Is dict Thread Safe?
  • HashMap Internals

Practice This Question

Get AI-graded feedback on your answer with follow-up probes on weak points.

Take the Free Assessment
GrindQuestionsAITechnical interview assessment
TermsPrivacyAbout