Top Banner
A A Seminar Presentation On Seminar Presentation On “Dynamic Cache Management “Dynamic Cache Management Technique” Technique” Presented Presented By: By: RAMESH RAMESH 08QQ1A0530 08QQ1A0530 (CSE, Final Year) (CSE, Final Year)
14
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dynamic cache management technique

A A Seminar Presentation OnSeminar Presentation On

“Dynamic Cache Management “Dynamic Cache Management Technique”Technique”

Presented By:Presented By:RAMESH RAMESH

08QQ1A053008QQ1A0530 (CSE, Final Year)(CSE, Final Year)

Page 2: Dynamic cache management technique

ContentContent

Introduction to cache memoryIntroduction to cache memory How stored data is transferred to the CPU How stored data is transferred to the CPU Mapping functionsMapping functions Dynamic Cache ManagementDynamic Cache Management Dynamic Techniques For L0-cache Dynamic Techniques For L0-cache

ManagementManagement

Page 3: Dynamic cache management technique

Introduction to cache memoryIntroduction to cache memory

A cache, in computer terms, is a place to store A cache, in computer terms, is a place to store information that's faster than the place where the information that's faster than the place where the information is usually storedinformation is usually stored

Cache memory is fast memory that is used to hold the Cache memory is fast memory that is used to hold the most recently accessed data most recently accessed data

Only frequently accessed data will stay in cache, which Only frequently accessed data will stay in cache, which allows the CPU to access it more quickly allows the CPU to access it more quickly

it is placed in the processor chip, which allows it to 'talk' it is placed in the processor chip, which allows it to 'talk' with the processor direct at a much higher speed than with the processor direct at a much higher speed than standard RAM. standard RAM.

Page 4: Dynamic cache management technique

How stored data is transferred to the How stored data is transferred to the CPU ?? CPU ??

Page 5: Dynamic cache management technique

Mapping functions Mapping functions

Since M>>C, how are blocks mapped to specific lines Since M>>C, how are blocks mapped to specific lines in cache.in cache.

1.1. Direct mapping Direct mapping

2.2. Associative mapping Associative mapping

3.3. Set associative mappingSet associative mapping

Page 6: Dynamic cache management technique

Dynamic Cache ManagementDynamic Cache Management

It’s resizing strategy of the cache memoryIt’s resizing strategy of the cache memory

Dynamic caching allows for dynamic resizing both Dynamic caching allows for dynamic resizing both across and within applications execution.across and within applications execution.

The basic idea is that only the most frequently executed The basic idea is that only the most frequently executed portion of the code should be stored in the L0-cache portion of the code should be stored in the L0-cache

Page 7: Dynamic cache management technique

POWER TRENDS FOR CURRENT POWER TRENDS FOR CURRENT MICROPROCESSORS MICROPROCESSORS

Page 8: Dynamic cache management technique

DYNAMIC TECHNIQUES FOR L0-CACHE DYNAMIC TECHNIQUES FOR L0-CACHE MANAGEMENT MANAGEMENT

1. Simple Method.1. Simple Method.

2. Static Method.2. Static Method.

3. Dynamic Confidence Estimation Method.3. Dynamic Confidence Estimation Method.

4. Restrictive Dynamic Confidence Estimation Method.4. Restrictive Dynamic Confidence Estimation Method.

5. Dynamic Distance Estimation Method.5. Dynamic Distance Estimation Method.

Page 9: Dynamic cache management technique

SIMPLE METHOD SIMPLE METHOD

If a branch predictor is mispredicted, the machine will If a branch predictor is mispredicted, the machine will access the I-cache to fetch the instructions. access the I-cache to fetch the instructions.

If a branch is predicted correctly, the machine will access If a branch is predicted correctly, the machine will access the L0-cache. the L0-cache.

In a misprediction , the machine will start fetching the In a misprediction , the machine will start fetching the instructions from the correct address by accessing the I-instructions from the correct address by accessing the I-cache. cache.

Page 10: Dynamic cache management technique

STATIC METHOD STATIC METHOD

If a ‘high confidence’ branch was predicted incorrectly, If a ‘high confidence’ branch was predicted incorrectly, the I-cache is accessed for the subsequent basic blocks.the I-cache is accessed for the subsequent basic blocks.

If more than n low confidence branches have been If more than n low confidence branches have been decoded in a row, the I-cache is accessed. Therefore the decoded in a row, the I-cache is accessed. Therefore the L0-cache will be bypassed when either of the two L0-cache will be bypassed when either of the two conditions are satisfied. conditions are satisfied.

In any other case the machine will access the L0-cache.In any other case the machine will access the L0-cache.

Page 11: Dynamic cache management technique

DYNAMIC CONFIDENCE ESTIMATION DYNAMIC CONFIDENCE ESTIMATION METHODMETHOD

It is a dynamic version of the static method. It is a dynamic version of the static method. The confidence of the I-cache is accessed if The confidence of the I-cache is accessed if 1. A high confidence branch is mispredicted. 1. A high confidence branch is mispredicted. 2. More than n successive ‘low confidence’ branches 2. More than n successive ‘low confidence’ branches

are encountered.are encountered. it is more accurate in characterizing a branch and, it is more accurate in characterizing a branch and,

then, regulating the access of the L0-cache. then, regulating the access of the L0-cache.

Page 12: Dynamic cache management technique

RESTRICTIVE DYNAMIC CONFIDENCE RESTRICTIVE DYNAMIC CONFIDENCE ESTIMATION METHOD ESTIMATION METHOD

Restrictive dynamic scheme is a more selective scheme Restrictive dynamic scheme is a more selective scheme in which only the really important basic blocks would be in which only the really important basic blocks would be selected for the L0-cache.selected for the L0-cache.

The L0-cache is accessed only if a ‘high confidence’ The L0-cache is accessed only if a ‘high confidence’ branch is predicted correctly. The I-cache is accessed in branch is predicted correctly. The I-cache is accessed in any other case.any other case.

This method selects some of the most frequently This method selects some of the most frequently executed basic blocks, yet it misses some others. executed basic blocks, yet it misses some others.

Page 13: Dynamic cache management technique

Dynamic Distance Estimation MethodDynamic Distance Estimation Method

All n branches after a mispredicted branch are tagged as All n branches after a mispredicted branch are tagged as ‘low confidence’ otherwise as ‘high confidence’.‘low confidence’ otherwise as ‘high confidence’.

The basic blocks after a ‘low confidence’ branch are The basic blocks after a ‘low confidence’ branch are fetched from the L0-cache.fetched from the L0-cache.

The net effect is that a branch misprediction causes a The net effect is that a branch misprediction causes a series of fetches from the I-cache.series of fetches from the I-cache.

A counter is used to measure the distance of a branch A counter is used to measure the distance of a branch from the previous mispredicted branch. from the previous mispredicted branch.

Page 14: Dynamic cache management technique

Thank youThank you

Any Query ??Any Query ??