assembly - Difference Between Page Table and Page Directory -


i have been hearing term address space in microprocessors , microcontrollers paradigm. understand address used refer particular block of memory in physical memory(primary).

if i'm right , address space super set of such addresses. right?

by using virtual memory/paging extending address space using secondary storage.

in paradigm page table, page table entry , page directory? understand first p.memory segmented , logically , these segments divided pages. page table? table containing pages? , page directory super table of page tables?

in x86 architecture, page directories , page tables provide mapping between virtual addresses (memory addresses used applications) , physical addresses (actual locations in physical memory hardware).

a page contiguous chunk of memory. x86 (32-bit) supports 3 sizes of pages: 4mb, 2mb, , 4kb, latter being commonly used in mainstream operating systems. page table array of 1024 * 32-bit entries (conveniently fitting single 4kb page). each entry points physical address of page. because single page table not able represent entire address space on own (1024 entries * 4kb = 22-bits of address space), require second level page table: page directory. page directory consists of 1024 * 32-bit entries (again fitting single page), each pointing page table. can see 1024 * 1024 * 4kb = 32-bits , 3-level structure able map entire 4gb virtual address space.

when cpu asked access virtual address, uses 10 highest order bits (31:22) index page directory table (the base address of stored in special register). next 10 highest order bits (21:12) used index page table pointed page directory entry. lowest 12 order bits (11:0) used index byte in page pointed page table entry.

in other systems there may more or fewer levels of page table required, depending on size of virtual address space , page sizes supported. example, x86 4mb pages needs single page directory. in 64-bit mode 4kb pages, 4-level system used: page mapping level 4 table contains entries point 1 of many page directories.

the intel architectures developer's manual has more information topic, particularly in chapters 3 , 4.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -