YTread Logo
YTread Logo

Paging in Operating Systems with Example & Working - Memory Management

Jun 02, 2021
pages that the

memory

management

unit took the page number and got the frame number, and what exactly? What happened is that by using this page table we got where exactly the page is i.e. page number 5 is in main

memory

which is at location F 21, okay next part of this address is this D value, so what is this D value? So this D value is page offset which is combined with the base address to define the physical memory address that is sent to the memory unit now we know that this process X is divided into five pages p1 p2 p3 p4 and p5 now each process p1 will also have multiple instructions read since it is 2 KB meaning it will not be a single line, so p1 would have one, two, three, four, five, six, seven lines located in different memory locations , so they could be contiguous in nature, so let's say this. is at 1 2 3 4 5 and so on, so this page offset is basically the address inside the page where exactly the statement is, so this P will give you which page in our case is p5 and this D will give you what line inside the page is supposed to be executed, let's say this D value is 3, so you want this statement to be executed inside this process p5, so this is what this offset is and this offset will be the same here and here. because essentially what we're doing is looking at where exactly p5 is in main memory, but the offset will be the same, so this offset is replaced here, let's say it's 3 and this solves the entire memory

management

unit. the physical address then the CPU gets the physical address and goes to p5 which is page number 5 for process a particular process to convert the logical address to the physical address and essentially what we did is we just looked at where exactly the page is in main memory.
paging in operating systems with example working   memory management
Ok, the CPU initially made the node because it had the logical address it had the page it wanted to execute, so the memory management unit took the page from that process and got the address in physical memory which is in the frame. 21, so this is frame 21 where P Phi is, this is how the address was resolved and then the CPU executed that page for that process, so I hope you have a very good idea of ​​how this whole

paging

works. You can read through the theory of page number, page offset, frame number, frame offset, essentially it is the same and this point is very important, each process has its own page table and this page table, for so this is the page here and this page table is stored in the main file. memory which is the physical memory ok, somewhere in the main memory, finally we have stored the page table.
paging in operating systems with example working   memory management

More Interesting Facts About,

paging in operating systems with example working memory management...

I just wanted to quickly tell you about page fault and we will see in detail what a page fault is and how to handle page fault. See that in more videos, but let's say we wanted to see P four in main memory, okay, first let me clear all this, so let's say instead of P five we wanted P four, that is, CP, I wanted to run page four . of process I envy you or I bet it will actually mean that this P four is not in physical memory, which is RAM, it is not in RAM, which essentially means that P four is somewhere in virtual memory, so you can see that P four is here in the secondary storage.
paging in operating systems with example working   memory management
This is what is known as Page Fault and Page Fault essentially occur when the page for a particular process is not in physical memory and must be brought to physical memory somewhere, so this is a bit of the basics of page fault and we will see it in detail how page faults and page fault handling can be implemented in more videos and we will also see how

paging

is non-contiguous in the video because when the fault is explained of page is when the non-contiguous situation will also be very clear so For this video guys I hope you have understood the concept of pagination, why we need pagination and what pagination helps us achieve and also the whole

working

of what It happens behind the scenes and how the memory management unit uses the page table to get the physical address of the logic. direction so thanks for watching guys if you like this video please like it let me know in the comments that you like this video share it with your friends and if you haven't subscribed yet make sure to subscribe to this channel to You receive a notification every time I upload a new video.
paging in operating systems with example working   memory management
Thanks for watching guys. I'll see you in the next video. Peace.

If you have any copyright issue, please Contact