Cache Clean, Flush

I. Cache와 Main Memory 일관성 유지 기법, Cache Clean, Flush

가. Cache Clean, Flush 개념

Cache CleanCache line의 data를 Memory에 update 하는 data 일관성 기법
Cache FlushCache line의 data를 0으로 변경하여 초기화하는 Cache line 초기화 기법

– Cache write through 방식 사용 시 필요치 않으나, write back 방식 사용 시 Clean, Flush 필요

나. Cache의 D-bit와 V-bit의 개념

D(Dirty) bit0: Cache line과 Memory의 내용이 일치
1: Data 변경으로 인한 Cache-Memory 불일치
V(Valid) bit0: Data가 Memory에서 Cache로 Load 되지 않았음
1: Data가 Memory에서 Cache로 Load 됨

– Cache Clean 시 D-bit → 0, Cache Flush 시 V-bit → 0

 

II. Cache Clean, Flush 기법 설명

가. Cache Clean

개념도설명
– cache line의 data를 memory에 update
– cache line 내용은 그대로 존재

나. Cache Flush

개념도설명

– cache line의 data를 0으로 변경
– cache line 내용 버림(V-bit→0)

– Cache Clean, Flush 용어는 여러 아키텍처에서 혼용되어 사용되므로 사용 시 주의 필요

 

III. Cache Clean 및 Flush의 활용

Cache Clean– DMA 등과 같은 I/O 사용 시 메모리 현행화
Cache Flush– Cache에서만 사용되는 일회성 Data

 

One Comment

콘텐츠 사용 시 출처 표기 부탁 드리고, 궁금한 점이나 의견은 댓글 남겨주세요^^