The Shared Resource Concept

Assume that the OS sets aside an area of memory to be used by tasks executing on multiple processors (or even by different tasks executed by the same processor) as a shared memory buffer. It is intended to be used as follows:

  1. Before using the buffer (i.e., reading from or writing to it), a task must first test a memory-based flag to ensure that the buffer isn't currently owned by another task. If the buffer is currently unavailable, the task wishing to gain ownership should periodically check back to see when it becomes available.

  2. When the flag indicates that the buffer is available, the task sets the flag, indicating that it has exclusive ownership of the buffer. The buffer is then unavailable if any other task should ...

Get The Unabridged Pentium 4 IA32 Processor Genealogy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.