Previous | Next --- Slide 52 of 69
Back to Lecture Thumbnails

What is the benefit of using message passing or shared address space abstractions? I understand there can be hardware limitations (for example, communication between two computers in different states cannot use shared address space in hardware), so is emulating different communication schemes just for ease of programming, or something more?


Shared address space is easier on the programmer. You don't have to explicitly send and receive messages, which means shorter and more readable code. Message passing is more general. You can implement message passing using shared memory. For example, programs that use message passing would work just fine on a multi-core machine with no modification. However the converse is not always the case: it is hard convert shared memory to message passing (at least without significant performance overhead).


Can someone elaborate on the point in the slide about how shared address space abstractions can be implemented in hardware thatvdoesn't support it?


I guess it's just saying you can set up a virtual shared memory space with coding. In a physical sense, the memory would not be in a shared space by the processor, but the software is "tricked" into believing that the accessed memory (wherever its location) is shared. I suppose you can think of it like any other virtual machine? As the slide says, it's less efficient since this shared memory space would likely physically exist in main memory, which is slow to access. Does that make more sense?