Case study of qualitative and quantitative analysis of cache in hardware architecture

Source: Internet
Author: User

Case study of qualitative and quantitative analysis of cache in hardware architecture

Abstract:

In this paper, we will give an example of quantitative statistics on the impact of cache on processor performance in the hardware architecture, and how to derive qualitative conclusions from quantitative results.

Problem description:

Assume that the average loss rate of a processor in a certain sequence is 2%, and each instruction needs to access the memory 1.5 times. The cost of missing cache is 100 cycles;

Here, the cache hit time is included in the cpu execution time, and the ideal cpu cpi is 1.0. Compare the existence of the cache and the impact on the performance.

Answer:

Here, the performance evaluation starts with the cpu time:

After the corresponding data is substituted:


You can get the cpu time when the cache exists;

Next we will discuss how the cpu time should be expressed if no cache exists? No cache exists, meaning that each access is missing,

Then there will be 1000 memory accesses to the 1500 commands, and the corresponding pause clock cycle is 1500*100. Then, after dividing the number of commands by 1000, we will get:

CPU time (no cache) = 151 * Number of instructions * clock cycle time

Therefore, we conclude that the performance difference between the cache and the non-cache is nearly 40 times different. <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KCjxwPjxzdHJvbmc + encrypt + decrypt/decrypt + c1_vcd4kpha + encrypt/decrypt/J0tSx7cq + zqqjuw.vcd4kpha + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20141013/201410130916299.jpg" alt = "">

By examining the above formula, we can find that if cpi = 1.0 is a little bigger, the performance ratio will decrease accordingly, which means

The existence of cache has no significant impact on the performance of cpu with high cpi.

In the same way, if the clock frequency is high, the corresponding ratio of 150 to 3 will be larger, resulting in a larger performance ratio, which means the performance

The more significant the impact;

Therefore, from the investigation of the above formula, we can obtain the following qualitative conclusions (from quantitative analysis to qualitative conclusion ):

Cache is particularly important for cpu performance with low cpi and high clock frequency;

Conclusion and inspiration:

The highlights of this example are how to derive qualitative conclusions from formula or quantitative analysis.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.