Question

In modern OS every process has it own address space. Does it mean that every process has it own virtual pages table. Or the virtual pages table is common for all the processes in OS? If it is common for every process, how the local process address space's address transfroms in virtual address? Who is responsible for it?

Was it helpful?

Solution

Page tables are per-process based. When process switching happens respective page tables are swapped out, and new process page table is applied by changing control register cr3 on x86 architecture.

Ideally paging unit is divided into 3 fields: Page's Directory, Table & Offset. Translation of virtual address is accomplished by two translation tables, Page Directory followed by Page Table. Each active process has a Page directory assigned to it. This field within Virtual address determines the entry in the Page Directory that points to the proper Page Table. The address table filed determines the entry in the Page Table that contains the physical address of the page frame containing the page followed by offset field determines the relative position within the page frame.

Check Page Table & MMU for more details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top