3 ms·
If you use the shared memory approach on a distributed system, each node has a copy of the shared memory, and there's infrastructure for keeping all that memory
by phugoid 16y ago
If you use the shared memory approach on a distributed system, each node has a copy of the shared memory, and there's infrastructure for keeping all that memory synchronized. At least that's one way of doing it.
In the event-based approach they implemented, different nodes (PCs) subscribe just to the events they are interested in. It's light-weight, easy to understand, monitor and debug, and it fits the problem well in this case.
- sparky 16y agoIn computer architecture terms, the pub/sub system opens the door to more efficient communication in a multiprocessor system, since the data sharing is explicitly known by virtue of the subscriptions; furthermore, a sufficiently intelligent runtime, compiler, or partitioner can optimally (or close) map calculations to processors. How much of a win you get in practice depends on the actual intelligence of the tools and the hardware you're running on. If you're running on a multicore or SMP (e.g., a quad-socket box) hardware cache coherence will do the heavy lifting for you; each processor won't have its own copy of the data, it will be shuttled around to just the processors that need it. On larger-scale systems, a more message-passing approach is indeed the way to go; in fact, it is often the only way to go, since most large-scale machines outside of integrated supercomputers (Cray et al.) don't support shared memory.