Docsity

Directory Protocol - Intro to Computer Architecture - Lecture Slides, Slides of Computer Architecture and Organization

Partial preview of the text

Download Directory Protocol - Intro to Computer Architecture - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

CS

Computer Architecture

Lecture 16:

Multiprocessor 2: Directory Protocol,

Interconnection Networks

Larger MPs

  • Separate Memory per Processor
  • Local or Remote access via memory controller
  • 1 Cache Coherency solution: non-cached pages
  • Alternative: directory per cache that tracks state of every block in every

cache

  • Which caches have a copies of block, dirty vs. clean, ...
  • Info per memory block vs. per cache block?
  • PLUS: In memory => simpler protocol (centralized/one location)
  • MINUS: In memory => directory is ƒ(memory size) vs. ƒ(cache size)
  • Prevent directory as bottleneck?

distribute directory entries with memory, each keeping track of which Procs have copies of their blocks

Network Examples

• Bi-directional Ring – EX: HP V Class

• 2-D Mesh and Hypercube – SGI Origin and

Cray T3E

• Crossbar and Omega Network – SMPs,

IBM SP3, and IP Routers

• Clusters using ethernet, Gigabit ethernet,

Myrinet, etc.

Properties of various networks will be

discussed later

CC-NUMA Multiprocessor:

Directory Protocol

  • What is Cache Coherent Non-Uniform Memory

Access (CC-NUMA)?

  • Similar to Snoopy Protocol: Three states
    • Shared: ≥ 1 processors have data, memory up-to-date
    • Uncached (no processor hasit; not valid in any cache)
    • Exclusive: 1 processor (owner) has data; memory out-of-date
  • In addition to cache state, must track which

processors have data when in the shared state

(usually bit vector, 1 if processor has copy)

  • Directory Size: Big => Limited Directory Schemes

(Not to be discussed)

Example Directory Protocol

  • Message sent to directory causes two actions:
    • Update the directory
    • More messages to satisfy request
  • Block is in Uncached state: the copy in memory is the

current value; only possible requests for that block are:

  • Read miss: requesting processor sent data from memory &requestor made only sharing node; state of block made Shared.
  • Write miss: requesting processor is sent the value & becomes the Sharing node. The block is made Exclusive to indicate that the only valid copy is cached. Sharers indicates the identity of the owner.
  • Block is Shared => the memory value is up-to-date:
  • Read miss: requesting processor is sent back the data from memory & requesting processor is added to the sharing set.
  • Write miss: requesting processor is sent the value. All processors in the set Sharers are sent invalidate messages, & Sharers is set to identity of requesting processor. The state of the block is made Exclusive.

Example Directory Protocol

  • Block is Exclusive: current value of the block is held in the

cache of the processor identified by the set Sharers (the

owner) => three possible directory requests:

  • Read miss: owner processor sent data fetch message, causing state of block in owner’s cache to transition to Shared and causes owner to send data to directory, where it is written to memory & sent back to requesting processor. Identity of requesting processor is added to set Sharers, which still contains the identity of the processor that was the owner (since it still has a readable copy). State is shared.
  • Data write-back: owner processor is replacing the block and hence must write it back, making memory copy up-to-date (the home directory essentially becomes the owner), the block is now Uncached, and the Sharer set is empty.
  • Write miss: block has a new owner. A message is sent to old owner causing the cache to send the value of the block to the directory from which it is sent to the requesting processor, which becomes the new owner. Sharers is set to identity of new owner, and state of block is made Exclusive.

Interconnection Topologies

  • Class networks scaling with N
  • Logical Properties:
    • distance, degree
  • Physical properties
    • length, width
  • Static vs. Dynamic Networks
  • Fully connected network
    • diameter = 1
    • degree = N
    • cost?
      • bus => O(N), but BW is O(1) - actually worse
      • crossbar => O(N^2 ) for BW O(N)
  • VLSI technology determines switch degree

What characterizes a network?

  • Topology (what)
    • physical interconnection structure of the network graph
    • direct: node connected to every switch
    • indirect: nodes connected to specific subset of switches
  • Routing Algorithm (which)
    • restricts the set of paths that msgs may follow
    • many algorithms with different properties
      • gridlock avoidance?
  • Switching Strategy (how)
    • how data in a msg traverses a route
    • circuit switching vs. packet switching
  • Flow Control Mechanism (when)
    • when a msg or portions of it traverse a route
    • what happens when traffic is encountered?

Topological Properties

  • Routing Distance - number of links on route
  • Diameter - maximum routing distance between

any two nodes in the network

  • Average Distance – Sum of distances between

nodes/number of nodes

  • Degree of a Node – Number of links connected

to a node => Cost high if degree is high

  • A network is partitioned by a set of links if their

removal disconnects the graph

  • Fault-tolerance – Number of alternate paths

between two nodes in a network

Review: Performance Metrics

Sender

Receiver

Sender Overhead

Transmission time (size ÷ bandwidth)

Transmission time (size ÷ bandwidth)

Time of Flight

Receiver Overhead

Transport Latency

Total Latency = Sender Overhead + Time of Flight + Message Size ÷ BW + Receiver Overhead

Total Latency

(processor busy)

(processor busy)

Includes header/trailer in BW calculation?

More Static Networks: Linear

Arrays and Rings

  • Linear Array
    • Diameter?
    • Average Distance?
    • Bisection bandwidth?
    • Route A -> B given by relative address R = B-A
  • Torus?
  • Examples: FDDI, SCI, FiberChannel Arbitrated Loop, KSR

Linear Array

Torus

Torus arranged to use short wires

Multidimensional Meshes and Tori

  • d -dimensional array
    • n = kd-1 X ...X k (^) O nodes
    • described by d -vector of coordinates (i (^) d-1, ..., i (^) O)
  • d -dimensional k -ary mesh: N = kd
    • k = d√N
    • described by d -vector of radix k coordinate
  • d -dimensional k -ary torus (or k -ary d -cube)?

Ex: Intel Paragon (2D), SGI Origin (Hypercube), Cray T3E (3DMesh)

2D Grid 3D Cube

Origin Network

  • Each router has six pairs of 1.56MB/s unidirectional links - Two to nodes, four to other routers - latency: 41ns pin to pin across a router
  • Flexible cables up to 3 ft long
  • Four “virtual channels”: request, reply, other two for priority or I/O

N

N

N N

N

N

N N

N

N

N N

(b) 4-node (c) 8-node^ (d) 16-node

(e) 64-node

(d) 32-node

meta-router

Case Study: Cray T3D

  • Build up info in ‘shell’
  • Remote memory operations encoded in address

DRAM

Req out

P

$ MMU

150-MHz DEC Alpha (64 bit) 8-KB instruction + 8-KB data 43-bit virtual address

Prefetch Load-lock, store-conditional

32-bit

DTB

Prefetch queue · 16 × 64

Message queue · 4,080 × 4 × 64

Special registers · swaperand · fetch&add · barrier

PE# + FC

DMA

Resp in 3D torus of pairs of PEs · share net and BLT · up to 2, · 64 MB each

Req in

Resp out

Block transfer

32- and 64-bit memory and byte operations Nonblocking stores and memory barrier

engine

physical address