体系结构试验报告_第1页
体系结构试验报告_第2页
体系结构试验报告_第3页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、体系结构实验报告实验目的通过程序,模拟 cache 存储过程,并通过控制变量法模拟分析 Cache 性能实验步骤:成出,并通过里面的数据来模拟程序的局部性等特性。一、 实验结果1、 比较关联方式,控制 blockSize, CacheSize 不变:1、Direct_mapped:、Set_associate:、Fully_associate通过上述三个比较可以看出,各种映射有自己的优点。missrate,作用。2.比较 Cache 大小对于性能的影响。、Direct_mapped,Cache64、Direct_mapped,Cache128、Direct_mapped,Cache256Cac

2、he分析原因发现,虽然Cache命中率会上升。3Cache、Direct_mapped1、Direct_mapped2、Direct_mapped4、Direct_mapped8、Direct_mapped16可以看出,随着关联度的提高,命中率也有所增加。4、比较 block Number 对于 Cache 性能影响。、Direct_mapped, block number1、Direct_mapped, block number2(1)、Direct_mapped, block number4blocknumber会有效的预测为下次用到的。通过程序可以看出,这种方法会增加程序运行时间。习题:

3、利用 Cache 模拟器 CacheSimulator 程序分析解决:The following C programis run (withno optimizations)on a machinewith a cache that has four-word(16-byte)blocks and holds 256 bytes of int i, j, c, stride, array256;for (i=0; i10000; i+)for (j=0; j256; j=j+stride) c=arrayj+5;ifweconsideronlythecacheactivitygenerated

4、byreferencestothe array and we assume that integers are words, what is the expected rate when the cache is direct-mapped and stride=132 How about if stride=131 Would either of these change if the cache were two-way set associative截取实验结果屏幕,分析实验结果,写出实验报告和实验心得。1、当 stride=132 时:Cache256B,16B,Cache blocks个。array0array132Cacheblock01(132/4)mod16=1array0miss,并将其从memorycachearray132时也会产生一次memorycachecache2miss。1、当 stride=131 时:分析:Cache 容量大小为 256B,每个块大小为 16B,所以 Cache blocks 一共有 16个。array0array132Cache block0(132/4)mod16=0。array0miss,memorycachearray131miss,memorycachemiss。实验总结:Cache

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论