体系结构试验报告(cache存储过程)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
体系结构实验报告
实验目的
通过程序,模拟cache存储过程,并通过控制变量法模拟分析Cache性能实验步骤:
我们要通过老师所给程序进行模拟,并通过操作系统试验中老师所给算法生成出project.txt ,并通过project.txt 里面的数据来模拟程序的局部性等特性。
实验结果
1、比较关联方式,控制blockSize, CacheSize 不变:
(1)、Direct_mapped
(2) 、Set_associate:
(3) 、Fully_associate
通过上述三个比较可以看出,各种映射有自己的优点。
但是不难看出,增大关联度会减小miss rate,但是增加到一定程度又会有抑制作用。
2.比较Cache大小对于性能的影响。
(1)、Direct_mapped,Cache容量为64 时:
(2r
Direcflmapped
〉Cache
朿*
R
128 手
(3r Direcflmapped
〉Cache
助*
R
256
口
F
一pwsef 峑
s 2O J I 0
\^J.e e K ^g 63-L w g JnnnrEd 理"巧 nm rMecIrlxML H 肆 一 事 呼 LJw 匸 -dJ-LUf J F U »» a i B ci n IJr l t R n x li 黑 鱼 *=£1 K s 1!蚯c a p w p llrt t M:C4mw J L l n rll n i H H Hi L n h != l £lx-瞌 忻恥f*<41. 匸 « F 2 3L L /2\.*X «礼 j !H F i 对比实验结果,不难发现,随着Cache容量的增加,Cache的命中率一直在提升。分析原因发现,虽然Cache容量大了,但并不等于其预存的内容增多,所以命中率会上升。 3、比较Cache大小对于性能的影响。 (1)、Direct_mapped,关联度为 1 时: (2)、Direct_mapped,关联度为2 时: (3)、Direct_mapped,关联度为4 时: (4) 、Direct mapped ,关联度为 8 时: I ■ C -\LI wrs 1.11uwe i mo\Dw_-m e ts'_Vi EUUI I ^tud o l£f Pre e-crE\tt. q\Dfft!uq\ti'g.-i-j r IE Is-* -IrMHi