- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain the performance of cache in computer architecture?
The main reason for containing cache memory in a computer is to increase system performance by decreasing the time required to access memory. The component of cache performance are cache hits and cache misses.
Each time the CPU accesses memory, it determines the cache. If the requested data is in the cache, the CPU accesses the data in the cache, instead of physical memory, this is a cache hit. If the data is not in the cache, the CPU accesses the data from the main memory. This is a cache miss.
The average memory access time, TM is the weighted average of the cache access time, TC plus the access time for physical memory TP. The weighting factor is the hit ratio h. TM can be expressed as
Since TC is much less than TP, increasing the hit ratio reduces the average memory access time. The table shows for TC=10 ns,TP=60 ns, and various values of h.
Hit ratios and average memory access times
Consider that a computer system has an associative cache, a direct-mapped cache, or a two-way set-associative cache of 8 bytes. The CPU accesses the following locations in the order shown. The subscript for each value is the low-order 3 bits of its address in physical memory.
A0 B0 C2 A0 D1 B0 E4 F5 A0 C2 D1 B0 G3 C2 H7 I6 A0 B0
It can determine the hit ratio and average memory access times for this access pattern for each of the three cache configurations, assuming again that
TC=10 ns and
First, consider the associative cache. It is initially empty uses a FIFO replacement policy. The table shows the contents of the cache as each value is accessed. Seven out of the 18 accesses are hits, yielding a hit ratio of h = 0.389 and an average memory access time of
Cache activity using associative ache
- What are the methods of cache-coherency in computer architecture?
- What is Cache Memory in Computer Architecture?
- Explain the performance of Addition and Subtraction with signed magnitude data in computer architecture?
- What are snoopy cache protocols in computer architecture?
- What is the performance of Load-use delay in Computer Architecture?
- What is the performance measure of branch processing in computer architecture?
- How does pipelining improve performance in computer architecture?
- Explain the methods of reducing the number of microinstructions in computer architecture?
- Explain the various DMA transfer modes in computer architecture?
- Explain the architecture of JDBC?
- Explain the architecture of DBMS?
- Explain the IEEE Standard 754 Floating-Point Numbers in computer architecture?
- What is the Evolution of Computer Architecture?
- Explain the ODBC architecture?
- Computer System Architecture