The Virtual Memory Concept
Virtual Memory is a cost effective solution to slake the thirst of memory hungry applications for a seamless experience with your operating system. To understand the concept of virtual memory you need a little knowledge about the memory organization and working. There are basically two types of memory you need to know. Random Access Memory (RAM) is faster but costly. Memory like hard disk is slower but relatively cheaper. Virtual memory is a stratagem to utilize the hard drive memory to achieve enhanced performance from the random access memory.
Whenever you run multiple programs/applications in your desktop, you will be working on only a portion of a particular application at an instant. Therefore it is a waste of resource to load the entire memory required for a particular application into the limited size random access main memory. In a virtual memory environment each page of a process is brought to main memory only when it is needed on demand.
Data is stored in any memory in the form of binary digits. The operating system handles memory management in the form of chunks of memory called pages. A page is nothing but a contiguous block of memory. One process might require multiple pages of memory but only a few pages might be active at a time. Virtual memory uses a technique called demand paging to effectively use the available RAM memory. Every page has an address which may be a virtual or logical address. The main memory is divided into equal size chunks called page frames and each page frame has a unique physical address. So whenever a page needs to be accessed, the operating system has to translate the virtual address into a physical address and this is done by a Memory Management Unit (MMU) with the help of mapping in a page table. The virtual address corresponding to a page is mapped to a physical address corresponding to a page frame in main memory. Whenever a page is not in memory the operating system fetches the page from hard disk in response to a page fault exception. The operating system usually makes a prediction based on past history using intelligent algorithms regarding those pages that are least likely to be needed again and places them in the hard disk.
Whenever you run multiple programs/applications in your desktop, you will be working on only a portion of a particular application at an instant. Therefore it is a waste of resource to load the entire memory required for a particular application into the limited size random access main memory. In a virtual memory environment each page of a process is brought to main memory only when it is needed on demand.
Data is stored in any memory in the form of binary digits. The operating system handles memory management in the form of chunks of memory called pages. A page is nothing but a contiguous block of memory. One process might require multiple pages of memory but only a few pages might be active at a time. Virtual memory uses a technique called demand paging to effectively use the available RAM memory. Every page has an address which may be a virtual or logical address. The main memory is divided into equal size chunks called page frames and each page frame has a unique physical address. So whenever a page needs to be accessed, the operating system has to translate the virtual address into a physical address and this is done by a Memory Management Unit (MMU) with the help of mapping in a page table. The virtual address corresponding to a page is mapped to a physical address corresponding to a page frame in main memory. Whenever a page is not in memory the operating system fetches the page from hard disk in response to a page fault exception. The operating system usually makes a prediction based on past history using intelligent algorithms regarding those pages that are least likely to be needed again and places them in the hard disk.
25 comments:
Thanks for this info,it's very useful. Good Job, Keep it Up.
Wow, very nice explanation on virtual memory
Keep up the good work.
nice dear
but write more shorter and in more simple for very beginner
Like Awais said, though it's very good! Thanks. :)
I really enjoyed reading your post.
Dropping by with peace and a bunch of smiles 4 u..
wish u happy new year....... good work & keep it up.....
pls update your blog .....
Goood...
why u stop the updating your blog... pls update
as you said i have changed your link
morning dear friend, wishing us for a great day :-D
nice info... see you again in my blog... thanks for visiting....
nice info
its really useful notes on virtual memory .thanks a lot..
it's really good explaination about virtual memory
Good work yaar...
Thanks for the info..
thaks a lot for the info.... it really was and is of great help for me... THANKS...!!!
Nicely explained... Thanks dear.
nice but explain with diagrame step-wise -step
loda h...
hmmm good work :)
It is easily understandable and very clear.... Thanks... :)
really very useful info
thanks
Post a Comment