BinarySemaphore The Mutex class implements a binary semaphore using the atomic operation Interlocked.CompareExchange. Lock/Unlock. OSHandle provides automatic or forced dispose of a given operating system handle.