Subscribe by Email


Tuesday, May 21, 2013

Define the Virtual Memory technique?


Modern operating systems come with multitasking kernels. These multitasking kernels often run in to the problems related to memory management. Physical memory does not suffice for them to execute the tasks assigned to them because of being fragmented. So they have to take some additional from the secondary memory. But they cannot use this memory directly. Virtual memory offers a solution to this problem. 

What is Virtual Memory technique?

- Using this technique makes the fragmented main memory available to the kernels as a contiguous main memory. 
- Since it is really not the main memory but just appears to be, it has been named as the virtual memory and this technique is called the virtual memory technique. 
- Since, it helps in managing the memory, it is essential a memory management technique. 
- The main storage gets fragmented because of many programming and processing problems. 
- The main memory available to the processes and the tasks is virtualized by the virtual memory technique and then it appears to the process as a contiguous memory location. 
- This memory is a global address space. 
- Virtual address spaces such as these are managed by the operating system. 
- The real memory is assigned to the virtual memory by the operating system itself. 
- The virtual addresses of the allocated virtual address spaces are translated in to the physical addresses automatically by the CPU. 
- It achieves this with the help of some memory management hardware specially designed for this purpose. 
- The processes continue to execute uninterrupted as long as this hardware properly translates the virtual addresses in to real memory addresses properly. 
- If it fails in doing so at any point of time, the execution comes to a halt and the control is transferred to the operating system. 
- The duty of the operating system now is to move the requested memory page to the main memory from the backing store. 
- Once done with this, it then returns the control again to the process that was interrupted. 
- It greatly simplifies the whole execution process. 
- Even if the application would require more data or code that would fit in real memory, it does not have to be moved to and fro between the backing store and the real memory. 
- Furthermore, this technique also offers protection to the processes that are provided distinct address spaces by the isolation of the memory allocate to them from other tasks.
- Application programming has been made a lot easier with the help of the virtual memory technique since it hides the fragmentation defects of the real memory. 
- The burden of memory hierarchy management is delegated to the kernel which eliminates the need for the explicit handling of the overlays by the program. 
- Thus each process can execute in an address space that is dedicated to it. 
- The need for relocating the code of the program is obviated along with using relative addressing for accessing the memory. 
- The concept of virtual memory was generalized and eventually named as memory virtualization. 
- Gradually, the virtual memory has become an inseparable part of the architecture of the modern computers. 
- For implementing it, dedicated hardware support is absolutely necessary. 
- This hardware is built in to the CPU in some sort of memory management hardware. - If required for boosting the performance of the virtual memory, some virtual machines and emulators may employ some additional hardware support. 
- The older mainframe computers did not have any support for the virtual memory concept. 
- In virtual memory technique, each program can solely access the virtual memory.


No comments:

Facebook activity