Date: January 19, 2025

Topic: Shared Memory Machines

Recall

Dance Hall

Symmetric Multiprocessor (SMP)

Distributed Shared Memory (DSM)

Notes

Shared Memory Machine Architectures

Entire address space defined by the memories is accessible from any CPU, and each CPU has an associated cache

Dance Hall Architecture

image.png

Symmetric Multiprocessor (SMP)

image.png

Distributed Shared Memory (DSM)

image.png


When using multiprocessors, a process may update a hot memory location. In this case, other processors should now reference this value. This can be done through enforcing a memory consistency model.

For memory consistency models, it should enforce only expected outcomes. If there is an outcome resulting from out-of-order updates, this should be disallowed

Shared Memory and Caches

Issues with Private Caches (Cache Coherence Problem)

image.png

Consistency Model Quiz

If initially $a=b=0$, and we have the following processes, where the instructions for each process execute top-down

| --- | --- | --- |

What are the possible values for $d$ and $c$?






<aside> 📌 SUMMARY: Shared memory architecture includes Dance Hall, SMP and DSM. When dealing with shared memory, we have to ensure cache coherence since multiple processes may be referring to the same memory location. For this, we have memory consistency models which are presented to the programmer, and cache coherence (NCC or CC) to enforce these models. Furthermore for CC architectures, we can have Write-Invalidate or Write-Update. Increasing the number of processors may not equate to proportional gain due to overheads from maintaining cache coherence as well. Having less memory sharing leads to less problems.

</aside>


Date: January 26, 2025

Topic: Synchronization