Fetch-And-Op's by Compare-And-Swap
Original Publication Date: 1987-Feb-01
Included in the Prior Art Database: 2005-Jan-31
Whenever there are two or more processes (or CPUs) in a multiprocessor (MP) system simultaneously modifying a memory location, correctness of the computation requires that the modification be done by one process at a time, irregardless of the order the location is updated. This indivisibility must be guaranteed at the hardware level. Fetch-and-OP's (F&OP's) , such as fetch-and-add (F&A) and fetch-and-max, have been found both syntactically and architecturally useful constructs in parallel computing of guaranteeing the correctness mentioned above. The following method maps the use of all of the F&OP's in an MP system in which they are not supported, such as a 370 MP system, but where the CS  (compare-and-swap) is an indivisible operation used for MP synchronization.