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
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.
In this algorithm, the pages which will be replaced are those which are the least recently used.
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.