Previous | Next --- Slide 40 of 56
Back to Lecture Thumbnails
aravisha

I may have not fully understood message passing, but why would you implement message passing on machines that implement a shared address space model? If the address space is shared, wouldn't there be no need to pass messages since multiple threads could simply access whatever it is they're trying to share in memory by themselves?

tclarke

A google search returned this powerpoint, which is actually from another class at CMU.

http://www.ece.cmu.edu/~ece742/f12/lib/exe/fetch.php?media=onur-18-742-fall12-lecture3-programmingmodelsandarchitectures-afterlecture.pdf

Essentially it implies that any memory reading/writing is actually just a form of message passing, so if you want to have good synchronization between all memory accesses, you can implement it the same way you would model message passing.

carnegieigenrac

@Aravisha Message passing can be easier to use as a programmer in certain cases. When you use message passing you don't have to deal with setting up locks and instead have to determine when/what messages to send, which may be easier to do for certain types of programs.