CSA Cache

15
Mechanism For Improving System Performance

Transcript of CSA Cache

Page 1: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 1/15

Mechanism

For ImprovingSystemPerformance

Page 2: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 2/15

2

Mechanism For Improving SystemPerformance

CacheMechanism used to buffer frequently useddata from external memory into fast speed

memory.Pipelining

Mechanism used to overlap the execution of program statements in order to reduce overallprogram execution time.

Page 3: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 3/15

CacheTechnology

Page 4: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 4/15

4

Cache Technology Topics

• Rationale for Cache

• Cache Terminologies/Performance

• Cache Design Considerations

• Cache Mapping

• Cache Replacement/Update Policy

Page 5: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 5/15

5

Why Cache ?

Analysis of a large number programs have foundthat references to the computer's memory tends tofocus on a certain area.

This phenomena is known as the property of locality of reference .

The argument for a cache, with respect to thisphenomena, is to place these commonly locateddata into a high speed memory (cache), which canimprove the system's overall access time .

Page 6: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 6/15

Page 7: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 7/15

7

Cache Terminologies

Hit

A condition whereby when an access is made toobtain a piece of data from memory, the piece of data is found in the cache.

Miss

A condition whereby when an access is made toobtain a piece of data from memory, the piece of data is not found in the cache.

Page 8: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 8/15

8

Cache Performance

Hit Ratio

The ratio (percentage) in which access to apiece of data, is successfully found in thecache.

The effectiveness of a cache can be measuredby looking at the hit ratio and miss ratio , that is,

hit = 1 - miss

Page 9: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 9/15

9

Can Cache Improve A System's Performance?

Take The Following Access Time Of A Computer System,

Tma = 500ns

Based on the above, the overall access time (T acc )to the memory is,

Tacc = T ma = 500ns

Page 10: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 10/15

10

Can Cache Improve A System's Performance?

If the system has a cache with an access time of 50ns (T ca ) and a hit ratio (H) of 90%, the overallaccess time (T acc ) is calculate as,

Tacc = (T ca X H) + (T ma X (1- H))

Tacc = (T ca X 0.90) + (T ma X (1-0.9))

Tacc = (50 X 0.90) + (500 X 0.10)

Tacc = (45) + (50)

Tacc = 95ns

Page 11: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 11/15

11

Cache Design Consideration

Implementing a cache requires due considerationand tradeoffs between the following:-

• The Hit Ratio

• Access Time on a Hit

• Delay Time on a Miss

• Cost

Page 12: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 12/15

12

Question 1 - Cache Performance

You are given that a computer system has a cachewith an access time of 15ns and the main memoryaccess time is 70ns.

If the hit ratio of the cache system is 75%, what is theaverage memory access time of the system?

Page 13: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 13/15

13

Question 2 - Cache Performance

If a computer system has a cache which has anaccess time of 12ns and the access time of the mainmemory is 70ns, what would the hit ratio be if the

overall memory access time of the system is 30ns?

Page 14: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 14/15

14

Question 3 - Cache Performance

You are given that a computer has an overall memoryaccess time of 40ns.

If the system has an access time of 90ns for the mainmemory and the hit ratio of 85%, what would theaccess time of the cache be?

Page 15: CSA Cache

8/7/2019 CSA Cache

http://slidepdf.com/reader/full/csa-cache 15/15

15

Question 4 - Cache Performance

If a system has an overall memory access time of 25ns and 10ns as access time for the cache, whatwould the access time of the main memory be if the hit

ratio of the cache is 70%?