Information Technology Reference
In-Depth Information
Chapter 9
Caching and Virtual
Memory
Cash is king { Per Gyllenhammar
Caching is central to many aspects of computer systems: not just memory,
but also file systems, naming, networking, servers, etc.
Can cache data, or the results of computation. Some questions:
When is caching useful? (e.g., if cost of regenerating the data is more than
the cost of storing it until it is next reused)
How do we know if cache is valid?
How do we choose what to keep in the cache?
In this chapter, we're going to focus on caching disk contents, but the un-
derlying principles apply elsewhere.
Programmer can manage the transfer to/from disk explicitly, but may find
it easier not to have to do so. E.g., memory mapped les are widely used { data
in the file is accessed as if the file is stored in memory, but the actual file is on
disk. Virtual memory is another example.
9.1
Cache concept: when it works and when it
doesn't
when caching works: working set model
when caching doesn't work (as well as you might like): Zipf { sequential
access to large data
321
Search WWH ::




Custom Search