Multi-level page tables, Operating System

Assignment Help:

Multi-level page tables are tree-like structures to hold page tables. As an example, consider a two- level page table, again on a 32-bit architecture with 212 = 4 kbyte pages. Now, we can divide the virtual address into three parts: say 10 bits for the level-0 index, 10 bits for the level-1 index, and again 12 bits for the offset within a page.

The entries of the level-0 page table are pointers to a level-1 page table, and the entries of the level-1 page table are PTEs as described above in the single-level page table section. Note that on a 32-bit architecture, pointers are 4 bytes (32 bits), and PTEs are typically 4 bytes.

So, if we have one valid page in our process, now our two-level page table only consumes (210

level-0 entries)(22
bytes/entry)+1(210
level-1 entries)(22
bytes/entry) = 2212
bytes = 8 kbytes:

For processes with sparse virtual memory maps, this is clearly a huge savings, made possible by the additional layer of indirection.

Note that for a process which uses its full memory map, that this two-level page table would use slightly more memory than the single-level page table (4k+4M versus 4M). The worst-case memory usage, in terms of ef?ciency, is when all 210 level-1 page tables are required, but each one only has a single valid entry.

In practice, most page tables are 3-level or 4-level tables. The size of the indices for the different levels are optimized empirically by the hardware designers, then these sizes are permanently set in hardware for a given architecture.


Related Discussions:- Multi-level page tables

Unix and linux commands, To explore the UNIX file system, use basic UNIX co...

To explore the UNIX file system, use basic UNIX commands and use a text editor. Task:   1.      Logon to Linux. 2.      Create a directory "Unix" under your home d

Why is rotational latency not considered in disk scheduling, Q. Why is rota...

Q. Why is rotational latency typically not considered in disk scheduling? How would you alter SSTF, SCAN and C-SCAN to comprise latency optimization? Answer: Most disks don't

Write a short note on file organization and access, Write a short note on f...

Write a short note on file organization and access. There are three methods to access files 1Record Access 2Sequential Access 3Random Access The record access

Write a short note about context switch, Write a short note about context s...

Write a short note about context switch. Switching the CPU to another process needs saving the state of the old process and loading the saved state for the new process. This ta

CPU sheduling, categorize the CPU scheduling algorithms and among them expl...

categorize the CPU scheduling algorithms and among them explain the non-preemptive algorithms..

What is busy waiting?, What is busy waiting? When strict alteration is ...

What is busy waiting? When strict alteration is done there may take place situation like two processes setting their flag as true. Therefore both of the processes have equal pr

Explain busy waiting semaphores, Explain Busy Waiting Semaphores Weak, ...

Explain Busy Waiting Semaphores Weak, Busy-wait Semaphores a) The simplest way to implement semaphores. b) Useful while critical sections last for a short time, or we com

Garbage collection, The dynamic memory allocator is a layer between the app...

The dynamic memory allocator is a layer between the application and the OS, managing heap objects. When a program requests memory from the allocator (via malloc(), for instance), t

Briefly discuss on real-time scheduling, Briefly discuss on real-time sched...

Briefly discuss on real-time scheduling? It is divided into two types.  Hard real-time systems are needed to complete a critical task within a guaranteed amount of time. T

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd