1.2 Virtual memory Flashcards
virtual memory
an area of the hard disc driveor SSD used as a temporary RAM when the actual RAM is full
uses of virtual memory
program instructions and data are constantly moving between the CPU and the RAM
RAM may be full if too many programs are running
if there is no free RAM, the OS will swap out some of the data stored in RAM to the virtual memory on the hard disc drive and swap in the requested data into the free area of the RAM
swapping data
the least recently used stored data is swapped out
if data is swapped out and is needed again, it is swapped back in from the virtual memory at the expense of other data
the more RAM a computer has the less virtual memory will be needed
adding more RAM will significantly increase the performance of a computer
disadvantages of using virtual memory
the read/write speed of a magnetic hard drive is much slower than RAM
there will be a significant performance drop if the system has to rely too heavily on virtual memory
if the OS is constantly swapping between RAM and the hard disc drive, programs will run more slowly
this is called disc thrashing
A computer’s operating system uses 6 GB of virtual memory.
a) Explain how a computer uses virtual memory and why it may be necessary [2]
b) State one advantage and one disadvantage of the use of virtual memory [2]
a) A computer uses virtual memory by moving to it the least recently used instructions and data from main memory
this allows other data to be loaded into the main memory
a computer uses virtual memory to compensate for not having a sufficient amount of RAM
b) an advantage or virtual memory is that program operation will continue even when the main memory is full
a disadvantage is that there is a fall in performance as it is much slower to access the data
Explain why adding more RAM to a computer will improve its performance [2]
adding more RAM will increase the number of program instructions and data that can be stored in main memory
this will improve the computer’s performance because it won’t be held up waiting for instructions and data to be swapped between virtual memory to main memory