What are the differences between a binary and mutex semaphore?
Once again, you are being asked about two terms used within this profession. In this case, the Amazon interviewer wants you to compare and contrast these since both of them control how an application gains access to the resources it needs. This will confirm your knowledge of the topic and inform the interviewer whether you've used these items in your previous jobs. Since this is a technical question, you should keep your answer brief and to the point, using simple and easy-to-understand language. You should also be prepared for a follow-up question indicating that the interviewer has a specific interest in this topic.
"Semaphores are used to either lock or release a resource used by the tasks or processes within a computer program. Mutex stands for mutual exclusion semaphore. This locks a resource so no other process or thread within the program can use it until the task releases it. An example of this may be a bank of memory or a piece of data. A binary semaphore is a signal task used to release a resource. This informs other tasks or processes that the resource is available. Binary semaphores do not restrict access to the resource."
