

A spin lock is exactly what it sounds like.

OK, let’s switch gears slightly and discuss the three types of spin lock mentioned above. Acquire and release at IRQL < = APC_LEVEL Not recursive / Release on the same thread or on a different threadĪcquisition does not change IRQL. Wait at IRQL <= APC_LEVEL and signal at IRQL <= DISPATCH_LEVEL Synchronization event (kernel dispatcher object)Īcquisition does not change IRQL. Recursive / Release on same thread as acquire Not recursive / Release on same thread as acquireĪcquisition raises IRQL to DISPATCH_LEVEL and returns previous IRQL to callerĪcquisition raises IRQL to DISPATCH_LEVEL and stores previous IRQL in lock owner handleĪcquisition raises IRQL to APC_LEVEL and stores previous IRQL in lockĮnters critical region upon acquisition and leaves critical region upon release However, here are the different types of Windows mutex as listed on MSDN: Type of MutexĪcquisition raises IRQL to DIRQ and returns previous IRQL to caller What happens to a mutex if the thread that is holding it is terminated?Īs with our last two posts, we’re not going to delve too deeply into programming concepts.Can the mutex be acquired by a thread more than once without releasing it (i.e.Must the mutex be released on the same thread that acquired it?.Does acquiring the mutex raise the current IRQL?.

