Testing the Availability of and Gaining Ownership of Shared Resources
The OS typically uses a memory location (or series of memory locations) as the flag (see the previous section) indicating the availability or unavailability of a particular shared resource. This is referred to as a memory semaphore.