Parallel & Distributed Systems

Mid-Sem CAT-1 revision reference for Chapters 1 & 2. Every syllabus topic below is broken down concept-first, then tagged to the exact 3 / 6 / 6 / 10 question pattern via Bloom's levels. Formulas and definitions are boxed and enlarged — scan for the gold and blue blocks.

Total 50 marks Sub-Unit 1 · 25 Sub-Unit 2 · 25 Pattern 3·6·6·10 per unit
3
Remember — define, list, state
6
Understand — explain, compare
6
Apply / Analyze — solve, trace
10
Evaluate / Create — justify, design
⚑
Coverage note: Topics 8 (MapReduce/Spark) and 13 (Routing/Kafka) are in your syllabus but were not in your teaching transcript. They're included here from standard course scope and flagged SYLLABUS-ONLY — cross-check these two against your actual PPTs, since exam depth may differ.
Sub-Unit 1 · 25 marks

Introduction to Parallel Computing

Flynn's taxonomy · parallel computer types · system characteristics · computing models · interconnection networks · dataflow · parallel algorithms · MapReduce & Spark

1

Flynn's Taxonomy & Levels of Parallelism

High-yield · 10

Concept

A serial uniprocessor reads one instruction and acts on one datum at a time. To go faster we replicate processing components. In 1966 Michael Flynn classified all architectures by how many instruction streams and data streams run concurrently. Everything builds on the Von Neumann architecture — Memory, Control Unit, ALU, I/O — with instructions and data stored together (stored-program).

Core definitions
Instruction stream = sequence of instructions the CPU executes. Data stream = flow of operands between memory and processing units. Flynn crosses these two (single/multiple) into four classes.
ClassMeaningNatureExamples
SISDSingle Instr, Single DataSerial uniprocessor, deterministicSingle-core PC, old mainframes
SIMDSingle Instr, Multiple DataLockstep, one control unit → many PUsGPUs, vector/array processors, ILLIAC IV
MISDMultiple Instr, Single DataMostly theoretical, no real commercial HWFault-tolerant filters; debated: pipelines
MIMDMultiple Instr, Multiple DataAutonomous procs, sync or asyncMulti-core CPUs, clusters, supercomputers

MIMD sub-classification

Split by memory organization (Global vs Distributed) × communication (Shared Variables vs Message Passing):

CodeMemoryComm.Common name
GMSVGlobalShared varsShared-Memory Multiprocessor (SMP)
GMMPGlobalMsg passingRare in practice
DMSVDistributedShared varsDistributed Shared Memory (DSM)
DMMPDistributedMsg passingMulticomputers / Clusters
↳
SPMD (Single Program, Multiple Data) is a subset of MIMD: all processors run copies of the same program asynchronously on different data. Don't confuse with SIMD's synchronous lockstep.

Four levels of parallelism (grain: large → fine)

  • Task-level (large grain) — distinct threads/processes on MIMD processors.
  • Data-level (medium) — identical op on distinct data chunks, via SIMD.
  • Instruction-level (ILP) (fine) — overlap independent instructions, e.g. pipelining.
  • Bit-level (very fine) — wider words (32/64-bit) so all bits process in one cycle.
3
Remember
Define instruction stream vs data stream. / List the four Flynn classes. / Define SPMD. / Define pipelining & a RAW hazard.
6
Understand
Differentiate SIMD vs MIMD (control, sync, suitability, examples). / Explain the four levels of parallelism with examples.
6
Apply / Analyze
Classify MIMD into GMSV/GMMP/DMSV/DMMP. / Why do GPUs use SIMD over MIMD for data parallelism?
10
Evaluate / Create
Model 10-marker: Explain Flynn's taxonomy with block diagrams for all four classes + MIMD sub-classification (GMSV…DMMP table) + the four levels of parallelism with examples. Critique why MISD is impractical and why MIMD dominates supercomputing.
2

Types of Parallel Computers

High-yield · 10

Concept

MIMD machines split by how memory is accessed. Shared memory multiprocessors share one global address space — any CPU reads/writes any location directly. Distributed memory multicomputers give every CPU private memory; they communicate only by explicit messages over a network.

UMA vs NUMA
UMA / SMP — every processor has identical access latency to main memory. NUMA / DSM — memory partitioned into local nodes per socket; local access fast, remote access across interconnect (Intel QPI / AMD HyperTransport) is slower.
AMC — Asymmetric Multicore
Shared-memory design mixing fast complex cores + simple efficient cores on one chip (ARM big.LITTLE, Intel Quick-IA) to optimize Amdahl's Law: fast cores run serial code, simple cores run parallel code.
   UMA (SMP)                      NUMA (DSM)                  DISTRIBUTED (Cluster)
 CPU CPU CPU CPU            [CPU|Local Mem]<=QPI=>[CPU|Local Mem]   [CPU|Mem]<=net=>[CPU|Mem]
   |  |  |  |                 fast local, slow remote            no shared address space
 == SHARED BUS ==                                               Send()/Receive() only
   Main Memory
AspectShared MemoryDistributed Memory
Address spaceSingle globalDisjoint private per node
CommunicationImplicit via shared varsExplicit Send()/Receive()
ScalabilityLow–moderate (bus contention, coherence)Very high (1000s of nodes)
ProgrammingEasierHarder (partition + manage msgs)
StandardOpenMP / PthreadsMPI
⚙
Modern hybrid: supercomputers = clusters of multi-socket nodes. OpenMP handles threads inside a node (shared mem) + MPI handles messages between nodes.
3
Remember
Define UMA and NUMA. / What is AMC? / List the 3 shared-memory paradigms. / OpenMP vs MPI libraries.
6
Understand
Differentiate shared vs distributed memory. / How does AMC address Amdahl's Law? / Blocking vs non-blocking & sync vs async primitives.
6
Apply / Analyze
Why do shared-memory systems hit scalability limits vs multicomputers? / How does each paradigm emulate the other (mailboxes ↔ owner processes)?
10
Evaluate / Create
Model 10-marker: Compare shared vs distributed memory with UMA/NUMA/cluster diagrams, communication mechanisms, scalability limits, and justify hybrid OpenMP+MPI on modern clusters.
3

Characteristics of Parallel Systems

High-yield · 10

Concept

Four metrics describe how tightly processors are bound and how efficiently they cooperate: Coupling, Speedup, Concurrency, Granularity.

Coupling
Degree of interdependency/binding among modules. Tightly coupled: shared memory, common clock, low latency (SIMD/MISD, UMA/NUMA). Loosely coupled: private memory, no global clock, network msg passing (clusters, NOW, grids).
Speedup
S(n) = T(1) / T(n)
T(1) = 1-processor time · T(n) = n-processor time
Granularity
Granularity = Computation / Communication
high ratio → coarse-grained · low ratio → fine-grained
Concurrency
In distributed programs = ratio of local (non-communication) operations to total operations (including comm / shared-memory accesses).
⇄
Matching rule: fine-grained code needs tightly coupled hardware (low-latency shared memory); coarse-grained code suits loosely coupled clusters. Run fine-grained code over a high-latency WAN and communication overhead dominates runtime.
3
Remember
Define coupling. / Define granularity. / Write the speedup formula S(n)=T(1)/T(n).
6
Understand
Differentiate tightly vs loosely coupled. / Explain how granularity dictates choice of parallel hardware.
6
Apply / Analyze
Analyze impact of network latency on fine-grained code on loosely coupled systems. / Compute a concurrency ratio from a program trace.
10
Evaluate / Create
Model 10-marker: Explain all four characteristics with formulas, then critique the trade-offs among coupling, granularity, and communication overhead — how hardware coupling caps achievable speedup.
4

Parallel Computing Models — RAM · PRAM · BSP · LogP

High-yield · 10

Concept

A computing model is a hardware-independent blueprint for reasoning about algorithms. RAM = ideal sequential machine (1 op / unit time). PRAM = ideal parallel machine: p synchronous processors share one memory, any location in O(1). Because PRAM ignores real wires/caches, bridging models BSP and LogP add realism.

PRAM memory-access variants (weakest → strongest)
EREW (excl read, excl write) → CREW (concurrent read, excl write) → ERCW → CRCW (concurrent read + concurrent write, strongest).
✱
CRCW write-conflict rules: Common (all must write same value) · Arbitrary (random winner) · Priority (highest-priority proc wins) · Combining (values combined, e.g. summed).

BSP — Bulk Synchronous Parallel

Executes in supersteps: (1) local computation → (2) communication via an h-relation → (3) global barrier synchronization.

BSP superstep time
TBSP = max(w) + g·h + l
w local work · h max msgs · g gap/word · l barrier latency · p procs

LogP

Asynchronous distributed model — no barrier. Four params: L latency · o overhead (CPU busy per msg) · g gap between msgs · P processors.

LogP — time to send m messages
TLogP = L + 2o + (m − 1)·g
Worked · compare BSP vs LogP
Given P=5, w=60, h=m=20. BSP: g=3, l=12. LogP: L=10, o=2, g=3.
BSP = 60 + (3×20) + 12 = 60 + 60 + 12 = 132
LogP = 10 + 2(2) + (20−1)×3 = 10 + 4 + 57 = 71
BSP (132) > LogP (71): BSP pays the barrier penalty l and buffers all messages to the superstep boundary; LogP models asynchronous pipelined delivery.

Why PRAM is unrealistic

  • Unit-time memory access ignores wire delay & distance.
  • No cache hierarchy (no L1/L2/L3, no locality).
  • Assumes a strict global clock (no drift).
  • Ignores bus/network contention.
3
Remember
Define PRAM + list its 4 variants. / List the 4 CRCW schemes. / Define BSP params (p,w,h,g,l). / Define LogP params (L,o,g,P).
6
Understand
Why is PRAM unrealistic? / Differentiate BSP vs LogP (sync, granularity, parameters).
6
Apply / Analyze
Numericals: compute BSP superstep time; compute LogP time for m messages. Expect a "solve both and explain the difference" question.
10
Evaluate / Create
Model 10-marker: Compare theoretical (RAM/PRAM + variants) vs practical (BSP/LogP) models — definitions, formulas, PRAM limitations, and a worked BSP + LogP numerical with analytical conclusion.
5

Interconnection Networks & Switching

High-yield · 10

Concept

The interconnection network is the "highway system" linking processors/memory, modeled as graph G=(V,E). Topologies define wiring layout; switching strategies define how data moves along it.

Four topology parameters
Diameter — max hops on shortest path between any two nodes (↓ = lower latency). Degree — max links per node (↓ = simpler HW). Bisection width — min edges cut to split network in half (↑ = more bandwidth). Cost — total number of links.

Static networks = fixed wiring (Linear, Mesh, Torus, Hypercube, CCC, Butterfly). Dynamic = switch-established on the fly (Bus, Crossbar, Multistage/Omega).

TopologyDiameterDegreeBisectionCost
Completely Connected1p−1p²/4p(p−1)/2
2D Mesh2(√p−1)4√p2(p−√p)
2D Torus2⌊√p/2⌋42√p2p
k-D Hypercubelog₂plog₂pp/2(p·log₂p)/2
CCC (k≥3)O(log p)3p/2k3p/2
Butterfly2k4p/2k2p
◈
Hypercube rule: two nodes connect iff their binary addresses differ in exactly one bit. Degree grows as log₂p → impractical for large p. CCC fixes this by replacing each vertex with a k-node cycle → constant degree 3, still O(log p) diameter.

Switching strategies

  • Circuit switching — reserve full path end-to-end via probe before sending (like a phone call).
  • Store-and-Forward — each switch buffers the whole packet before forwarding → high latency.
  • Cut-through / Wormhole — forward as soon as header is parsed; wormhole splits packets into flits, buffering across preceding switches if blocked → minimal switch memory.
Flit vs Phit
Flit = flow-control unit (smallest unit the flow-control mechanism handles). Phit = physical unit transferred over a link in one clock cycle.
Worked · transport latency
1 MB file (10⁶ B), 1000 km, B=100 Mbps (12.5×10⁶ B/s), v=2×10⁸ m/s, overhead 10µs+5µs.
Propagation = 10⁶ m / 2×10⁸ = 5 ms
Transmission = 10⁶ / 12.5×10⁶ = 80 ms
Total ≈ 80 ms + 5 ms + 15 µs ≈ 85 ms · T(m)=T_overhead + d/v + m/B
3
Remember
Define diameter, degree, bisection width. / Static vs dynamic networks. / Define flit & phit. / State the hypercube connectivity rule.
6
Understand
Why did the hypercube degree problem lead to CCC? / Compare store-and-forward vs cut-through vs circuit switching. / Explain butterfly structure.
6
Apply / Analyze
Compare completely-connected vs 2D mesh (diameter/degree/cost). / Solve a message-transport latency numerical.
10
Evaluate / Create
Model 10-marker: Define all topology parameters, tabulate Mesh/Hypercube/CCC/Butterfly + Crossbar/MIN, cover Circuit/Store-Forward/Wormhole, and solve a packet-latency numerical.
6

Dataflow Model & Stream Processing

High-yield · 10

Concept

Von Neumann is control-driven — a program counter steps through instructions regardless of data readiness. Dataflow is data-driven: an instruction fires the instant all its input operands (tokens) arrive — no program counter. Stream processors / GPUs apply this to data-parallel workloads, explicitly staging data on-chip and overlapping compute with memory transfer.

Dataflow Graph (DFG)
Directed graph: nodes = operations, arcs = data dependencies. Control operators: Switch (routes token to one output by control signal) and Merge (selects one input).
Static DataflowDynamic Dataflow
Fire whenInput tokens present AND output arcs emptyInput tokens with matching tags present
MechanismAcknowledgment flags (0/1)Token tagging + tag-matching unit
Tokens/arcOne at a timeMultiple concurrent
EnablesBasic parallelismLoop & recursion parallelism

Stream processing architecture

  • Scalar Unit — top-level controller running stream-control programs.
  • Stream Unit — runs compute kernels on clusters + manages bulk memory transfers.
  • Kernel — small code block applied repeatedly across a stream, e.g. C[i]=A[i]+B[i].
  • Storage hierarchy: LRF (local register files, nearest ALUs) → SRF (stream register files, on-chip staging) → SLS (stream load/store, bulk async DRAM transfers).
⟳
Steady-state execution: stream processors drop caches for software-managed bulk moves. 3-step overlap — SLS loads chunk 2 while clusters compute chunk 1 and write back chunk 0 — fully hiding DRAM latency.

Parallel accelerators: GPGPUs use SIMD/SIMT across Stream Multiprocessors (SMs); Intel Xeon Phi uses MIMD. Execution: Host→Device transfer over PCIe → kernel execution → Device→Host result (CUDA/OpenCL).

3
Remember
Define DFG. / Define kernel. / Define SRF & SLS. / List the 3 GPGPU execution steps.
6
Understand
Control-driven vs data-driven execution. / Static vs dynamic node-firing semantics. / Describe the scalar/stream hierarchical control.
6
Apply / Analyze
How do stream processors achieve steady-state without cache misses? / Explain Switch/Merge control operators. / Compare GPGPU (SIMD) vs Xeon Phi (MIMD).
10
Evaluate / Create
Model 10-marker: Contrast Von Neumann / Dataflow / Stream processors — node firing, storage hierarchy, latency hiding, and modern GPU accelerators.
7

Parallel Algorithms & Load Balancing

High-yield · 10

Concept

Three questions: which problems can be sped up? how do we divide work? how do we assign tasks so no processor idles?

Nick's Class (NC)
Subset of P-class problems solvable in polylogarithmic time O(log^k n) using a polynomial number of processors O(n^l) on a PRAM — the "highly parallelizable" problems. P-Complete problems (e.g. Circuit Value) are inherently sequential and unlikely to be in NC.

Five types of parallelization

  • Functional (task) — split into distinct heterogeneous tasks per processor.
  • Data — partition data; identical op on each chunk (SIMD-style).
  • Recursive — divide-and-conquer sub-problems (parallel quicksort/mergesort).
  • Exploratory — search a state space in parallel (game trees, maze/pathfinding).
  • Speculative — run multiple branch paths before the condition resolves; discard unused.
FeatureStatic Load BalancingDynamic Load Balancing
MappingCompile-time, pre-executionRuntime (work-stealing / task queues)
OverheadZero runtime overheadMonitoring + migration overhead
Workload fitRegular, predictable (dense matrix)Irregular, non-deterministic (graphs)
HardwareHomogeneousHandles heterogeneous speeds
3
Remember
Define Nick's Class (NC). / Differentiate functional vs data parallelization. / List challenges in task-to-processor assignment.
6
Understand
Explain the NC ⊆ P hierarchy & P-Complete difficulty. / Compare static vs dynamic load balancing.
6
Apply / Analyze
Analyze exploratory vs speculative parallelization with examples.
10
Evaluate / Create
Model 10-marker: Define NC vs P-Complete, the five parallelization types with examples, and evaluate static vs dynamic load balancing for heterogeneous distributed graph algorithms (justify dynamic over static for irregular graphs).
8

MapReduce & Spark

Syllabus-only · verify PPT
⚑
This topic is in your syllabus line but wasn't in the teaching transcript. Essentials below reflect standard course scope — confirm depth against your PPTs before relying on it.

Concept

MapReduce is a programming model for processing huge datasets across a distributed cluster in two phases. Spark is a faster successor that keeps data in memory.

MapReduce — two phases
Map: each node processes an input split → emits intermediate (key, value) pairs. Shuffle & Sort: group all values by key. Reduce: aggregate values per key → final output. Canonical example: word count.
Spark & RDD
RDD (Resilient Distributed Dataset) = immutable, partitioned, fault-tolerant in-memory collection rebuilt via lineage. Transformations (map, filter — lazy) vs Actions (collect, count — trigger execution). In-memory caching makes Spark much faster than disk-based MapReduce for iterative jobs.
≈
Why Spark > MapReduce: MapReduce writes intermediate results to disk between every stage; Spark keeps them in memory (RDDs) → far better for iterative ML / graph workloads.
3
Remember
Define MapReduce. / What is an RDD? / Name the phases: Map, Shuffle/Sort, Reduce.
6
Understand
Explain MapReduce with the word-count example. / Transformations vs actions in Spark. / Why is Spark faster than MapReduce?
6
Apply / Analyze
Trace the key–value flow of word-count through Map→Shuffle→Reduce. / Analyze fault tolerance via RDD lineage.
10
Evaluate / Create
Likely 10-marker: Explain the full MapReduce model with a worked example and compare it against Spark's in-memory RDD model — architecture, execution, fault tolerance, and suitability.
Sub-Unit 2 · 25 marks

Parallel Computing Architecture

Shared memory paradigm & hierarchy · cache coherence & MSI · memory consistency models · shared memory vs message passing · routing & Kafka

1

Shared Memory Paradigm & Memory Hierarchy

High-yield · 10

Concept

All cores share one global address space; caches sit next to each core to avoid slow DRAM trips. Three design axes: core arrangement, cache mapping, write policy.

ParadigmStructureMemory
Classic MulticoreIdentical cores, private L1/L2, shared L3UMA (uniform)
Multi-Socket (NUMA)Multiple sockets, local + remote nodes via QPI/HTNon-uniform
Asymmetric (AMC)Fast + simple cores, DVFSAmdahl-optimized
Locality
Spatial locality — nearby addresses accessed soon (array traversal). Temporal locality — same address re-accessed soon (loop variable).

Cache mapping

SchemePlacementHW costThrashing
Direct-mappedExactly 1 fixed lineLowHigh
Set-associativeAny line within a setModerateLow–moderate
Fully associativeAny line (parallel search)HighLowest
Write policies + Dirty Bit
Write-Through — write cache and memory every time; memory always current but high traffic (mitigated by a write buffer). Write-Back — write cache only, set Dirty Bit = 1; memory updated only on eviction. Dirty=0 clean, Dirty=1 modified.
⚠
AMC & Amdahl's Law: speedup is capped by the serial fraction — so AMC runs serial code on fast complex cores and parallel code on simple efficient cores. Write-back's stale-until-eviction memory is the root of the cache coherence problem (next topic).
3
Remember
Define spatial & temporal locality. / What is a dirty bit? / List the 3 shared-memory paradigms. / UMA vs NUMA latency.
6
Understand
How does AMC address Amdahl's Law? / Compare direct-mapped / set-associative / fully associative. / Role of the write buffer.
6
Apply / Analyze
Analyze latency/data transfer in multi-socket NUMA. / Compare write-through vs write-back under multi-core contention.
10
Evaluate / Create
Model 10-marker: Compare Classic/NUMA/AMC with diagrams, evaluate cache mapping schemes and write-through vs write-back to design an optimal HPC node.
2

Cache Coherence & MSI Snooping Protocol

High-yield · 10

Concept

Each core caches shared variable X privately. If core A modifies X, core B's copy is stale — the cache coherence problem. Fixed in hardware: cache controllers snoop the shared bus and invalidate/update copies on every write.

Coherence — definition
A memory system is coherent if any read to address X returns the most recent value written to X by any processor.
Three coherence conditions
Program Order — P's read after P's own write (no intervening writes) returns P's value. Write Propagation — a write becomes visible to other processors' later reads. Write Serialization — all processors observe writes to X in the same global order.
⚑
Migration = move private data to local cache (cut-paste). Replication = copy shared data to many caches (copy-paste) — cuts read latency but is the root cause of coherence problems.

Invalidate vs Update

  • Write-Invalidate — broadcast one invalidation signal → other copies marked Invalid; writer gains exclusive access, later writes need no bus traffic. Low bandwidth · most used.
  • Write-Update — broadcast every new data word to all caches live. High bandwidth · rarely used.
MSI — three states
Modified (M) — modified, exclusive, memory is stale/dirty. Shared (S) — clean, read-only, may exist in many caches. Invalid (I) — outdated or absent.
        CPU Read / BusRd            CPU Write / BusRdX
   (I) ───────────────────► (S) ───────────────────► (M)
    ▲                        │  CPU Write/Invalidate   │
    │  Bus Write/Invalidate  │◄────────────────────────┘
    └────────────────────────┘   Bus Read → write-back → S
                                 Bus Write → write-back → I
Execution trace · P1,P2 on X (init X=0)
StepActionBusP1P2Mem X
1P1 reads XBusRdSI0 clean
2P2 reads XBusRdSS0 clean
3P1 writes 100BusRdX/InvalMI0 stale
4P2 reads XBusRdS*S100 updated
*Step 4: P1 snoops the BusRd, halts DRAM, write-backs X=100 to supply the value, and drops M→S.
Extensions
MESI adds Exclusive (E) — clean + private → write without a bus broadcast. MOESI adds Owned (O) — dirty + shared → cache-to-cache transfer without writing back first.
3
Remember
Define cache coherence. / State the 3 MSI states. / Invalidate vs Update.
6
Understand
Explain the 3 coherence conditions. / Why is invalidate preferred over update? / Snooping vs directory-based protocols.
6
Apply / Analyze
Trace MSI states for a CPU-op sequence with bus signals + memory updates. / Analyze atomicity/bus-holding race conditions.
10
Evaluate / Create
Model 10-marker: State the 3 conditions, compare invalidate vs update, detail the MSI FSM with diagram, trace an execution, and evaluate MESI/MOESI extensions.
3

Memory Consistency Models

High-yield · 10

Concept

Coherence governs one address; consistency governs the ordering & visibility of reads/writes across multiple addresses. HW optimizations (write buffers, out-of-order, speculation) reorder memory ops for speed — the consistency model is the contract specifying what a read may legally return.

Coherence vs Consistency
Coherence — uniform view of a single location X. Consistency — legal global ordering of operations across many locations (X, Y, Z).
Sequential Consistency (Lamport)
Result of any execution = as if all processors' operations ran in some single global sequential order, with each processor's ops appearing in that order in its own program order.

Canonical 2-processor example (X=0, Y=0)

  P1:  (1) Write X=1     P2:  (3) Write Y=1
       (2) Read  Y            (4) Read  X

  Under SC → forbidden result:  (X=0, Y=0)
  Under Relaxed → (X=0, Y=0) is possible (write buffers)

Why SC forbids (0,0): program order forces P1's Write X before its Read Y; if Read Y returns 0 then Write Y hasn't happened, so Write X already has → P2's Read X must return 1. At least one processor must read 1.

Relaxed models
Relax program-order pairs for speed: TSO (x86) relaxes W→R; PSO relaxes W→R, W→W; Weak Ordering / Release Consistency relaxes all. Memory fences/barriers flush buffers and restore ordering where needed.
⟂
Fence: forces the processor to flush write buffers and stall later reads until preceding ops complete globally — restoring sequential consistency at chosen points.
FeatureSequential ConsistencyRelaxed
Program orderStrictly enforcedRelaxed for independent ops
(0,0) resultForbiddenAllowed (unless fenced)
PerformanceLower (stalls)Higher (buffers, OoO)
ProgrammingIntuitiveHarder (manual fences)
3
Remember
Define memory consistency. / Contrast coherence vs consistency. / Define program order.
6
Understand
Explain Lamport's SC. / Explain the 2-processor flag example. / Why do relaxed models improve performance?
6
Apply / Analyze
Analyze valid SC interleavings + prove (0,0) invalid. / How do write buffers cause reordering & how do fences fix it?
10
Evaluate / Create
Model 10-marker: Contrast coherence vs consistency, define SC with Lamport's conditions, demonstrate valid/invalid interleavings of the 2-processor example, and evaluate relaxed models (TSO/PSO/WO) + memory barriers.
4

Shared Memory vs Message Passing — Emulation & Primitives

High-yield · 10

Concept

Two communication models: shared memory (write→read a shared location) vs message passing (explicit Send()/Receive() across private spaces). Either can emulate the other in software.

Dual emulation
Shared mem → message passing: partition memory into mailboxes per ordered pair (Pi→Pj); Send = write to mailbox, Receive = read, guarded by flags. Message passing → shared mem: each variable gets an owner process; Write = update message, Read = query message → high network latency.

Primitives — two independent axes

SynchronousAsynchronous
BlockingSender blocks until receiver gets data + acksSender blocks until data copied to kernel buffer
Non-blockingReturns handle immediately; poll until ackReturns handle immediately; poll until buffer safe to reuse
Key primitive definitions
Blocking — control returns only after the op completes. Non-blocking — returns immediately with a handle to poll/Wait(). Synchronous — requires sender–receiver handshake. Asynchronous — returns once data leaves the user buffer.
Execution models & Synchronizer
Synchronous execution — bounded clock drift, bounded message delay, bounded step time. Asynchronous — no clock bounds, finite-but-unbounded delays. A Synchronizer is middleware that runs a synchronous algorithm on asynchronous hardware.
AspectShared MemoryMessage Passing
Address spaceGlobal unifiedDisjoint private
Comm.Implicit shared varsExplicit Send/Receive
SyncLocks, semaphores, monitorsAcks, barriers
FitMulticore, SMPsClusters, NOWs
3
Remember
Define blocking & non-blocking. / Synchronous vs asynchronous send. / What is a synchronizer?
6
Understand
How does shared memory emulate message passing? / How does message passing emulate shared memory (and why is it costly)? / Sync vs async execution models.
6
Apply / Analyze
Analyze the 4 Send variations (blocking/non-blocking × sync/async) with buffer behavior.
10
Evaluate / Create
Model 10-marker: Compare both paradigms, explain dual emulation (mailboxes ↔ owner processes), detail all primitive combinations with buffer mechanisms, and evaluate synchronous vs asynchronous execution.
5

Routing & Kafka

Syllabus-only · verify PPT
⚑
In your syllabus (Routing under Message-Passing Architecture; Kafka under Stream Processing) but not in the transcript. Essentials below are standard scope — confirm depth against your PPTs.

Routing

Routing basics
Routing decides the path a message takes through the interconnection network. Deterministic (e.g. dimension-order / XY routing — always same path for a src-dst pair) vs Adaptive (path chosen at runtime by congestion). Key concern: deadlock — cyclic channel dependencies; avoided with virtual channels or turn restrictions.
↳
Ties to Topic 5: routing works over the same topologies (mesh/hypercube) and switching strategies (store-and-forward, wormhole) you already studied.

Kafka

Apache Kafka
Distributed publish–subscribe streaming platform. Producers publish records to topics, split into partitions for parallelism; consumers (in consumer groups) subscribe and read. Brokers store partitions; ordering is guaranteed within a partition. Enables high-throughput, fault-tolerant, real-time stream processing.
3
Remember
Define routing. / Deterministic vs adaptive routing. / Define Kafka topic, partition, producer, consumer.
6
Understand
Explain deadlock in routing & how it's avoided. / Explain Kafka's pub-sub model and how partitions give parallelism.
6
Apply / Analyze
Analyze XY routing on a mesh for a given src→dst. / Analyze how Kafka guarantees ordering and fault tolerance.
10
Evaluate / Create
Possible 10-marker: Design a real-time streaming pipeline with Kafka and justify partition/consumer-group choices — or evaluate routing strategies for a given topology under congestion.