> Cache Memories
Cache memories are small, fast SRAM-based memories managed automatically in hardware
이번 강의에서 cache는 CPU와 Main memory 사이의 data access time 차이를 줄여주는 역할을 하는 메모리로 제한
> Cache Memory 구조
Cache size: C = B * E * S data bytes
> Addressing Cache; 캐시를 찾는 방법
# m bits는 2^m가지의 address를 표현가능하다.
> Direct-Mapped Cache; 1 line per set
# set selection; set index를 사용해서 set에 접근
# line matching; tag가 서로 match되는 지 확인
# word selection; word 선택해서 추출
페이지1
> Set Associative Caches; more than 1 line per set
# set selection; set index를 사용해서 set에 접근
# line matching; tag가 서로 match되는 지 확인
# word selection; word 선택해서 추출
# 2-Way Set Associatice Cache Simulation
cache의 개수는 같지만, hit이 되는 횟수가 direct mapped보다 증가한다.
페이지2
> Write하는 방법
# What to do on a write-hit? (언제 메모리를 업데이트 하는가?)
- Write-through; 메모리에 바로 업데이트
- Write-back; 캐시의 값이 다른 값으로 교체될 때 업데이트 (메모리와의 일치 여부 표현하기 위해 dirty bit이 필요)
# What to do on a write-miss? (데이터가 캐시에 없는 경우에 어떻게 처리할 것인가?)
- Write-allocate; 캐시의 line을 업데이트
- No-Write-allocate; 캐시를 load하지 않고, 메모리에 직접 write
# Write-through & No-Write-allocate / Write-back & Write-allocate
페이지3
'소프트웨어 전공 > 시스템 프로그램' 카테고리의 다른 글
[System Program] [7] [Virtual Memory] (0) | 2021.05.31 |
---|---|
[System Program] [9] Concurrent Programming (0) | 2021.05.31 |
[System Program] [5] Exceptions and Processes (0) | 2021.05.30 |
[System Program] [3] Memory Hierarchy (0) | 2021.05.29 |
[System Program] [1] Data Presentation (0) | 2021.05.25 |