COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

Hardware-based solutions are generally referred to as cache coherence protocols.
These solutions provide dynamic recognition at run time of potential inconsistency
conditions. Because the problem is only dealt with when it actually arises, there
is more effective use of caches, leading to improved performance over a software
approach. In addition, these approaches are transparent to the programmer and the
compiler, reducing the software development burden.
Hardware schemes differ in a number of particulars, including where the state
information about data lines is held, how that information is organized, where coher-
ence is enforced, and the enforcement mechanisms. In general, hardware schemes
can be divided into two categories: directory protocols and snoopy protocols.

DIRECTORY PROTOCOLS Directory protocols collect and maintain information
about where copies of lines reside. Typically, there is a centralized controller that is
part of the main memory controller, and a directory that is stored in main memory.
The directory contains global state information about the contents of the various
local caches. When an individual cache controller makes a request, the centralized
controller checks and issues necessary commands for data transfer between
memory and caches or between caches. It is also responsible for keeping the state
information up to date; therefore, every local action that can affect the global state
of a line must be reported to the central controller.
Typically, the controller maintains information about which processors have
a copy of which lines. Before a processor can write to a local copy of a line, it
must request exclusive access to the line from the controller. Before granting this
exclusive access, the controller sends a message to all processors with a cached
copy of this line, forcing each processor to invalidate its copy. After receiving
acknowledgments back from each such processor, the controller grants exclusive
access to the requesting processor. When another processor tries to read a line
that is exclusively granted to another processor, it will send a miss notification
to the controller. The controller then issues a command to the processor hold-
ing that line that requires the processor to do a write back to main memory. The
line may now be shared for reading by the original processor and the requesting
processor.
Directory schemes suffer from the drawbacks of a central bottleneck and the
overhead of communication between the various cache controllers and the central
controller. However, they are effective in large-scale systems that involve multiple
buses or some other complex interconnection scheme.

SNOOPY PROTOCOLS Snoopy protocols distribute the responsibility for
maintaining cache coherence among all of the cache controllers in a multiprocessor.
A cache must recognize when a line that it holds is shared with other caches.

When an update action is performed on a shared cache line, it must be announced
to all other caches by a broadcast mechanism. Each cache controller is able to
“snoop” on the network to observe these broadcasted notifications, and react
accordingly.
Snoopy protocols are ideally suited to a bus-based multiprocessor, because
the shared bus provides a simple means for broadcasting and snooping. However,
because one of the objectives of the use of local caches is to avoid bus accesses, care
must be taken that the increased bus traffic required for broadcasting and snooping
does not cancel out the gains from the use of local caches.
Two basic approaches to the snoopy protocol have been explored: write inval-
idate and write update (or write broadcast). With a write-invalidate protocol, there
can be multiple readers but only one writer at a time. Initially, a line may be shared
among several caches for reading purposes. When one of the caches wants to per-
form a write to the line, it first issues a notice that invalidates that line in the other
caches, making the line exclusive to the writing cache. Once the line is exclusive, the
owning processor can make cheap local writes until some other processor requires
the same line.
With a write-update protocol, there can be multiple writers as well as multiple
readers. When a processor wishes to update a shared line, the word to be updated is
distributed to all others, and caches containing that line can update it.
Neither of these two approaches is superior to the other under all circum-
stances. Performance depends on the number of local caches and the pattern of
memory reads and writes. Some systems implement adaptive protocols that employ
both write-invalidate and write-update mechanisms.
The write-invalidate approach is the most widely used in commercial multi-
processor systems, such as the Pentium 4 and Power PC. It marks the state of every
cache line (using two extra bits in the cache tag) as modified, exclusive, shared, or
invalid. For this reason, the write-invalidate protocol is called MESI. In the remain-
der of this section, we will look at its use among local caches across a multiproces-
sor. For simplicity in the presentation, we do not examine the mechanisms involved
in coordinating among both level 1 and level 2 locally as well as at the same time
coordinating across the distributed multiprocessor. This would not add any new
principles but would greatly complicate the discussion.

Hardware Solutions CACHE COHERENCE AND THE MESI PROTOCOL的更多相关文章

  1. Software Solutions CACHE COHERENCE AND THE MESI PROTOCOL

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION Software cache cohere ...

  2. CACHE COHERENCE AND THE MESI PROTOCOL

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION In contemporary multi ...

  3. Cache coherence protocol

    A cache coherence protocol facilitates a distributed cache coherency conflict resolution in a multi- ...

  4. The MESI Protocol

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION To provide cache cons ...

  5. Multiprocessing system employing pending tags to maintain cache coherence

    A pending tag system and method to maintain data coherence in a processing node during pending trans ...

  6. 计算机系统结构总结_Multiprocessor & cache coherence

    Textbook:<计算机组成与设计——硬件/软件接口>  HI<计算机体系结构——量化研究方法>          QR 最后一节来看看如何实现parallelism 在多处 ...

  7. 《大话处理器》Cache一致性协议之MESI (转)

    原文链接:http://blog.csdn.net/muxiqingyang/article/details/6615199 Cache一致性协议之MESI 处理器上有一套完整的协议,来保证Cache ...

  8. Cache一致性协议之MESI

    http://blog.csdn.net/muxiqingyang/article/details/6615199 Cache一致性协议之MESI 处理器上有一套完整的协议,来保证Cache一致性.比 ...

  9. 《大话处理器》Cache一致性协议之MESI【转】

    转自:https://blog.csdn.net/muxiqingyang/article/details/6615199 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载 ...

随机推荐

  1. linux下 chown命令

    对Document/ 目录下的所有文件与子目录执行相同的所有者变更,修改所有者为users用户组的username用户 chown -R username:users Document/ userna ...

  2. 【Maven】搭建Maven环境

    第一步:下载,并安装配置Maven 下载安装包:可以到官网下载(可能很慢),建议从CSDN上下载. 解压安装包:解压到Eclipse和Java一起把,改配置什么的一眼就看到:反正我是把Java,Ecl ...

  3. 【GoLang】golang 中 defer 参数的蹊跷

    参考资料: http://studygolang.com/articles/7994--Defer函数调用参数的求值 golang的闭包和普通函数调用区别:http://studygolang.com ...

  4. request response

    request 和 response 这两个对象是出现在service方法中.service方法是用来接收请求处理请求,完成响应的.     接受请求指的就是request对象     完成响应指的就 ...

  5. CFileDialog(文件夹对话框类)和CFontDialog(字体设置对话框类)的使用学习

    CFileDialog(文件夹对话框类) 主要用于文件的保存,另存,打开,关闭等功能 功能“另存为”的实现: void CTXTDlg::OnFileSaveas() { LPCTSTR szFilt ...

  6. 数组排序sort()

    数组排序sort() sort()方法使数组中的元素按照一定的顺序排列. 语法: arrayObject.sort(方法函数) 参数说明: 1.如果不指定<方法函数>,则按unicode码 ...

  7. 【转】如何使用VS 2013发布一个可以在Windows XP中独立运行的可执行文件

    问题描述: 用VS2013写好一个程序,在本机上运行一切正常.但是如果直接把exe文件放到另一台机器上用,则会出现: Windows XP:不是一个正常的win32程序 Window 7:缺少msvc ...

  8. Android 某些配置记录

    1, system image 大小配置: devices/intel/baytrail/ffrd8/BoardConfig.mk :  BOARD_SYSTEMIMAGE_PARTITION_SIZ ...

  9. Java 8相关

    语言生态系统中的所有语言都有优胜劣汰的压力.虽然Java语言当前还在健康发展,但是保不定哪天就完蛋了. Java8增加的新特性从根本上来说是为了提高搬砖的姿势和效率. 多核编程的更好支持. 方法成为一 ...

  10. CSS3样式运用,悬浮立体方块

    前言 作为后端开发者,了解前端是必须的,所以自己琢磨着弄了弄一个CSS3的阴影运用. 我记得这应该是以前淘宝用过的,PS:现在跑到淘宝去看,好像没有找到了.现在流行扁平化设计,没有了阴影,没有了立体! ...