Page-table lookups, Operating System

Assignment Help:

How exactly is a page table used to look up an address?

The CPU has a page table base register (PTBR)which points to the base (entry 0) of the level-0 page table. Each process has its own page table, and so in a context switch, the PTBR is updated along with the other context registers. The PTBR contains a physical address, not a virtual address.When theMMU receives a virtual address which it needs to translate to a physical address, it uses the PTBR to go to the the level-0 page table. Then it uses the level-0 index fromthemost-signi?cant bits (MSBs) of the virtual address to ?nd the appropriate table entry, which contains a pointer to the base address of the appropriate level-1 page table. Then, from that base address, it uses the level-1 index to ?nd the appropriate entry. In a 2-level page table, the level-1 entry is a PTE, and points to the physical page itself. In a 3-level (or higher) page table, there would be more steps:

This sounds pretty slow: N page table lookups for everymemory access. But is it necessarily slow? A special cache called a TLB1 caches the PTEs from recent lookups, and so if a page's PTE is in the TLB cache, this improves a multi-level page table access time down to the access time for a single-level page table.

When a scheduler switches processes, it invalidates all the TLB entries (also known as TLB shoot- down). The new process then starts with a "cold cache" for its TLB, and takes a while for the TLB to "warm up". The scheduler therefore should not switch too frequently between processes, since a "warm" TLB is critical to making memory accesses fast. This is one reason that threads are so useful: switching threads within a process does not require the TLB to be invalidated; switching to a new thread within the same process lets it start up with a "warm" TLB cache right away. So what are the drawbacks of TLBs? The main drawback is that they need to be extremely fast, fully associative caches. Therefore TLBs are very expensive in terms of power consumption, and have an impact on chip real estate, and increasing chip real estate drives up price dramatically. The TLB can account a signi?cant fraction of the total power consumed by a microprocessor, on the order of 10% or more. TLBs are therefore kept relatively small, and typical sizes are between 8 and 2048 entries.


Related Discussions:- Page-table lookups

List out the advantages of windows 2000 file management, List out the advan...

List out the advantages of windows 2000 file management. Permits detailed security for individual folders and files. Built-in granular compression capabilities

Explain threads in details?, What are threads? A thread - sometimes c...

What are threads? A thread - sometimes called as an implementation context or a lightweight process - is a single sequential flow of control within a program. We use threads

Operating system components, Question 1 Discuss the following with respect ...

Question 1 Discuss the following with respect to Operating Systems: Operating System Components Operating System Services Question 2 Describe the theory behind Pagin

Micro operation, Ask question maxmum words accepted#

Ask question maxmum words accepted#

User threads control dispatching, Consider a particular system that does no...

Consider a particular system that does not have an interrupting clock.  The only way a thread can lose the processor is to voluntarily surrender it.  Additionally, the operating sy

Show the multithreading performance, Q. Provide two programming instances i...

Q. Provide two programming instances in which multithreading provides better performance than a single-threaded solution. Answer: (1) A Web server that services every request

Name the hardware to support demand paging, The hardware to support demand ...

The hardware to support demand paging is as follows Page table: This table has the skill to mark an entry invalid though a valid-invalid bit or particular value of protectio

What is micro-kernel?, Question 1 What is Micro-kernel? What are the benef...

Question 1 What is Micro-kernel? What are the benefits of Micro-kernel? Question 2 Explain seven state process models used for OS with necessary diagram. Differentiate betwee

Crank-nicolson timestepping schemes, For the heat conduction problem, inves...

For the heat conduction problem, investigate the effects on the numerical solution of the following aspects: 1. non-uniform meshes with re?nement at both ends versus a uniform m

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