Article 40 - Operating System Virtual Memory

The operating system often provides the use of virtual memory to user programs since physical memory is inadequate to support all the programs that we wish to run. Even with virtual memory, we often run out of memory and programs start crashing. Remember, it is important to have amble amounts of physical memory ready.

There are core concepts that need to be addressed in order to understand virtual memory. First, what is virtual memory? Virtual memory is a logical structure of finite memory space allocated to a particular program. The size of virtual memory often exceeds the capacity of the system's physical memory, although it needs not to. Thus, virtual memory enables the program to use more space than is available on the system.

Page Table, Translation Lookaside Buffer, Page, Frame, Page Fault Definitions

We also need to understand the definition and uses of a page table, translation lookaside buffer, page, frame, and page fault. We will start from the hardware side and progress towards the software aspects.

Physical memory such as Random Access Memory (RAM) is a contigious array of fixed size block memory. These blocks make up a frame. In one sense, a frame is simply a fixed size region of physical memory. A frame does not necessarily represent a block, since one or more blocks may make up a frame. This is up to hardware manufactures to produce.

Then we have the translation lookaside buffer (TLB), which normally resides in the processor or motherboard chipsets. The TLB performs quick checks to determine if the virtual address requested by the program resides in physical memory. If not, additional procedures are required. Recall that memory can live outside the physical memory such as on the hard drive which may lead to page swapping.

In the software side, we have a contigious region of memory. Similar to frames, the virtual memory is made up of fixed size blocks called page. Each page in virtual memory is mapped to a corresponding frame in physical memory.

Since the TLB has to be very quick, it can only have a small and limited size. In order for the program (operating system) to remember which pages are in physical memory, a page table is used. The page table lists all pages that live in physical memory. A page fault occurs when the page requested does not live in physical memory, thus an expensive request is made to fetch it and put it into physical memory.

Comments (25)

Posted by anonymous - bookmarks at Thursday, March 14, 2013 9:29 AM

WS978X I truly appreciate this post.Really thank you!

Posted by anonymous - ciprofloxacin 500mg at Friday, March 15, 2013 10:27 AM

Im grateful for the article post.Much thanks again. Keep writing.

Posted by anonymous - generic viagra no prescription at Friday, March 15, 2013 12:06 PM

Really appreciate you sharing this blog post.Really looking forward to read more. Really Great.

Posted by anonymous - cheap cialis at Friday, March 15, 2013 1:45 PM

I really like and appreciate your blog.Really looking forward to read more. Great.

Posted by anonymous - 20mg levitra at Friday, March 15, 2013 3:25 PM

Really informative blog post.Really thank you! Keep writing.

Post a comment

  • Name:
  • Post:
  • Challenge:

Register or login to post comments easier.

Vantasy World Copyright 2011 - 2017. Vantasy World is a project developed by Vantasy Online. Privacy Policy.