摘要 |
PURPOSE:To prevent the collision for a bus by constituting a system where one processor confirms contents of a read-only area after writing a flag on a write-only area and starts the access to a shared memory after confirming that another processor does not access the shared memory. CONSTITUTION:Even if CPUs 1 and 2 write flags in the first semaphore 4 and the second semaphore 5 for the purpose of accessing a shared memory 3, CPUs 1 and 2 do not access it because they read out flags from semaphores for read, and simultaneous access is prevented. When both flags are set, the flag of the semaphore set by one CPU is cleared, and the access is stopped to wait for reset of the flag of the semaphore set by the other CPU. |