The relocation register was the first
mechanism we discussed by which a logical address (the relocatable address) was converted into a different
physical address.
Virtual memory completely separates the concepts of logical and physical memory. Logical addresses
can be much, much greater than the maximum physical memory. With virtual memory, an entire program
need not be in memory during execution, only the part of the program currently executing. Also, memory
allocated to a program need not be contiguous, and instead can be scattered about, wherever available
memory exists.
Many advantages attend virtual memory and justify its complexity. Most importantly, programmers can
ignore physical memory limitations. This greatly simplifies software development. Virtual memory also allows
a greater degree of multiprogramming, which can improve CPU utilization. More processes can be in memory
ready to run, because each process can occupy much less memory than its full program size would otherwise
require. Virtual memory also facilitates sharing of memory between processes, for purposes of sharing either
code or data.
Virtual memory is implemented using demand paging or segmentation, or both. By far the more common
approach is demand paging.
Pages:
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324