Friday, January 12, 2018

Kernel memo: Regular Paging

Paging is conversion of liner address into the physical address.
Linear address is composed of Directory, Table, and Offset.
cr3 (in Physical Address Extension we use cr4) is the control register to store the physical address converted to linear address.
 

 





 

The conversion process is described as:

Let L be the Linear address. L(d,t,o) as the portions of it.

L = Ld + Lt + Lo = L(d,t,o)

We name translation tables as f, such that

fd ... page directory 
ft ... page table
fo ... page frame

Then

P = cr3 + fd(Ld) + ft(Lt) + fo(Lo) = cr3 + f(d,t,o)(L(d,t,o))

on which P stands for physical address corresponding to the L.

Such two-level paging is used in order to save the amount of RAM used in each Page Table.
Also, if we need more memories, the three or four level paging is used in which case we use additionally Paging Global Directory, Paging Upper Directory, Paging Middle Directory etc...

No comments:

Post a Comment