How does a “peer” distributed application work? What is an example?
Each node:
- owns state
- provides service
=> all nodes are “peers”
Example: Distributed Shared Memory (DSM)
Each node: - owns state => memory - provides service => memory reads/writes from any node => consistency protocols
What is distributed shared memory (DSM)?
Pros/Cons?
DSM permits scaling beyond single machine memory limits.
+ more “shared” memory at lower cost
- slower overall memory access (but commodity interconnect technologies mitigate this)
How does hardware-supported DSM work?
How does software-supported DSM work?
Hardware-supported DSM
Software-supported DSM
What level of sharing granularity does DSM support?
- object granularity (language runtime)
What is false sharing in DSM?
False sharing is when data structures are stored on the same page but don’t have anything to do with each other (aren’t likely to be accessed by the same thread).
In this case, when a thread writes to a variable, it triggers cache coherence, but other threads using other variables on that page may not care about that thread, so the coherence traffic is not useful.
What types of applications use DSM?
Migration vs Replication
Migration
Replication (caching)
Consistency Management: Push invalidations vs Pull modification
Push invalidations when data is written to
Pull modification info periodically
When these methods get triggered depends on the consistency for the shared state.
What’s the difference between a home node and an owner?
A “home node” keeps state about a page and is responsible for cache coherence for that page–unless another node is operating a lot on the page. In this case, it can become the “owner” and take over responsibility for state and drive cache coherence (saves on constantly talking to the “home node.” The owner can change over time but the home node never does, but it keeps track of who the current owner is.
How can DSM “intercept” memory accesses to DSM state:
Use hardware MMU support!
What is a consistency model?
Agreement between memory (state) and upper software layers: guarantee that the state changes will behave in certain way as long as the upper software layers follow specific rules.
memory (state) guarantees to behave correctly…
What is strict consistency?
Updates visible everywhere immediately
In practice:
What is sequential consistency?
Updates from different processes may be arbitrarily interleaved.
What is causal consistency?
What is weak consistency?
synchronization points == ops that are available (R, W, Sync)
When P1 makes a write and then calls sync, P2 won’t see those changes until it too calls sync. Then it will be updated by any other changes that may have existed.