Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Page Table in Linux Virtual Memory Management

Status
Not open for further replies.

VuTang

Newbie level 5
Joined
Oct 3, 2015
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
69
Hi guys,

I have read about how Linux kernel manages memory itself and figure out that it uses Virtual Address. To transform from Virtual Address to Physical Address it uses PAGE TABLE. But, where is PAGE TABLE stored?

I have already found some articles in Internet taking about this problem but have not had any answers make me feel satisfied yet. Please help.

Thank you.
VuTang
 

The Page Table resides in the main memory. We would have a page table per process somewhere in the memory. The physical base address of a particular page table is maintained by the kernel as part of its house keeping information - this is the access point to the page table.

Hope that helps..
 

So on x86 there is a register called page directory base register (PDBR), which holds the physical address of a page which is located in RAM.
The MMU uses this address to start the translation, which is done in multiple steps. How this is done is easily findable on the interwebs.
The wikipedia article on page adress extension has a few nice pictures that summarize the translation. https://en.wikipedia.org/wiki/Physical_Address_Extension#Page_table_structures

Once the translation has been done successfully (i.e. no page fault) it is normally stored in a cache called translation lookaside buffer (TLB), which can be seen as part of the MMU.
This provides a shortcut to the expensive lookup and in that case no memory access is made.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top