LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-21-2011, 05:37 AM   #1
prabagaranvt
LQ Newbie
 
Registered: Mar 2011
Posts: 23

Rep: Reputation: 0
MMU Page Translation


Where are the MMU Page Translation Tables stored?
either in Main Memory(RAM) or part of the MMU Hardware?
 
Old 06-22-2011, 07:29 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Q: Is this a test question/homework assignment ?

Q: What do you think the MMU would do with them if it could somehow "store them in hardware"?

Look here for more details:

http://tldp.org/LDP/tlk/mm/memory.html

http://en.wikipedia.org/wiki/Memory_management_unit
 
Old 06-23-2011, 12:15 AM   #3
prabagaranvt
LQ Newbie
 
Registered: Mar 2011
Posts: 23

Original Poster
Rep: Reputation: 0
This is not a test qn/assignment. I wanted to know the internals of memory management.

For each Translation , CPU needs to lookup the translation table in memory which is a slow device compared to CPU.
So , if it could be stored in hardware then the translation will be speeded up.

Correct me if i am wrong.
 
Old 06-23-2011, 10:02 AM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
OK, fair enough

Quote:
http://en.wikipedia.org/wiki/Memory_management_unit

The MMU normally translates virtual page numbers to physical page numbers via an associative cache called a Translation Lookaside Buffer (TLB). When the TLB lacks a translation, a slower mechanism involving hardware-specific data structures or software assistance is used. The data found in such data structures are typically called page table entries (PTEs), and the data structure itself is typically called a page table.
More details can also be found here:
http://www.kernel.org/doc/gorman/htm...rstand006.html

So yes, everything the kernel does ultimately uses memory. The page tables themselves are created and maintained in kernel memory.

And yes, the kernel is optimized to make use of hardware resources (such as the TLB) to as great an extent as possible.
 
1 members found this post helpful.
Old 01-14-2013, 10:28 AM   #5
abdo_elrahman
LQ Newbie
 
Registered: Mar 2007
Location: Hong Kong
Distribution: Fedora , RHEL , Ubunto , Centoos,
Posts: 13

Rep: Reputation: 0
I know this would look a bit old post, But I do really have a related question here:
Is there anyway in Linux or any other similar OSes to control the TLB or play around with it, I really want to although I do know this is something nowadays totally is done by the MMU unit which is a hardware setting, but we have a new comers of multi/many core OSes and I have no idea how they handle that in the future, so you guys have any idea how to play with the TLBs in linux ?
 
Old 01-15-2013, 03:42 AM   #6
mina86
Member
 
Registered: Aug 2008
Distribution: Slackware
Posts: 354

Rep: Reputation: 148Reputation: 148
Interaction with TLB is handled by the kernel and it's limited to flushing invalid TLB entries, which may be necessary when some mapping is changed or context switch happens. Flushing is of course not a desired operation as the mapping has to be re-read from memory which slows things down. There's not much else one can do with TLB as it operates mostly by itself.
 
Old 01-16-2013, 02:48 PM   #7
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,263

Rep: Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085
Everything that is "low-level guts related to" memory management will always be found in the /arch/whatever directory, since such things are by-definition "architecture specific." Things like, "what the actual bits mean, how the data-structures are to be arranged for this-or-that CPU, how the control-registers have to be stuffed," and so on, will be found (only...) here. Everything above this will be more-or-less an abstraction.

Last edited by sundialsvcs; 01-16-2013 at 02:50 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fast Data Access mmu when flashing prom bclear4 Solaris / OpenSolaris 11 10-23-2012 05:01 AM
MAN page on Mount (8): translation for explanation of "current process" GrubbySeismic Linux - Newbie 2 02-04-2010 10:15 PM
access paging table memory using another page table via MMU? valpa Linux - Kernel 8 08-26-2008 03:26 PM
web page translation rblampain General 4 10-02-2005 11:40 PM
what is MMU blackzone Linux - Hardware 1 09-15-2004 04:46 AM


All times are GMT -5. The time now is 04:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration