page tables

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
crg

page tables

Post by crg »

Anybody know how does the paging mechanism works in Linux, or in Windows?
When the task is switched does the kernel loads whole the page table of an actual executing task into the processor ?
Chris Giese

RE:page tables

Post by Chris Giese »

>On 2002-01-15 16:11:42, crg wrote:
>Anybody know how does the paging mechanism works
>in Linux, or in Windows?

This information isn't complete, but...
http://www.execpc.com/~geezer/osd/mem/index.htm#paging2

>When the task is switched does the kernel loads
>whole the page table of an actual executing task
>into the processor ?

Only the CR3 register (PDBR) changes when
you switch tasks. This register points to the page
directory (top-level page table). Page directory
entries (PDEs) point to the (bottom-level) page
tables, and the page table entries (PTEs) point
to the actual pages.

There is a special cache in the CPU called the TLB
which stores page directory and page table
entries. The entire TLB gets flushed when you
reload CR3.

http://www.execpc.com/~geezer/osd/mem/paging1.gif
Post Reply