Cache: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 2: Line 2:
=Overview=
=Overview=
A cache is a small fast memory. As long as elements fit in the cache, the access is fast, but when the cache reaches its capacity, decisions should be taken as to what element or elements should be evicted to make more room. The [[The_Optimal_Caching_Problem#Overview|optimal caching greedy algorithm]] is an example of how this problem can be solved.
A cache is a small fast memory. As long as elements fit in the cache, the access is fast, but when the cache reaches its capacity, decisions should be taken as to what element or elements should be evicted to make more room. The [[The_Optimal_Caching_Problem#Overview|optimal caching greedy algorithm]] is an example of how this problem can be solved.
=The Problem=
The problem consists in processing a sequence of "page requests". As long as there is sufficient space left in cache, the pages are brought from big slow memory into the fast memory. When the cache fills up, a new request for a page that does not exist in cache triggers a "fault" (or a cache miss) and an existing page must be evicted. The question is what page should be evicted from the cache to minimize the number of fault on the long term.

Revision as of 02:09, 20 October 2021

Internal

Overview

A cache is a small fast memory. As long as elements fit in the cache, the access is fast, but when the cache reaches its capacity, decisions should be taken as to what element or elements should be evicted to make more room. The optimal caching greedy algorithm is an example of how this problem can be solved.