Week 11: Cache lookup, Replacement policies

Week 11: Cache lookup, Replacement policies

Method Description
Fully associative
Direct associative
Set associative

 

Page Coloring

Page_Coloring_Ja

 

 

Cache replacement policy

Policy Description
MIN 이상적인 알고리즘. '미래'의 memory access를 참고하여 cache eviction을 함
LRU Least Recently Used
LFU Least Frequently Used

 

Belady’s Anomaly: Cache size가 커졌는데 cache hit ratio는 줄어듦.

Belady's Anomaly

Belady’s Anomaly

 

Models for Application File I/O

•Explicit read/write system calls
–Data copied to user process using system call
–Application operates on data
–Data copied back to kernel using system call
•Memory-mapped files
–Open file as a memory segment
–Program uses load/store instructions on segment memory, implicitly operating on the file
–Page fault if portion of file is not yet in memory
–Kernel brings missing blocks into memory, restarts process

 

Advantages to Memory-mapped Files

•Programming simplicity, esp for large file
–Operate directly on file, instead of copy in/copy out
•Zero-copy I/O
–Data brought from disk directly into page frame
•Pipelining
–Process can start working before all the pages are populated
•Interprocess communication
–Shared memory segment vs. temporary file

 

Demand Paging

Leave a Reply