SlideShare una empresa de Scribd logo
1 de 19
Page 1
Dive Into
Cache
by 레쓰비
Page 2
Direct Mapping
31 Tag 15 14 Index 6 5 Offset 0
Page 3
Fully Associative
31 Tag
6
5 Offset 0
Page 4
N-Way Set Associative
31 Tag 12 11 Set 6 5 Offset 0
Page 5
Mapping method Summary
종류 장점 단점
Direct Mapping
구조가 간단 (Cheap) 해당 Index 에 하나의
주소만 넣을 수 있기에 ,
Cache 공간을 효율적으
로 사용하지 못한다 .
Fully Associative
Cache 의 남는 공간 어
디에든 주소를 넣을 수
있어서 Cache 공간을 효
율적으로 사용한다
구조가 복잡하고
(Expensive) 해당 주소
가 Cache 에 있는지 검
사할 때마다 모든 Slot
을 검사해야 한다 .
N-Way Associative
Direct Mapping 과
Fully Associative 의
타협점으로 , Fully
Associative 보다
덜 복잡하고 (less
expensive)
Direct Mapping 보다
공간을 보다 효율적으로
사용한다
Direct Mapping 처럼
Index 를 통해서 한번에
접근할 수 있지만 여전히
N 번의 비교가 필요하
며 , 여전히 공간을 완전
히 효율적으로 사용하지
는 못한다 .
Page 6
Direct Mapping
Page 7
Page 8
Page 9
Page 10
Page 11
4-Way Associative
Page 12
4-Way Associative
Page 13
4-Way Associative
Page 14
4-Way Associative
Page 15
4-Way Associative
Page 16
Write-Through & No-Write-Allocate
Read:
1.Cache 내 해당 Memory 존재여부 검
사
2. 있을 때는 Cache 값을 사용
3. 없을 때는 Memory 에서 읽어서 할
당
Write:
1.Cache 내 해당 Memory 존재여부
검사
2. 있을 때는 Cache 와 Memory 동시
기록
3. 없을 때는 Memory 에만 기록
[No-Write-Allocate 방식 ]
Page 17
Write-Back & Write-Allocate
Read:
1.Cache 내 해당 Memory 존재여부 검
사
2. 있을 때는 Cache 값을 사용
3. 없을때는 사용할 Cache 블럭 할당
4. 할당된 블록이 Dirty-Flag-Setted
라면 해당블럭 Memory 에 쓰기 수행
5. 방금 쓰기를 수행한 Memory 를 다
시
Cache 에 적재
[Write-Allocate 방식 ]
6. 해당 Cache 블록의 Dirty-Flag 를
해제
Write:
1.Cache 내 해당 Memory 존재여부
검사
2. 있을 때는 Cache 에만 기록하고
Dirty-Flag 를 할당
3. 없을때는 사용할 Cache 블럭 할당
4. 할당된 블록이 Dirty-Flag-Setted
라면 해당블럭 Memory 에 쓰기 수행
5. 방금 쓰기를 수행한 Memory 를 다
시
Cache 에 적재
[Write-Allocate 방식 ]
Page 18
Write on Cache :
Write-Through : 바로 Memory 에 접근하여 쓰기를 수행
-> 매번 Stall 을 유발
Write-Back : Cache 에만 쓰기를 하며 해당 Cache Slot 에는 Dirty-Bit 를 Set
한다 .
-> 실제로 Memory 에 쓰기를 수행할 때만 Stall 이 발생
실제로 Memory 에 변경 사항이 적용되는 경우는 다음과 같다 .
1) Dirty-Bit 가 Set 된 Cache 를 읽으려 시도한 경우 ,
2) Dirty-Bit 가 Set 된 Cache 를 대상으로 쓰기를 시도한 경우 ,
Write-Allocate : 만약 어떤 Memory 에 대해 쓰기를 수행하려 할때
해당 Memory 가 Cache 에 없는 경우 Memory 에 쓰기를 완료한 후 ,
이를 다시 읽어들여 Cache 에 할당해 준다 . [Write-Back 과 함께 사용 ]
No-Write-Allocate : Memory 에 대한 쓰기가 완료된 후
해당 내용을 Cache 로 다시 가져오지 않는다 . [Write-Through 와 함께 사
용 ]
Page 19
Thank You

Más contenido relacionado

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Cache, Set Associative, Write-Through, Write-Back

  • 2. Page 2 Direct Mapping 31 Tag 15 14 Index 6 5 Offset 0
  • 3. Page 3 Fully Associative 31 Tag 6 5 Offset 0
  • 4. Page 4 N-Way Set Associative 31 Tag 12 11 Set 6 5 Offset 0
  • 5. Page 5 Mapping method Summary 종류 장점 단점 Direct Mapping 구조가 간단 (Cheap) 해당 Index 에 하나의 주소만 넣을 수 있기에 , Cache 공간을 효율적으 로 사용하지 못한다 . Fully Associative Cache 의 남는 공간 어 디에든 주소를 넣을 수 있어서 Cache 공간을 효 율적으로 사용한다 구조가 복잡하고 (Expensive) 해당 주소 가 Cache 에 있는지 검 사할 때마다 모든 Slot 을 검사해야 한다 . N-Way Associative Direct Mapping 과 Fully Associative 의 타협점으로 , Fully Associative 보다 덜 복잡하고 (less expensive) Direct Mapping 보다 공간을 보다 효율적으로 사용한다 Direct Mapping 처럼 Index 를 통해서 한번에 접근할 수 있지만 여전히 N 번의 비교가 필요하 며 , 여전히 공간을 완전 히 효율적으로 사용하지 는 못한다 .
  • 16. Page 16 Write-Through & No-Write-Allocate Read: 1.Cache 내 해당 Memory 존재여부 검 사 2. 있을 때는 Cache 값을 사용 3. 없을 때는 Memory 에서 읽어서 할 당 Write: 1.Cache 내 해당 Memory 존재여부 검사 2. 있을 때는 Cache 와 Memory 동시 기록 3. 없을 때는 Memory 에만 기록 [No-Write-Allocate 방식 ]
  • 17. Page 17 Write-Back & Write-Allocate Read: 1.Cache 내 해당 Memory 존재여부 검 사 2. 있을 때는 Cache 값을 사용 3. 없을때는 사용할 Cache 블럭 할당 4. 할당된 블록이 Dirty-Flag-Setted 라면 해당블럭 Memory 에 쓰기 수행 5. 방금 쓰기를 수행한 Memory 를 다 시 Cache 에 적재 [Write-Allocate 방식 ] 6. 해당 Cache 블록의 Dirty-Flag 를 해제 Write: 1.Cache 내 해당 Memory 존재여부 검사 2. 있을 때는 Cache 에만 기록하고 Dirty-Flag 를 할당 3. 없을때는 사용할 Cache 블럭 할당 4. 할당된 블록이 Dirty-Flag-Setted 라면 해당블럭 Memory 에 쓰기 수행 5. 방금 쓰기를 수행한 Memory 를 다 시 Cache 에 적재 [Write-Allocate 방식 ]
  • 18. Page 18 Write on Cache : Write-Through : 바로 Memory 에 접근하여 쓰기를 수행 -> 매번 Stall 을 유발 Write-Back : Cache 에만 쓰기를 하며 해당 Cache Slot 에는 Dirty-Bit 를 Set 한다 . -> 실제로 Memory 에 쓰기를 수행할 때만 Stall 이 발생 실제로 Memory 에 변경 사항이 적용되는 경우는 다음과 같다 . 1) Dirty-Bit 가 Set 된 Cache 를 읽으려 시도한 경우 , 2) Dirty-Bit 가 Set 된 Cache 를 대상으로 쓰기를 시도한 경우 , Write-Allocate : 만약 어떤 Memory 에 대해 쓰기를 수행하려 할때 해당 Memory 가 Cache 에 없는 경우 Memory 에 쓰기를 완료한 후 , 이를 다시 읽어들여 Cache 에 할당해 준다 . [Write-Back 과 함께 사용 ] No-Write-Allocate : Memory 에 대한 쓰기가 완료된 후 해당 내용을 Cache 로 다시 가져오지 않는다 . [Write-Through 와 함께 사 용 ]

Notas del editor

  1. 0. 소개 1. 캐쉬와 메모리간의 매핑 방법 설명 1. Direct Mapping 방법 2. n-Way mapping 방법 3. Write-through, Write-back, Write-allocate, No-write-allocate 용어 설명 4. Write-through, No-write-allocate 방식 캐쉬의 읽고 쓰기(순서도) 5. Write-back, Write-allocate 방식 캐쉬의 읽고 쓰기(순서도) 0. 소개 1. Cache 의 정의 2. 인텔씨퓨 다이 사진 3. CPUID 사진 4. 캐시 메모리 벤치마크 사진 5. 씨퓨가 메모리를 읽을때 순서도(단순화한) 6. 캐시상에 메모리가 매핑되는 방법돠 TAG 등의 언급(그림) 7. Direct Mapping 방법 (1:1) [그림] 8. n-Way Mapping (Set-Asocciative) [그림] 9. 쓰기를 일어날때 캐쉬를 활용하는 법 [Write-through, Write-back, Write-allocate, No-write-allocate 설명] 10. Write-Through [순서도] 11. Write-Back [순서도] 12. 멀티코어를 위한 MESSI 알고리즘 13. 레퍼런스 안녕하세요,, 이번에 요약발표를 맡게된 레쓰비의 이동호 입니다. 전체적인 요약은 다른 조에서 잘 요약해 주실 거라고 생각되어, 저희조는 교수님이 강의하신 캐쉬의 동작에 대한 내용을 주된 주제로 삼아 발표를 하기로 했습니다.
  2. 0. 소개 1. 캐쉬와 메모리간의 매핑 방법 설명 1. Direct Mapping 방법 2. n-Way mapping 방법 3. Write-through, Write-back, Write-allocate, No-write-allocate 용어 설명 4. Write-through, No-write-allocate 방식 캐쉬의 읽고 쓰기(순서도) 5. Write-back, Write-allocate 방식 캐쉬의 읽고 쓰기(순서도) 0. 소개 1. Cache 의 정의 2. 인텔씨퓨 다이 사진 3. CPUID 사진 4. 캐시 메모리 벤치마크 사진 5. 씨퓨가 메모리를 읽을때 순서도(단순화한) 6. 캐시상에 메모리가 매핑되는 방법돠 TAG 등의 언급(그림) 7. Direct Mapping 방법 (1:1) [그림] 8. n-Way Mapping (Set-Asocciative) [그림] 9. 쓰기를 일어날때 캐쉬를 활용하는 법 [Write-through, Write-back, Write-allocate, No-write-allocate 설명] 10. Write-Through [순서도] 11. Write-Back [순서도] 12. 멀티코어를 위한 MESSI 알고리즘 13. 레퍼런스 안녕하세요,, 이번에 요약발표를 맡게된 레쓰비의 이동호 입니다. 전체적인 요약은 다른 조에서 잘 요약해 주실 거라고 생각되어, 저희조는 교수님이 강의하신 캐쉬의 동작에 대한 내용을 주된 주제로 삼아 발표를 하기로 했습니다.