Advanced Embedded Systems Question: Download Questions PDF
Differentiate between mutexes vs semaphores?
![Advanced Embedded Systems Interview Answer Advanced Embedded Systems Interview Question](https://globalguideline.com/public/images/interview/30.png)
Answer:
☛ 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.
☛ 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.
Download Advanced Embedded Systems Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell me how much time is required by an instruction for execution in 8051? | Do you know what are the different types of system involved in embedded system? |