1
votes

I am confused about paging, i am writing what i understand about paging , please correct me,where i am wrong.

First of all our Total Physical memory[RAM] in the system is divided in to pageframe of 4kb.
Second the user process generate virtual address, and virtualpages[4kb] contain these virtual address.
Now there is a pagetable which is used to store Page Table entry[PTE is nothing but the information about page]

Now when a process run these virtual addresses are mapped to physical pages in RAM by MMU.

My question is as each process get its own pagetable , so when a process run this pagetable should be brought in RAM or not.

1

1 Answers

2
votes

Assume you have 4gb of ram and a 4gb page/swap file. You have a total of 8gb memory. The OS when assigning memory to processes will use virtual addresses to address the entire 8gb memory. These virtual addresses are recorded in the page table against their corresponding physical addresses.

My question is as each process get its own pagetable , so when a process run this pagetable should be brought in RAM or not.

A process does not get a pagetable, it gets an address space (virtual addresses). This allows the OS to do some optimizations, like defragmentation, without interfering with the address space initially issued to the process.