Cache and Replacement Algorithm

A cache is secure storage, where we store frequently used data/pages in a system. It gives us valuable advantages with respect to performance. Whenever we look at something in a system, it stores a duplicate copy of data into the cache and next time onward it will serve from the cache only until data is modified. It improves our performance in terms of recently used data from the cache instead of the main memory.

There are two main terminologies used:-

  • Cache hit:- If data found in a cache.
  • Cache miss:- If data is not found in a cache.
Cache has some limitations with respect to size. Whenever it is full, the respective algorithm will discard the item to make space for new data.

Cache Replacement algorithms/policies are optimizing instructions to make a cache work with low latency and high throughput.

We will discuss some of the cache replacement algorithms on the coming blog with their implementation.

Comments

Popular posts from this blog

Recursion

Stack

Data Structure & Algorithm