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

C Virtual Memory

Uploaded by

sreeramlalvp123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
11 views

C Virtual Memory

Uploaded by

sreeramlalvp123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
Virtual Memory In a memory hierarchy system, programs and data are first stored in auxiliary memory. Portions of a program or data are brought into main memory as they are needed by the CPU. Virtual memory is a concept used in some large computer systems that permit the user to construct programs as though a large memory space were available, equal to the totality of auxiliary memory. Each address that is referenced by the CPU goes through an address mapping from the so-called virtual address to a physical address in main memory. Virtual memory is used to give programmers the illusion that they have a very large memory at their disposal, even though the computer actually has a relatively small main memory. virtual memory system provides a mechanism for translating program-generated addresses into correct main memory locations. This is done dynamically, while programs are being executed in the CPU. The translation or mapping is handled automatically by the hardware by means of a mapping table. Address Space and Memory Space An address used by a programmer will be called a cry lSecory. virtual address, and the set of such addresses the address space. ‘An address in main memory is called a location or Mon veray physical address. The set of such locations is a called memory space. Consider a computer with a main-memory al es capacity of 32K words (K 1024). baat 415 bits are needed to specify a physical address in memory since 32K=2"* Tan at Suppose that the computer has available auxiliary memory for storing 2°°=1024K words oto Denoting the address space by N and the amon page memory space by M, we then have for this : example N=1024K and M=32K, Nemonce 3 Virtual Memory Mapping | 1 se [7] ca 2 © Virtual Address (20 bits) Physical Address (15 bits)

You might also like