免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Lab11:Memory MountainRequirementsPlatform: This lab assumes that you are using Visual C+ under a 32-bit version of Windows, using Intel Pentium or Pentium-equivalent machines. The exact compiler and platform are mostly unimportant, as the lab is reasonably portable.Get to know your Cache This platform of Intel Pentium machines has a memory hierarchy, which includes multi level of Cache, such as L1 cache, L2 cache, and sometimes L3 Cache maybe also exist.You can use the some tools, such as everest.exe, to find out the basic information of Cache of the computer system, which you are uings.For example, to using everest.exe, just double-click to run it. After it makes some information collection, it will show all the information about you computer system in its frame.The following is an example of its main frame. You can see the information about the Cache.Now, run everest.exe to find out the information of your computer systems Cache, and fill the blank.TypeSize in byteL1 cache64KBL2 cache2ML3 cacheThe project of memory_mountain Please download the project of memory_mountain.rar first.This project if the Windows-version of CMU CSAPP of mountain.c, which you can find in l the textbook chapter 6.6(Notes: this is the first version), l or from /public/1e/public/code.html/mountain.c(Notes: this is the first version)l or from /public/code.html/mountain.c(Notes: this is the first version)Your Task1Read the source code in mountain.cpp, and answer the following questions: (Notes: you dont have to pay too much attention on the function fcyc2() )1) What is the variable of size and stride used for? size是工作集的大小,即操作的数组的总大小,size越小,得到的工作集越小,时间局部性也就越好。stride是步长,表示读取的两个元素之间的间隔,stride越小,得到的空间局部性越好。步长stride的范围为116。1) What is the meaning of the return value of the function run()?Run()是一个封装函数,对于每个工作集大小size和步长stride的组合,它调用test()函数,并返回测量出的读吞吐率,单位为MB/s。2If necessary, make some change to the value of MINBYTES, MAXBYTES, and MAXSTRIDE.3Build the project and run it, the you can get an output file named as out.txt.4Copy the data in out.txt into an Excel file. Just as shown in the following figure.5Click any cell in this Excel file, then add a chart.Then click Finish.5Then you can get a figure alike this:6. The following two figures are from CSAPP e1 and CSAPP e2Figure of CSAPP e1Figure of CSAPP e27Just Paste your figure here:8How many ridges(山脊) do you get? And what are they correspond to? 有3个山脊。最高的是:L1缓存;中间是L2缓存;最低的是:memory;9Just compare the mountain with the information that you just got by running as everest.exe. And explain the How the spatial locality and temporal locality are shown in this figure.x轴可以看出stride与吞吐量的关系:stride越小,吞吐量越大,空间局部性越好,吞吐量随stride的增大而减小。图中二级缓存和memory的山脊上随着stride的增加有明显的空间局部性的斜坡,即stride越大吞吐量越小,空间局部性也越差。y轴可以看出size与吞吐量的关系:size
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 某汽车厂节能管理细则
- 某水泥厂质量控制制度
- 2026年宝鸡市陈仓区社区专职人员招聘(35人)笔试备考试题及答案解析
- 2026年哈尔滨市香坊第二幼儿园招聘考试备考题库及答案解析
- 2026嘉兴市南湖区人民医院公开招聘劳务派遣人员25人考试参考题库及答案解析
- 2026重庆市永川区南大街街道办事处招聘公益性岗位人员1名考试模拟试题及答案解析
- 2026年蚌埠市蚌山区公务员人员招聘考试试题与答案详解
- 2026沧州银行同业人才招聘7人笔试模拟试题及答案解析
- 2026年南宁市西乡塘区公务员人员招聘笔试参考题库与答案详解
- 2026年昆明市石林彝族自治县发展和改革局招聘编外工作人员(3人)考试参考题库及答案解析
- 江苏无锡市2026-2027学年高三上学期期中考试语文试题
- 高压配电柜安全操作规程
- 老年人抗菌药物的使用与注意事项
- 2026年护士条例学习解读课件(含案例分析)
- 露天矿山开采施工方案
- 驾驶服务外包投标方案
- 2026年兰州市红古区事业单位招聘笔试参考题库及答案解析
- 钢结构冬季施工方案
- 2026年广东省高中学业水平春季高考数学试卷真题(含答案详解)
- 招商佣金协议合同范本
- 部编版七年级历史上册期中核心必背知识清单
评论
0/150
提交评论