8-way平均访存时间=(1-0.0009)×3+0.0009×13×0.79=3×0.79=2.37ns。
2.11 Consider the usage of critical word first and early restart on L2 cache misses. Assume a 1MB L2 cache with 64 byte blocks and a refill path that is 16 bytes wide. Assume that the L2 can be written with 16 bytes every 4 processor cycles, the time to receive the first 16 byte block from the memory controller is 120 cycles, each additional 16 byte block from main memory requires 16 cycles, and data can be bypassed directly into the read port of the L2 cache. Ignore any cycles to transfer the miss request to the L2 cache and the requested data to the L1 cache.
a. How many cycles would it take to service an L2 cache miss with and without critical word first and early restart?
b. Do you think critical word first and early restart would be more important for L1 caches or L2 caches, and what factors would contribute to their relative importance? 答:
a. 使用关键字优先和提前启动策略: 第一次获取16bytes所需时钟周期120. 不使用关键字优先和提前启动策略:
第一次获取16bytes所需时钟周期120个,获取其余字节所需的时钟周期为16×(64B-16B)/16B=48个,所以一共所需的时钟周
期数为168个。
b. 有两个关键因素:L1和L2缺失时,对平均访存时间的影响;使用关键字优先和提前启动策略时减少的缺失比率。
2.21 Virtual machines can lose performance from a number of events, such as the execution of privileged instructions, TLB misses, traps, and I/O. These events are usually handled in system code. Thus, one way of estimating the slowdown when running under a VM is the percentage of application execution time in system versus user mode. For example, an application spending 10% of its execution in system mode might slow down by 60% when running on a VM. Fugure 2.32 lists the early performance of various system calls under native execution, pure virtualization and paravirtualization for LMbench using Xen on an Itanuum system with times measured in microseconds.
a. What types of programs would be expected to have smaller slowdowns when running VMs?
b. If slowdowns were linear as a function of system time, given the slowdown above, how much slower would a program spending 20% of its execution in system time be expected to run?
c. What is the median slowdown of the system calls in the table above under pure virtualization and paravirtualization?
d. Which functions in the table above have the largest slowdowns?
What do you think the cause of this could be?
答:
a. I/O操作少,使用系统调用少的一些程序。
b. 如果slowdown与程序运行在系统模式时间成正比,则当程序有20%执行时间处在系统模式时,slowdown为2×60%=120%。 c. Pure virtualization环境下,median slowdown为19.26;Para virtualization环境下,median slowdown为4.14.
d. Null call 和Null I/O call 有最大的slowdown。由于虚拟机对这两个函数的优化性能最低,所以当虚拟机运行这类型函数时,slowdown会变得很大。
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库计算机体系结构_第一次作业(2)在线全文阅读。
相关推荐: