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.