Directory Based Protocol-Advance Computer Architecture-Lecture Slides, Slides of Advanced Computer Architecture

This course focuses on quantitative principle of computer design, instruction set architectures, datapath and control, memory hierarchy design, main memory, cache, hard drives, multiprocessor architectures, storage and I/O systems, computer clusters. This lecture includes: Directory, Protocol, Processors, Cache, Blocks, Fetch, Invalidate, Remote, Directory, Address

Typology: Slides

2011/2012

Uploaded on 08/06/2012

amrusha
amrusha 🇮🇳

4.5

(33)

147 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Directory Based Protocol
In addition to cache state, must track which
processors have data when in the shared
state (usually bit vector, 1 if processor has
copy)
Keep it simple(r):
Writes to non-exclusive data => write miss
Processor blocks until access completes
Assume messages received and acted upon in
order sent
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Directory Based Protocol-Advance Computer Architecture-Lecture Slides and more Slides Advanced Computer Architecture in PDF only on Docsity!

Directory Based Protocol

In addition to cache state, must track which processors have data when in the shared state (usually bit vector, 1 if processor has copy)

Keep it simple(r):

  • Writes to non-exclusive data => write miss
  • Processor blocks until access completes
  • Assume messages received and acted upon in order sent

Directory Protocol … Cont’d

No bus and don’t want to broadcast:

  • interconnect no longer single arbitration point
  • all messages have explicit responses

Typically 3 processors involved

  • Local node where a request originates
  • Home node where the memory location of an address resides
  • Remote node has a copy of a cache block, whether exclusive or shared

Directory Protocol Messages

Message type Source Destination Msg Content

Invalidate Home directory Remote caches A

  • Invalidate a shared copy at address A.

Fetch Home directory Remote cache A

  • Fetch the block at address A and send it to its home directory

Fetch/Invalidate Home directory Remote cache A

  • Fetch the block at address A and send it to its home directory; invalidate the block in the cache

Directory Protocol Messages

Message type Source Destination Msg Content

Data value reply Home directory Local cache Data

  • Return a data value from the home memory (read miss response)

Data write-back Remote cache Home directory A, Data

  • Write-back a data value for address A (invalidate response)

State Transition Diagram for an

Individual Cache Block in a

Directory Based System

Write misses that were broadcast on the bus for snooping results in explicit invalidate & data fetch requests.

Note: on a write, a cache block is bigger, so need to read the full cache block

CPU -Cache State Machine

State machine for CPU requests for each memory block Invalid state if in memory

Fetch/Invalidate or Miss due to address conflict: send Data Write Back message to home directory

Invalidate or Miss due to address conflict: Invalid (^) (read/onlyShared )

Exclusive (read/writ e)

CPU Read

CPU Read hit

Send Read Miss message CPU Write: Send Write Miss msg to h.d.

CPU Write: Send Write Miss message to home directory

CPU read hit CPU write hit

Fetch: send Data Write Back message to home directory

Directory State Machine

State machine for Directory requests for each memory block Un-cached state if in memory Data Write Back: Sharers = {} (Write back block)

Uncached Shared (read only)

Exclusive (read/writ e)

Read miss: Sharers = {P} send Data Value Reply

Write Miss: send Invalidate to Sharers; then Sharers = {P}; send Data Value Reply msg

Write Miss: Sharers = {P}; send Data Value Reply msg

Read miss: Sharers += {P}; send Fetch; send Data Value Reply msg to remote cache (Write back block)

Read miss: Sharers += {P}; send Data Value Reply

Write Miss: Sharers = {P}; send Fetch/Invalidate; send Data Value Reply msg to remote cache docsity.com

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
  • Write miss:

Example Directory Protocol

Block is Shared state => the memory value is up- to-date; the read miss and write miss activities are:

  • 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
  • Data Write back
  • Write Miss

Example Directory Protocol

  • Data write-back:

 owner processor is replacing the block and hence must write it back, making memory copy up-to-date

 the block is now Uncached, and the Sharer set is empty.

Example Directory Protocol

  • 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.

Thanks

and

Allah Hafiz