SlideShare a Scribd company logo
1 of 20
1
Directory Protocols
• Topics: directory-based cache coherence implementations
2
Flat Memory-Based Directories
Main memory
Cache 1 Cache 2 Cache 64
…
…
Block size = 128 B
Memory in each node = 1 GB
Cache in each node = 1 MB
For 64 nodes and 64-bit directory,
Directory size = 4 GB
For 64 nodes and 12-bit directory,
Directory size = 0.75 GB
3
Flat Memory-Based Directories
L2 cache
L1 Cache 1 L1 Cache 2 L1 Cache 64
…
…
Block size = 64 B
L2 cache in each node = 1 MB
L1 Cache in each node = 64 KB
For 64 nodes and 64-bit directory,
Directory size = 8 MB
For 64 nodes and 12-bit directory,
Directory size = 1.5 MB
4
Flat Cache-Based Directories
Main memory…
Block size = 128 B
Memory in each node = 1 GB
Cache in each node = 1 MB
6-bit storage in DRAM for each block;
DRAM overhead = 0.375 GB
12-bit storage in SRAM for each block;
SRAM overhead = 0.75 MB
Cache 7 Cache 3 Cache 26
5
Flat Cache-Based Directories
Main memory…
6-bit storage in L2 for each block;
L2 overhead = 0.75 MB
12-bit storage in L1 for each block;
L1 overhead = 96 KB
Cache 7 Cache 3 Cache 26
Block size = 64 B
L2 cache in each node = 1 MB
L1 Cache in each node = 64 KB
6
Flat Cache-Based Directories
• The directory at the memory home node only stores a
pointer to the first cached copy – the caches store
pointers to the next and previous sharers (a doubly linked
list)
• Potentially lower storage, no bottleneck for network traffic,
• Invalidates are now serialized (takes longer to acquire
exclusive access), replacements must update linked list,
must handle race conditions while updating list
7
Serializing Writes for Coherence
• Potential problems: updates may be re-ordered by the
network; General solution: do not start the next write until
the previous one has completed
• Strategies for buffering writes:
 buffer at home: requires more storage at home node
 buffer at requestors: the request is forwarded to the
previous requestor and a linked list is formed
 NACK and retry: the home node nacks all requests
until the outstanding request has completed
8
SGI Origin 2000
• Flat memory-based directory protocol
• Uses a bit vector directory representation
• Two processors per node, but there is no snooping
protocol within a node – combining multiple processors
in a node reduces cost
P
L2
CA
M/D
P
L2
Interconnect
9
Protocol States
• Each memory block has seven states
• Three stable states: unowned, shared, exclusive (either
dirty or clean)
• Three busy states indicate that the home has not
completed the previous request for that block
(read, read-excl or upgrade, uncached read)
• Poison state – used for lazy TLB shootdown
10
Handling Reads
• When the home receives a read request, it looks up
memory (speculative read) and directory in parallel
• Actions taken for each directory state:
 shared or unowned: memory copy is clean, data
is returned to requestor, state is changed to excl if
there are no other sharers
 busy: a NACK is sent to the requestor
 exclusive: home is not the owner, request is fwded
to owner, owner sends data to requestor and home
11
Inner Details of Handling the Read
• The block is in exclusive state – memory may or may not
have a clean copy – it is speculatively read anyway
• The directory state is set to busy-exclusive and the
presence vector is updated
• In addition to fwding the request to the owner, the memory
copy is speculatively forwarded to the requestor
 Case 1: excl-dirty: owner sends block to requestor
and home, the speculatively sent data is over-written
 Case 2: excl-clean: owner sends an ack (without data)
to requestor and home, requestor waits for this ack
before it moves on with speculatively sent data
12
Inner Details II
• Why did we send the block speculatively to the requestor
if it does not save traffic or latency?
 the R10K cache controller is programmed to not
respond with data if it has a block in excl-clean state
 when an excl-clean block is replaced from the cache,
the directory need not be updated – hence, directory
cannot rely on the owner to provide data and
speculatively provides data on its own
13
Handling Write Requests
• The home node must invalidate all sharers and all
invalidations must be acked (to the requestor), the
requestor is informed of the number of invalidates to expect
• Actions taken for each state:
 shared: invalidates are sent, state is changed to
excl, data and num-sharers is sent to requestor,
the requestor cannot continue until it receives all acks
(Note: the directory does not maintain busy state,
subsequent requests will be fwded to new owner
and they must be buffered until the previous write
has completed)
14
Handling Writes II
• Actions taken for each state:
 unowned: if the request was an upgrade and not a
read-exclusive, is there a problem?
 exclusive: is there a problem if the request was an
upgrade? In case of a read-exclusive: directory is
set to busy, speculative reply is sent to requestor,
invalidate is sent to owner, owner sends data to
requestor (if dirty), and a “transfer of ownership”
message (no data) to home to change out of busy
 busy: the request is NACKed and the requestor
must try again
15
Handling Write-Back
• When a dirty block is replaced, a writeback is generated
and the home sends back an ack
• Can the directory state be shared when a writeback is
received by the directory?
• Actions taken for each directory state:
 exclusive: change directory state to unowned and
send an ack
 busy: a request and the writeback have crossed
paths: the writeback changes directory state to
shared or excl (depending on the busy state),
memory is updated, and home sends data to
requestor, the intervention request is dropped
16
Serialization
• Note that the directory serializes writes to a location, but
does not know when a write/read has completed at any
processor
• For example, a read reply may be floating on the network
and may reach the requestor much later – in the meantime,
the directory has already issued a number of invalidates,
the invalidate is overwritten when the read reply finally
shows up – hence, each node must buffer its requests
until outstanding requests have completed
17
Serialization - II
• Assume that a dirty block is being passed from P1 to
another writer P2, the “ownership transfer” message from
P1 to home takes a long time, P2 receives its data and
carries on, P2 does a writeback  protocol must be
designed to handle this case correctly
If the writeback is from the node that placed the directory
in busy state, the writeback is NACKed
(If instead, the writeback was allowed to proceed, at
some later point, if the directory was expecting an
“ownership transfer”, it may mis-interpret the “floating”
message)
18
Directory Structure
• The system supports either a 16-bit or 64-bit directory
(fixed cost)
• For small systems, the directory works as a full bit
vector representation
• For larger systems, a coarse vector is employed – each
bit represents p/64 nodes
• State is maintained for each node, not each processor –
the communication assist broadcasts requests to both
processors
19
Page Migration
• Each page in memory has an array of counters to detect
if a page has more misses from a node other than home
• When a page is moved to a different physical memory
location, the virtual address remains the same, but the
page table and TLBs must be updated
• To reduce the cost of TLB shootdown, the old page sets
its directory state to poisoned – if a process tries to access
this page, the OS intervenes and updates the translation
20
Title
• Bullet

More Related Content

What's hot

Exchang Server 2013 chapter 2
Exchang Server 2013 chapter 2Exchang Server 2013 chapter 2
Exchang Server 2013 chapter 2Osama Mohammed
 
RocksDB compaction
RocksDB compactionRocksDB compaction
RocksDB compactionMIJIN AN
 
Plugging in oracle database 12c pluggable databases
Plugging in   oracle database 12c pluggable databasesPlugging in   oracle database 12c pluggable databases
Plugging in oracle database 12c pluggable databasesKellyn Pot'Vin-Gorman
 
Pgxc scalability pg_open2012
Pgxc scalability pg_open2012Pgxc scalability pg_open2012
Pgxc scalability pg_open2012Ashutosh Bapat
 
M|18 Creating a Reference Architecture for High Availability at Nokia
M|18 Creating a Reference Architecture for High Availability at NokiaM|18 Creating a Reference Architecture for High Availability at Nokia
M|18 Creating a Reference Architecture for High Availability at NokiaMariaDB plc
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveSecure-24
 
MariaDB MaxScale: an Intelligent Database Proxy
MariaDB MaxScale: an Intelligent Database ProxyMariaDB MaxScale: an Intelligent Database Proxy
MariaDB MaxScale: an Intelligent Database ProxyMarkus Mäkelä
 
Storage as a Service with Gluster
Storage as a Service with GlusterStorage as a Service with Gluster
Storage as a Service with GlusterVijay Bellur
 
Ch07 disaster recovery
Ch07 disaster recoveryCh07 disaster recovery
Ch07 disaster recoveryShane Flooks
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster.org
 
RocksDB detail
RocksDB detailRocksDB detail
RocksDB detailMIJIN AN
 
Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Vijay Bellur
 
Gluster.next feb-2016
Gluster.next feb-2016Gluster.next feb-2016
Gluster.next feb-2016Vijay Bellur
 
August 2013 HUG: Removing the NameNode's memory limitation
August 2013 HUG: Removing the NameNode's memory limitation August 2013 HUG: Removing the NameNode's memory limitation
August 2013 HUG: Removing the NameNode's memory limitation Yahoo Developer Network
 
Software defined storage
Software defined storageSoftware defined storage
Software defined storageGluster.org
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012Gluster.org
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookThe Hive
 

What's hot (20)

Exchang Server 2013 chapter 2
Exchang Server 2013 chapter 2Exchang Server 2013 chapter 2
Exchang Server 2013 chapter 2
 
RocksDB compaction
RocksDB compactionRocksDB compaction
RocksDB compaction
 
Plugging in oracle database 12c pluggable databases
Plugging in   oracle database 12c pluggable databasesPlugging in   oracle database 12c pluggable databases
Plugging in oracle database 12c pluggable databases
 
1 technical-dns-workshop-day1
1 technical-dns-workshop-day11 technical-dns-workshop-day1
1 technical-dns-workshop-day1
 
Pgxc scalability pg_open2012
Pgxc scalability pg_open2012Pgxc scalability pg_open2012
Pgxc scalability pg_open2012
 
M|18 Creating a Reference Architecture for High Availability at Nokia
M|18 Creating a Reference Architecture for High Availability at NokiaM|18 Creating a Reference Architecture for High Availability at Nokia
M|18 Creating a Reference Architecture for High Availability at Nokia
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archive
 
MariaDB MaxScale: an Intelligent Database Proxy
MariaDB MaxScale: an Intelligent Database ProxyMariaDB MaxScale: an Intelligent Database Proxy
MariaDB MaxScale: an Intelligent Database Proxy
 
운영체제론 Ch11
운영체제론 Ch11운영체제론 Ch11
운영체제론 Ch11
 
Storage as a Service with Gluster
Storage as a Service with GlusterStorage as a Service with Gluster
Storage as a Service with Gluster
 
Ch07 disaster recovery
Ch07 disaster recoveryCh07 disaster recovery
Ch07 disaster recovery
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmap
 
5 technical-dns-workshop-day3
5 technical-dns-workshop-day35 technical-dns-workshop-day3
5 technical-dns-workshop-day3
 
RocksDB detail
RocksDB detailRocksDB detail
RocksDB detail
 
Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015
 
Gluster.next feb-2016
Gluster.next feb-2016Gluster.next feb-2016
Gluster.next feb-2016
 
August 2013 HUG: Removing the NameNode's memory limitation
August 2013 HUG: Removing the NameNode's memory limitation August 2013 HUG: Removing the NameNode's memory limitation
August 2013 HUG: Removing the NameNode's memory limitation
 
Software defined storage
Software defined storageSoftware defined storage
Software defined storage
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 

Similar to Dir based imp_5

Snooping protocols 3
Snooping protocols 3Snooping protocols 3
Snooping protocols 3Yasir Khan
 
Lessons From Sharding Solr At Etsy: Presented by Gregg Donovan, Etsy
Lessons From Sharding Solr At Etsy: Presented by Gregg Donovan, EtsyLessons From Sharding Solr At Etsy: Presented by Gregg Donovan, Etsy
Lessons From Sharding Solr At Etsy: Presented by Gregg Donovan, EtsyLucidworks
 
Lessons from Sharding Solr
Lessons from Sharding SolrLessons from Sharding Solr
Lessons from Sharding SolrGregg Donovan
 
Running a distributed system across kubernetes clusters - Kubecon North Ameri...
Running a distributed system across kubernetes clusters - Kubecon North Ameri...Running a distributed system across kubernetes clusters - Kubecon North Ameri...
Running a distributed system across kubernetes clusters - Kubecon North Ameri...Alex Robinson
 
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...Flink Forward
 
How is Kafka so Fast?
How is Kafka so Fast?How is Kafka so Fast?
How is Kafka so Fast?Ricardo Paiva
 
Scylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the DatabaseScylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the DatabaseScyllaDB
 
coa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptxcoa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptxRuhul Amin
 
Spil Storage Platform (Erlang) @ EUG-NL
Spil Storage Platform (Erlang) @ EUG-NLSpil Storage Platform (Erlang) @ EUG-NL
Spil Storage Platform (Erlang) @ EUG-NLThijs Terlouw
 
The Highs and Lows of Stateful Containers
The Highs and Lows of Stateful ContainersThe Highs and Lows of Stateful Containers
The Highs and Lows of Stateful ContainersC4Media
 
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...ScyllaDB
 
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Ontico
 
Architecting for the cloud elasticity security
Architecting for the cloud elasticity securityArchitecting for the cloud elasticity security
Architecting for the cloud elasticity securityLen Bass
 
Stateful streaming and the challenge of state
Stateful streaming and the challenge of stateStateful streaming and the challenge of state
Stateful streaming and the challenge of stateYoni Farin
 
Managing Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchManaging Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchJoe Alex
 
An Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageAn Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageTakashi Hoshino
 
Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Xavier Lucas
 
Speed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio CachingSpeed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio CachingAlluxio, Inc.
 
Distributed Computing with Apache Hadoop: Technology Overview
Distributed Computing with Apache Hadoop: Technology OverviewDistributed Computing with Apache Hadoop: Technology Overview
Distributed Computing with Apache Hadoop: Technology OverviewKonstantin V. Shvachko
 

Similar to Dir based imp_5 (20)

Snooping protocols 3
Snooping protocols 3Snooping protocols 3
Snooping protocols 3
 
Lessons From Sharding Solr At Etsy: Presented by Gregg Donovan, Etsy
Lessons From Sharding Solr At Etsy: Presented by Gregg Donovan, EtsyLessons From Sharding Solr At Etsy: Presented by Gregg Donovan, Etsy
Lessons From Sharding Solr At Etsy: Presented by Gregg Donovan, Etsy
 
Lessons from Sharding Solr
Lessons from Sharding SolrLessons from Sharding Solr
Lessons from Sharding Solr
 
Running a distributed system across kubernetes clusters - Kubecon North Ameri...
Running a distributed system across kubernetes clusters - Kubecon North Ameri...Running a distributed system across kubernetes clusters - Kubecon North Ameri...
Running a distributed system across kubernetes clusters - Kubecon North Ameri...
 
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
 
How is Kafka so Fast?
How is Kafka so Fast?How is Kafka so Fast?
How is Kafka so Fast?
 
Scylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the DatabaseScylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the Database
 
Snooping 2
Snooping 2Snooping 2
Snooping 2
 
coa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptxcoa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptx
 
Spil Storage Platform (Erlang) @ EUG-NL
Spil Storage Platform (Erlang) @ EUG-NLSpil Storage Platform (Erlang) @ EUG-NL
Spil Storage Platform (Erlang) @ EUG-NL
 
The Highs and Lows of Stateful Containers
The Highs and Lows of Stateful ContainersThe Highs and Lows of Stateful Containers
The Highs and Lows of Stateful Containers
 
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
 
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
 
Architecting for the cloud elasticity security
Architecting for the cloud elasticity securityArchitecting for the cloud elasticity security
Architecting for the cloud elasticity security
 
Stateful streaming and the challenge of state
Stateful streaming and the challenge of stateStateful streaming and the challenge of state
Stateful streaming and the challenge of state
 
Managing Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchManaging Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using Elasticsearch
 
An Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageAn Efficient Backup and Replication of Storage
An Efficient Backup and Replication of Storage
 
Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28
 
Speed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio CachingSpeed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio Caching
 
Distributed Computing with Apache Hadoop: Technology Overview
Distributed Computing with Apache Hadoop: Technology OverviewDistributed Computing with Apache Hadoop: Technology Overview
Distributed Computing with Apache Hadoop: Technology Overview
 

More from Yasir Khan (20)

Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lec#1
Lec#1Lec#1
Lec#1
 
Ch10 (1)
Ch10 (1)Ch10 (1)
Ch10 (1)
 
Ch09
Ch09Ch09
Ch09
 
Ch05
Ch05Ch05
Ch05
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
 
Hpc sys
Hpc sysHpc sys
Hpc sys
 
Hpc 6 7
Hpc 6 7Hpc 6 7
Hpc 6 7
 
Hpc 4 5
Hpc 4 5Hpc 4 5
Hpc 4 5
 
Hpc 3
Hpc 3Hpc 3
Hpc 3
 
Hpc 2
Hpc 2Hpc 2
Hpc 2
 
Hpc 1
Hpc 1Hpc 1
Hpc 1
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Uncertainity
Uncertainity Uncertainity
Uncertainity
 
Logic
LogicLogic
Logic
 
M6 game
M6 gameM6 game
M6 game
 

Recently uploaded

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 

Recently uploaded (20)

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 

Dir based imp_5

  • 1. 1 Directory Protocols • Topics: directory-based cache coherence implementations
  • 2. 2 Flat Memory-Based Directories Main memory Cache 1 Cache 2 Cache 64 … … Block size = 128 B Memory in each node = 1 GB Cache in each node = 1 MB For 64 nodes and 64-bit directory, Directory size = 4 GB For 64 nodes and 12-bit directory, Directory size = 0.75 GB
  • 3. 3 Flat Memory-Based Directories L2 cache L1 Cache 1 L1 Cache 2 L1 Cache 64 … … Block size = 64 B L2 cache in each node = 1 MB L1 Cache in each node = 64 KB For 64 nodes and 64-bit directory, Directory size = 8 MB For 64 nodes and 12-bit directory, Directory size = 1.5 MB
  • 4. 4 Flat Cache-Based Directories Main memory… Block size = 128 B Memory in each node = 1 GB Cache in each node = 1 MB 6-bit storage in DRAM for each block; DRAM overhead = 0.375 GB 12-bit storage in SRAM for each block; SRAM overhead = 0.75 MB Cache 7 Cache 3 Cache 26
  • 5. 5 Flat Cache-Based Directories Main memory… 6-bit storage in L2 for each block; L2 overhead = 0.75 MB 12-bit storage in L1 for each block; L1 overhead = 96 KB Cache 7 Cache 3 Cache 26 Block size = 64 B L2 cache in each node = 1 MB L1 Cache in each node = 64 KB
  • 6. 6 Flat Cache-Based Directories • The directory at the memory home node only stores a pointer to the first cached copy – the caches store pointers to the next and previous sharers (a doubly linked list) • Potentially lower storage, no bottleneck for network traffic, • Invalidates are now serialized (takes longer to acquire exclusive access), replacements must update linked list, must handle race conditions while updating list
  • 7. 7 Serializing Writes for Coherence • Potential problems: updates may be re-ordered by the network; General solution: do not start the next write until the previous one has completed • Strategies for buffering writes:  buffer at home: requires more storage at home node  buffer at requestors: the request is forwarded to the previous requestor and a linked list is formed  NACK and retry: the home node nacks all requests until the outstanding request has completed
  • 8. 8 SGI Origin 2000 • Flat memory-based directory protocol • Uses a bit vector directory representation • Two processors per node, but there is no snooping protocol within a node – combining multiple processors in a node reduces cost P L2 CA M/D P L2 Interconnect
  • 9. 9 Protocol States • Each memory block has seven states • Three stable states: unowned, shared, exclusive (either dirty or clean) • Three busy states indicate that the home has not completed the previous request for that block (read, read-excl or upgrade, uncached read) • Poison state – used for lazy TLB shootdown
  • 10. 10 Handling Reads • When the home receives a read request, it looks up memory (speculative read) and directory in parallel • Actions taken for each directory state:  shared or unowned: memory copy is clean, data is returned to requestor, state is changed to excl if there are no other sharers  busy: a NACK is sent to the requestor  exclusive: home is not the owner, request is fwded to owner, owner sends data to requestor and home
  • 11. 11 Inner Details of Handling the Read • The block is in exclusive state – memory may or may not have a clean copy – it is speculatively read anyway • The directory state is set to busy-exclusive and the presence vector is updated • In addition to fwding the request to the owner, the memory copy is speculatively forwarded to the requestor  Case 1: excl-dirty: owner sends block to requestor and home, the speculatively sent data is over-written  Case 2: excl-clean: owner sends an ack (without data) to requestor and home, requestor waits for this ack before it moves on with speculatively sent data
  • 12. 12 Inner Details II • Why did we send the block speculatively to the requestor if it does not save traffic or latency?  the R10K cache controller is programmed to not respond with data if it has a block in excl-clean state  when an excl-clean block is replaced from the cache, the directory need not be updated – hence, directory cannot rely on the owner to provide data and speculatively provides data on its own
  • 13. 13 Handling Write Requests • The home node must invalidate all sharers and all invalidations must be acked (to the requestor), the requestor is informed of the number of invalidates to expect • Actions taken for each state:  shared: invalidates are sent, state is changed to excl, data and num-sharers is sent to requestor, the requestor cannot continue until it receives all acks (Note: the directory does not maintain busy state, subsequent requests will be fwded to new owner and they must be buffered until the previous write has completed)
  • 14. 14 Handling Writes II • Actions taken for each state:  unowned: if the request was an upgrade and not a read-exclusive, is there a problem?  exclusive: is there a problem if the request was an upgrade? In case of a read-exclusive: directory is set to busy, speculative reply is sent to requestor, invalidate is sent to owner, owner sends data to requestor (if dirty), and a “transfer of ownership” message (no data) to home to change out of busy  busy: the request is NACKed and the requestor must try again
  • 15. 15 Handling Write-Back • When a dirty block is replaced, a writeback is generated and the home sends back an ack • Can the directory state be shared when a writeback is received by the directory? • Actions taken for each directory state:  exclusive: change directory state to unowned and send an ack  busy: a request and the writeback have crossed paths: the writeback changes directory state to shared or excl (depending on the busy state), memory is updated, and home sends data to requestor, the intervention request is dropped
  • 16. 16 Serialization • Note that the directory serializes writes to a location, but does not know when a write/read has completed at any processor • For example, a read reply may be floating on the network and may reach the requestor much later – in the meantime, the directory has already issued a number of invalidates, the invalidate is overwritten when the read reply finally shows up – hence, each node must buffer its requests until outstanding requests have completed
  • 17. 17 Serialization - II • Assume that a dirty block is being passed from P1 to another writer P2, the “ownership transfer” message from P1 to home takes a long time, P2 receives its data and carries on, P2 does a writeback  protocol must be designed to handle this case correctly If the writeback is from the node that placed the directory in busy state, the writeback is NACKed (If instead, the writeback was allowed to proceed, at some later point, if the directory was expecting an “ownership transfer”, it may mis-interpret the “floating” message)
  • 18. 18 Directory Structure • The system supports either a 16-bit or 64-bit directory (fixed cost) • For small systems, the directory works as a full bit vector representation • For larger systems, a coarse vector is employed – each bit represents p/64 nodes • State is maintained for each node, not each processor – the communication assist broadcasts requests to both processors
  • 19. 19 Page Migration • Each page in memory has an array of counters to detect if a page has more misses from a node other than home • When a page is moved to a different physical memory location, the virtual address remains the same, but the page table and TLBs must be updated • To reduce the cost of TLB shootdown, the old page sets its directory state to poisoned – if a process tries to access this page, the OS intervenes and updates the translation