Mutex in Operating system (OS)
Mutex in Operating System
Mutex lock is essentially a variable that is binary nature that provides code wise functionality for mutual exclusion. At times, there maybe multiple threads that may be trying to access same resource like memory or I/O etc. To make sure that there is no overriding. Mutex provides a locking mechanism.
Only one thread at a time can take the ownership of a mutex and apply the lock. Once it done utilising the resource and it may release the mutex lock.
- Mutex is Binary in nature
- Operations like Lock and Release are possible
- Mutex is for Threads, while Semaphores are for processes.
- Mutex works in user-space and Semaphore for kernel
- Mutex provides locking mechanism
- A thread may acquire more than one mutex
- Binary Semaphore and mutex are different
- Process Synchronization
- Critical Section
- Inter-Process Communication
- UEFI(Unified Extensible Firmware Interface) and how is it different from BIOS
- Mutex vs. Semaphore
- Atomic Operations in OS
- Peterson’s Algorithm for Mutual Exclusion (Only important for Cisco and Arista Networs)
- Peterson’s Algorithm for Critical Section Problem (Only important for Cisco and Arista Networs)
- Readers-Writers Problem