Skip to content

ameni-selmi/pagination-algorithm

Repository files navigation

The problem with Paging

Paging causes the internal fragmentation which occurs because not every memory region is an exact multiple of the page size. Imagine a program of size 101, it would still need three pages of size 50, so it would occupy 49 bytes more than needed. There are 3 algorithms of paging

First In First Out (FIFO)

This is the simplest page replacement algorithm. In this algorithm, the operating system keeps track of all pages in the memory in a queue, the oldest page is in the front of the queue. When a page needs to be replaced, the page in the front of the queue is selected for removal.

Least Recently Used (LRU) :

In this algorithm, the pages which will be replaced are those which are the least recently used.

Optimal Page replacement :

In this algorithm, the pages which will be replaced are those which will not be used for the longest duration of time in the future.

Index page

index

Algorithms of paging

pafing algorithm1 pafing algorithm2

About

A website containing the paging algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published