In: Computer Science
What happens if three CPUs in a multiprocessor attempt to access exactly the same word of memory at exactly the same instant?
Hello,
Hope you are having a good day!!
I have added some more points.
However feel free to revert if you still feel unsatisfied.
Solution:-
It depends on how the CPUs are connected to the memory, one of
which passes first, for example,
catching the bus first. It completes its memory function, then
another one will happen. It is unpredictable which
one will go first, but only if the system is designed for
simultaneous consistency, it should not matter.
If the memory word in question was already uploaded to all the
three CPUs caches and all the three CPUs want to access the same
memory word, then it can be accessed from two caches
simultaneously.
If the word is not in the cache, then the memory bank containing
that word is able to handle one access at a time. The hardware will
have an option to select one access to continue, while the other
waits. In fact, in most multiprocessor programs this solution only
occurs when all the three CPUs try to access the memory bus at the
same time.
Thank you!!
Please leave a thumbs up!!