190 likes | 481 Views
Additional Cache Notes. Dan Nguyen Spring 2005 - Lee. Cache Review. Cache is used to improve computer performance by giving faster access times. IE. Internet web browsers, or even simple examples such as shops Cache RAM is fast, operates at CPU level
E N D
Additional Cache Notes Dan Nguyen Spring 2005 - Lee
Cache Review • Cache is used to improve computer performance by giving faster access times. IE. Internet web browsers, or even simple examples such as shops • Cache RAM is fast, operates at CPU level • LRU and FIFO replacement policies are the most common way to increase cache hit ratio
Common Cache Found In Computers • Memory Cache • Disk Cache
MEMORY CACHE • A bank of memory that connects main memory and CPU • Data is transferred in cache blocks • Uses “look-ahead” algorithm • Basically, the more instructions executed, the better the system performance • LRU, FIFO
L1, L2, L3 Caches A type of memory cache. Computer systems use multi-level cache hierarchies. • L1 cache is embedded on processor chip • L2 cache is external to the processor • L3 is built into physical memory These “level” caches increase functionality in chips. Multi-level caches make the cost of accessing memory approximately the same as the cost of accessing a register. Example: going to a movie rental store A)Customer asks clerk for a popular movie. Clerk checks main storage room of all movies (one level cache) B)Customer checks the movie shelves, not found->asks clerk. Clerk checks in storage room (two level cache)
More on L1, L2, L3 • Closer to the CPU • If closer to the CPU, stores recently accessed data from RAM • Contains instructions that are executed next Processor L1 L2 L3 Itanium 32KB 256KB 3MB, 4MB, 6MB Itanium 32KB 96KB 2 MB, 4MB Xeon MP 8KB 256KB, 512KB 512KB,1MB,2Mb P4 8KB 512KB --
L1,L2,L3 Summary • The main concept is that we want to have more instructions executed in a fast memory location that is close to CPU.
DISK CACHE • A section of memory on disk controller that connects disk to CPU • When disk is read, it is copied into disk cache. This is usually a larger block of data.
Data Writing • During idle times, if cache data needs to be written, that data will be lined up to be written to disk at high speeds. • Example: MS Word Auto Save feature
Write Back Cache • Supports cache writing • Data written to disk, is first written to cache • Improves performance, faster than RAM • Example: MS Word Temp files
Write Through Cache • Supports cache writing • Slower for writing, but very good for reading data • Example: floppy disks
Pipeline Burst Cache • For data that is read much, less access times to those memory locations for that data. • Related to pipelining later in semester
Look-a-side Cache • Cache that shares the computer system bus with main memory
Inline Cache • Next to the CPU • Faster than look-a-side because next to the CPU • Slower than back side cache
Backside Cache • Very fast • Has a special connection to the CPU • Can operate at CPU level
Disk Cache Summary • Cache used directly with the disk, ie hard disks • backside > inline > look-a-side • Used to increase data transfer between different systems of the computer
Sources • Class textbook • www.answers.com • www.howstuffworks.com