Reputation: 143
I was going through the paging mechanism , this question confusing me , the question is PAGE TABLE contains page entries. Process is divided into pages. Suppose 1 process contains 8 pages and total 10 process are there in RAM. so page table would contain total 8 page table entries of a single process or 10*8 page entries of all the processes ?
Please explain me this , this question haven't seen clearly mention in any text book.
Thanks in advance.
Upvotes: 1
Views: 1730
Reputation: 136
Each process has its own page tables. Since each process has the same address space, it is not feasible to map one virtual address to different physical addresses. In x86 architecture, the page directory base register (cr3) is set during each context switch, so that the processor can translate the virtual address of the current running process to physical address.
Upvotes: 3
Reputation: 403
Actually, I have not completely understood your question completely. In General case, there is no fix rule that process will be divided into 8 pages or so. But, the process is divided into pages in terms of bytes. The size of page can be 4 KB or 4 MB( In some cases, need to set a bit in page table to enable 4 MB page size ). Then after dividing into pages there is another concept Single-level paging or Multi-level paging.
In a case of single level paging the page table will consists of same number of page-table entries as the number of pages can be allocated in virtual memory.
and in Multi-level paging a page table is further divided into multiple page-tables on the basis of size of bytes each-page table can be allocated with.
For, further reading on paging you can refer this link
Upvotes: 0