Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews New Artificial Intelligence Interviews:Advanced Embedded SystemsAI Fuzzy LogicAI GeneralAI Knowledge RepresentationAI LanguagesAI RecognitionArtificial Intelligence GamesArtificial Intelligence Language ProcessingArtificial Intelligence Neural NetworksArtificial Intelligence RoboticsArtificial Intelligence ToolsVirtual AssistantVirtual Reality
Copyright © 2018. All Rights Reserved
Advanced Embedded Systems Interview Question:
Differentiate between mutexes vs semaphores?
Submitted by: Muhammad☛ Semaphores is a synchronization tool to overcome the critical section problem.
☛ A semaphore S is basically an integer variable that apart from initialization is accesses only through atomic operations such as wait() and signal().
☛ Semaphore object basically acts as a counter to monitor the number of threads accessing a resource.
☛ Mutex is also a tool that is used to provide deadlock free mutual exclusion. It protects access to every critical data item. If the data is locked and is in use, it either waits for the thread to finish or awakened to release the lock from its inactive state.
Submitted by: Muhammad
☛ A semaphore S is basically an integer variable that apart from initialization is accesses only through atomic operations such as wait() and signal().
☛ Semaphore object basically acts as a counter to monitor the number of threads accessing a resource.
☛ Mutex is also a tool that is used to provide deadlock free mutual exclusion. It protects access to every critical data item. If the data is locked and is in use, it either waits for the thread to finish or awakened to release the lock from its inactive state.
Submitted by: Muhammad
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.

https://InterviewQuestionsAnswers.ORG.
