|
|
||||||||||||||||
CCache |
|||||||||||||||||
Testing the effect of memory cache in PC.
Brief Explanation:
This program written as an assignment for the "Advanced Computer
Architecture" course, Fall 2000. We may use it to see the effect of cache in memory
operations. The following info may also be found by doing some explorations within the
program:
1. L1 cache size
2. L2 cache size
3. Cache block size
Some other info like "miss latency" also may be acquired with farther
observation. Considering The following three notes you may easily find the way all this
works.
Note 1. (Mem. Array Size < Cache Level Size) => No miss for that level
Note 2. (Stride > Cache Block Size) => 1 miss per iteration
Note 3. (Stride < Cache Block Size) => 1 miss per (Cache Block Size / Stride)
iteration (On average)
So to find the block size increase the stride using the 2^N values, when stride became
greater than block size the graph of new stride will overlap with the previous one.
You may download the last available version as freeware from the download page.
Screen shots:
Note: In the following images, horizontal axis represents the memory size and vertical axis represents the memory read time.
| Line Color | Stride |
| Brown | 4 |
| Blue | 8 |
| Green | 16 |
| Red | 32 |
| Blue (over the Red one) | 64 |

Test Computer #1: L1 = 16KB, Block size = 32B

Test Computer #2: L2 = 512KB, Block size = 32B

Test Computer #1: L2 = 512KB, Block size = 32B
none-sharp rise is due to the multi-threading effect of Windows OS
I recommend to close all of the other applications while you do the test with the program