This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.
In this article we will learn about the concept of paging in operating system.
Paging
- Suppose we have a process
P1
, which is divided into pages. - We have a problem while executing
P1
. CPU will call forP1
but the CPU doesn’t know that paging is done in main memory. So to remove this problem we use the concept of mapping. - Mapping is done with the help of MMU (memory management unit), MMU does it by using page table, and page table contains the frame number where the process (page) is situated/ present.
- Every process has its own page table. The entries in page table are equal to number of pages a particular process has.
- When CPU make a call to access byte number
3
then first we will check that in which page that byte is present and then we will check that in which frame that page is present. - For example if CPU wants to access byte
3
then as we can see that byte3
is present in page number1
and page number1
is placed in frame number4
, hence CPU now know that it can get byte3
from frame number4
of main memory (RAM). - CPU always works on logical address. Logical address consists of two things page number and page offset.
So this was a brief explanation of paging in operating system. Hope you liked it and learned something new from it.
If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me.
📱 Contact Me
Twitter, LinkedIn, Telegram, Instagram,