Memory management unit, Operating System

When a program issues a memory load or store operation, the virtual addresses (VAs) used in those operations have to be translated into "real" physical memory addresses (PAs). This translation is themain task of theMMU (MemoryManagement Unit). TheMMUmaintains a page table (a big hash table) that maps virtual pages to physical pages. Since memory accesses are happening all the time, the MMU needs to be extremely fast and implemented correctly. For these reasons, MMUs are almost always implemented in hardware. Note that we can't map every single byte of virtual memory to a physical address; that would require a huge page table. Instead, the MMU maps virtual pages to physical pages. Also, since we want to isolate each program's address space from the address spaces of other applications, the MMU must keep a separate page table for each process; this implies that different processes could use the same virtual address to refer to different data, and that would not be a problem since these virtual addresses would be mapped into different physical addresses. The page table also marks all virtual pages that are allocated (and therefore are being used), so that it is possible to know which virtual pages have valid mappings into physical pages. All virtual pages that are not being mapped to a physical page are marked as invalid; segfaults occur when a program tries to reference or access a virtual address that is not valid. In addition to valid bits, page table entries (PTEs) also store a lot of other information, such as "read" and "write" bits to indicate which pages can be read/written.

Posted Date: 3/12/2013 5:36:07 AM | Location : United States

Related Discussions:- Memory management unit, Assignment Help, Ask Question on Memory management unit, Get Answer, Expert's Help, Memory management unit Discussions

Write discussion on Memory management unit
Your posts are moderated
Related Questions
Explain the TlsSetValue (TLSindex, dataPtr)Function The TlsSetValue function  associates the  dataPtr passed as a parameter as local storage for the requesting thread. The asso

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

Second-Chance algorithm When a page has been selected, we inspect its reference bit. If the value is 0, we proceed to replace this page. If the reference bit is set to 1, thoug

Q. Why do some systems stay track of the type of a file while others leave it to the user or simply don't implement multiple file types? Which system is "better?" Answer: A f

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

Q. What kinds of services does the process manager provide? Define local procedure call? Answer: The process manager offers services for creating and deleting and using proce

Q. Data transfer between two processes? Communication: Data transfer between two processes is essential for some time. Both processes are on the one computer or on different

What is critical section problem? Consider a system consists of 'n' processes. Every process has segment of code called a critical section, in which the process might be changi

Q. In following Section we mentioned that disabling interrupts frequently could affect the system's clock. Describe why it could and how such effects could be minimized.

What are the services provided by the operating systems?  Program Development It provides a variety of services and facilities, such as debuggers and editor, to help the