体系结构量化研究方法 第五章-2
Directory-based Coherence Protocols
-
Revisit snooping-based coherence protocol:
- Use broadcast to track the state of every cache block
- No centralized data structure
- Require communication with all caches on every cache miss
- No centralized data structure
- Inexpensive, but suffer poor scalability
- Use broadcast to track the state of every cache block
-
Directory-based protocol: alternative to snooping-based protocol
- Directory keeps track of the information of every memory block:
- Block states
- Which caches have each block
- Support direct communication to the relevant caches
- [Centralized] Easy for multicore with a shared outermost (L3) cache
- For each block: simply keep a bit vector of the size equal to the number of cores
- [Decentralized] A single directory as used in multicore is hard to scale out
- The directory itself should be distributed
- Directory keeps track of the information of every memory block:
Structure of Multiprocessor with Distributed Directory
- Directory shall be distributed to multiprocessors in a well-mapped manner(one directory is added to each node)
- Avoid broadcasting
- The coherence protocol can directly find the directory information for any memory block
- Increase bandwidth
- The directory information can be distributed to different cache banks
- Avoid broadcasting
- The simplest directory implementation:
- The simplest directory implementation:
- Associate an entry in the directory with each memory block
- [Cost] Information size is proportional to the product of
- the number of memory blocks
- the number of nodes
The Basics
-
Three states maintained for each memory block by directory
- Shared
- Indicate one or more nodes have the block cached, value in memory is up-to-date
- Must also track which nodes have copies of that block
- Those copies will need to be invalidated on a write
- Uncached
- Indicate no node has a copy of the cache block
- Modified
- Indicate exactly one node has a copy of the cache block, value in memory is out-of-date
- Also use the bit vector to keep track of the owner of the block
- Shared
-
Compare directory-based protocols with snooping-based protocols:
- States and transitions for cache blocks are almost identical
- Broadcasting is replaced by two-stage communication
- First between the requesting node and the directory
- Then between the directory and one or more remote nodes
Messages Sent Among Node
原文地址:https://blog.csdn.net/qq_42047140/article/details/144792754
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!