jzarnett / ece459

ECE 459: Programming for Performance
448 stars 138 forks source link

Lecture 3: cache line != page #2

Closed jtotto closed 7 years ago

jtotto commented 7 years ago

"As discussed, the CPU generates a memory address for a read or write operation. The address will be mapped to a page. Ideally, the page is found in the cache, because that would be faster. If the requested page is, in fact, in the cache, we call that a cache hit. If the page is not found in the cache, it is considered a cache miss. In case of a miss, we must load the page from memory, a comparatively slow operation. A page miss is also called a page fault."

Pages of virtual memory are 'cached' in page frames of physical main memory at page granularity, but that's done in software. The contents of physical main memory are in turn cached at line granularity by the L1/L2/... caches in hardware. I don't think that that's clear from this explanation, and calling a hardware cache miss a page fault is confusing.

jzarnett commented 7 years ago

This is a good point; I'll make a note of this and change it...

jzarnett commented 7 years ago

Commit added to address this.