0% found this document useful (0 votes)
63 views

CA Virtual Memory

Virtual memory is a technique that allows the memory space available to each process to exceed the amount of actual physical RAM present. It uses secondary storage like a hard disk as virtual memory which is treated as if it were part of main memory. When physical memory is full, the virtual memory manager transfers less frequently used pages to disk storage to make room for new pages. It uses a memory management unit and page tables to translate virtual addresses to physical addresses and moves data between RAM and disk as needed. This allows computers to run more programs than the available physical memory would normally allow.

Uploaded by

rkai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

CA Virtual Memory

Virtual memory is a technique that allows the memory space available to each process to exceed the amount of actual physical RAM present. It uses secondary storage like a hard disk as virtual memory which is treated as if it were part of main memory. When physical memory is full, the virtual memory manager transfers less frequently used pages to disk storage to make room for new pages. It uses a memory management unit and page tables to translate virtual addresses to physical addresses and moves data between RAM and disk as needed. This allows computers to run more programs than the available physical memory would normally allow.

Uploaded by

rkai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Virtual Memory Management

Virtual memory is a memory management technique where secondary memory can


be used as if it were a part of the main memory. Virtual memory uses hardware and
software to allow a computer to compensate for physical memory shortages, by
temporarily transferring data from random access memory (RAM) to disk storage.
In essence, virtual memory allows a computer to treat secondary memory as though
it were the main memory

How does virtual memory work


Computers have a finite amount of physical memory (RAM), so memory can run
out, especially when multiple programs run at the same time. A system using virtual
memory uses a section of the hard drive to emulate RAM. With virtual memory, a
system can load larger programs or multiple programs running at the same time, and
without having to purchase more RAM.

Processor
Virtual address

MMU
Data Physical address

Cache memory

Data Physical address

Main memory 8

DMA transfer

Disk storage 50

Fig: Virtual Memory Organization


Virtual memory uses both computer hardware and software to work. When the
processor want to access the data of virtual memory then processor will send virtual
address and that virtual address translated into actual physical address using a
memory management unit (MMU). The MMU, which acts as an address translation
hardware, will automatically translate the addresses. The MMU uses page tables to
translate virtual addresses to physical addresses. Each table entry indicates where a
page is located: in RAM or on disk as virtual memory. A virtual address consists of
a virtual page number and a page offset. Page offset means the number of bits
required to represent particular word in a page. The virtual page number gets
translated to a physical page number. The page offset is not changed. A page table
translates a virtual page number into a physical page number. Through this physical
address the required data from the secondary memory which is assumed as main
memory will be accessed.

Data transfer will take place between main memory and disk storage with the help
of a technique known as Direct Memory Access (DMA) transfer.
Benefits of using virtual memory
 with virtual memory, a system can load larger programs or multiple programs
running at the same time;
 increased security because of memory isolation;
 allocating memory is relatively cheap;
 doesn't need external fragmentation;
 data can be moved automatically;

Limitations
 The use of virtual memory slows a computer because data must be mapped between
virtual and physical memory, which requires extra hardware support for address
translations.

 The size of virtual storage is limited by the amount of secondary storage.

 Applications may run slower if the system is using virtual memory.

 It reduces system stability.

 Does not offer the same performance as RAM.

You might also like