REAL(OR PHYSICAL) AND VIRTUAL MEMORY

The real or physical memory is the actual main memory provided in the system.It is directly addressed by the CPU.The address of a location of the physical memory is called physical address.
The technique which allows a program to use main memory more than what a computer really has is known as virtual memory technique.It gives the programmers an illusion that they have main memory available more than what is physically provided in the computer.The entire program and its data are not placed in the main memory.Only the instructions data which are to be currently executed are brought from the secondary memory into the main memory.The remaining part of the computer resides in the secondary memory.When the part of the program which is in the main memory has been executed,it is sent back to the secondary memory.Thereafter another part is brought into the primary memory for its execution.Thus we see that a program requiring much lager capacity than that of the main memory can be executed by using virtual memory technique.The virtual memory space is much larger than the physical memory space.
The capacity of virtual memory depends on the design aspects of a processor.
The addresses which are used in a program are called logical addresses.These addresses indicate the positions of instructions and data in the program.The logical addresses are translated into physical addresses by memory management unit,MMU. The MMU is placed in between the processor and main memory.The CPU generates logical address while executing the program.The MMU receives a logical address from the processor and determines whether the logical address is present in the physical memory(i.e.main memory).If it is present in the main memory,the MMU determines the corresponding physical address.If the logical address is not present in the physical memory,the MMU interrupts CPU.The CPU executes a service routing  to bring the required information from the secondary memory to the physical memory.Thereafter the MMU determines the corresponding physical address.
The logical address is also called virtual address in a system which has provision for virtual memory.

No comments:

Post a Comment

Analysis of Discrete-time Linear-Invariant Systems

we shall demonstrate that such systems are characterized in the time domain simply by their response to a unit sample sequence.we shall als...