Question

I was learning OS concepts and I have some doubts about combinations of concepts, especially on paging.

These are my beliefs now.So please correct me if I'm wrong.

  • I think not merely user area, also system area is also paged, as I see no other way to deal with GBs of OS
  • PCB(Process Control Block) contains Page Table along with other info, and PCB is in system space.

My doubts are:

  • whether the pages of all the inner level page tables (eg: secondary P.T., tertiary P.T. in ,say, 3 level paging) are also loaded into their corresponding PCB ?
  • If PCB, which contains the primary page table is also paged, then where will be that pre-primary page table stored ? does it contain pages of other system files in system area too?
Was it helpful?

Solution

Firstly , I assume that by system area you mean kernel space.Yes the kernel space is also mapped,
along with the user space.Generally it is done in following ways:

  • Identity Mapping-i.e the virtual address and the physical address are same .Generally upto 4MB
  • After Indentity Mapping the kernel is mapped to some other virtual address like 3GB-Linux,windows use this method.

Secondly,PCB does not contain page table but contains the physical address of the page directory.
This physical address is stored in the cr3 register.The processor calculates the addresses of the page table and pages using this address as the base address.Each process has its own page directory,thus while task switching the cr3 register is updated to contain the physical address of the page directory of the next process in the list.Thus the inner pages are not loaded in the PCB.

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