SD Mastery
.
course
prep
arena
ask
shorts
stories
you
?
Search lessons, topics…
⌘K
?
L1
· Intern
0 / 100 xp → junior
~
course
prep
arena
ask
shorts
stories
you
Loading page…
~/himanshu
tty1
~/himanshu
$
cd ~/next-page
[ok]
resolve route
[
..
]
stream page
← all concepts
Page cache
.
also: buffer cache · OS page cache
The kernel's RAM cache of file pages: reads that hit it take microseconds instead of a trip to disk.
the two-minute refresher
read() is served from RAM on a hit (about 1 µs) and from disk on a miss (about 10 ms on an HDD).
Writes are write-back by default: they land in the cache and are flushed later, so a crash can lose them.
fsync() forces the flush; databases call it to make commits durable.
Databases that run their own cache use O_DIRECT to avoid caching the same data twice.
Where the course teaches it
W00 · Part 5
Operating System Concepts for System Design
learn it →
Related concepts
Write-ahead log
Notebook
Ask