160 likes | 297 Views
Cache Replacement in Modern Processors. Prepared By: Paul Kosinski and Bridget Johnston. Introduction.
E N D
Cache Replacement in Modern Processors Prepared By: Paul Kosinski and Bridget Johnston
Introduction • The replacement policy specifies which disk block should be removed when a new block must be entered into an already full cache, and should be chosen so as to ensure that blocks likely to be referenced in the near future are retained in the cache.
Common Cache Replacement Policies Used • Least Recently Used (LRU) • First In First Out (FIFO) • Last In First Out (LIFO) • Random (Rand)
Least Recently Used • Replaces the block in the cache which has not been used for the longest period of time • Advantage: simplicity • Drawback: does not consider file sizes & latency
First In First Out • Determines the oldest block rather than the least recently used. • Advantage: Easier to calculate Last In First Out • Uses the newest block
Random • Candidate blocks are randomly selected. • All disk blocks are accessed with equal probability • Used as a benchmark
Problem Statement • We will show the Cache Replacement Policy used by the Pentium III and Pentium IV processors and propose why each policy was used. We will use a simple matrix multiplication program and Vtune to determine our results.
Experimental Setup • Matrix Multiplication program • Vtune • Intel Pentium III machine • Intel Pentium IV machine
Experimental Process • Ran matrix multiplication program on Pentium III & IV with the following inputs as the dimensions of an n x n matrix:
Conclusion • Results Don’t Mean Anything • Simple Hardware Required due to Timing Constraints • This Means Only Simple Algorithms Should be Used • LRU • FIFO