The above diagram is representing one of the concepts of the Operating System that is “Paging”. Paging is a memory management process which manages memory in the Operating System. An operating System has the ability to handle and address more memory more than the amount which is physically installed on the system. It can extend the memory virtually and due to this, this extra memory is called virtual or logical memory. The main function of the paging process is to implement this virtual memory.
In Operating System, each process has its own process space and in the following diagram, paging is dividing these process address spaces into multiple pages. Each page is a kind of blocks of similar size. The size of the page is defined by the power of 2 which contains data of size between 512 bytes and 8192 bytes. The size of each process is calculated in the number of pages. In this diagram, a process [P] is divided into N number of pages and each page contains 100 bytes. In simple words, the first 100 bytes are allocated in the first page, second 100 bytes in the second page, and so on.
Main memory is also partitioned into a number of frames and each frame has fixed size of physical memory. In the diagram, the main memory is also divided into N frames [F0, F1, F2…FN]. The paging process stores each page of the process in one of the frames of the memory. These pages are stored at different locations of the main memory. For example, in the diagram, Page 4 of process P is allocated in frame 0, Page 7 of process P is allocated in frame 5, and so on.
Whenever memory is required, pages of the process are brought into the frames of the memory otherwise they remain in secondary memory.