Shared memory

How shared memory are accessed if we have two processors attempting to gain the same region?

E

Expert

Verified

Synchronization has to be done to protect the data corruption by simultaneous writes from two processes running on two distinct processors. Synchronization among two processors is best done with the help of spinlocks.

While a process on one processor had locked the shared memory the other procedure running on the second processor shall be doing a hard spin till the first process released the lock. It is the rule of Spin locks.

   Related Questions in Science

©TutorsGlobe All rights reserved 2022-2023.