- as you will see in operating systems, a common issues with
concurrent programs is ensuring two programs (or two processors) do
not try to access the same data at the same time.
- you can keep a flag to indicate that data is in use, but you
wind up with the same problem, only now concerning simultaneous
access to the flag
- the read, modify, write of a memory location requires many
steps, and if these steps are interleaved in the wrong way, you get
the wrong results for two parallel accesses
- to properly synchronize programs and/or processors requires
having an atomic operation for modifying a memory location
- atomic simply means that it is done as a single indivisible
operation, so it is impossible for two things to modify it at the
same time
- "read-modify-write" bus cycle ensures that the processor can
read, modify and write to memory with nothing interrupts it.
- this is yet another specialized bus state
|
|