Reputation: 21
Here is my understanding:
Logical memory: There is no actual logical memory space. It includes the address allowed to be generated by the CPU while executing the process. The pages of logical memory are mapped to frames (same as the size of pages) of physical memory.
To execute a process, all of its pages must be loaded to the physical memory (i.e. into the frames) before starting its execution. After the execution of the process, the frames are freed.
Am I right? And how does virtual memory work differently?
Upvotes: 0
Views: 525
Reputation: 21607
Am i right? And how does Virtual memory work differently?
Not at all.
There are three types of address translation:
Virtual translation does not work unless there is logical memory translation as well. Virtual translation takes over when there is a valid logical page that is not mapped to a physical page frame. In that case virtual translation takes over to find the data in secondary storage.
Much in the way of computer documentation conflates virtual and logical as virtual. In the days when virtual address spaces were large compared to physical address spaces (e.g. 4GB virtual and 8MB physical), this conflation was not significant.
Now, when physical memory has grown into the GB range, there is a diminishing need for virtual translation while retaining logical translation. That means the distinction between the two is becoming significant.
Upvotes: 1
Reputation: 2592
Referring to the amd64 architecture things are explained in: https://support.amd.com/TechDocs/24593.pdf page 54
They define: logical address an address insided a segmented address space ( actually that mode isn't customarily used ). The logical address may be converted to a linear address by adding the segment base address to the offset.
linear addresses are the addresses the programmer sees actually are 64 bits and thus are much more than the available physical memory. The OS may manage the swapping of memory pages from and to the hard disk depending on use. The programmer is ignare of that.
Physical Addresse is the address of memory the programmer never sees. The paging system is delegated to associate a linear address to the physical address before reading or writting to memory.
Comparing to the above definitions, you use the term logical address instead of linear (virtual) address. Not all frames should be loaded. The may be loaded on demand.
Virtual memory is the technique to show to the programmer a linear address space that is huge ( 2^64 bytes = 16EBytes =~ 1000000 TB ) while physical memory is much more limited, and mapping on demand that memory to an external storage device as a hard disk.
Upvotes: 0