O'Reilly logo

The Unabridged Pentium 4 IA32 Processor Genealogy by Bob Colwell, Tom Shanley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Guaranteeing the Atomicity of a Read/Modify/Write

This problem came about because processor 1 was able to read the semaphore immediately after processor 0 read it. The two processors were in a race condition. Processor 0 then wrote to it immediately, followed by processor 1 writing to it. The tasks on the two processors each ended up believing it had sole ownership of the buffer.

This problem can be prevented if processor 0 could prevent other initiators from using the FSB from the time it initiates its read until the time it completes the write to update the semaphore to a non-zero value. In other words, it should lock the FSB while it performs the read/modify/write (frequently referred to as a RMW) of the semaphore.

To do this, the programmer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required