CSA Cache

Post on 08-Apr-2018

217 views 0 download

Transcript of CSA Cache

8/7/2019 CSA Cache

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

Mechanism

For ImprovingSystemPerformance

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.

8/7/2019 CSA Cache

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

CacheTechnology

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

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 .

8/7/2019 CSA Cache

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

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.

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

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

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

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

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?

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?

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?

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%?