Start with the shortage in RAM
Virtual memory can support current work when the active programs and data cannot all fit in available RAM. The operating system uses a reserved area of secondary storage, such as an SSD or hard disk. This does not manufacture more physical RAM.
In a simplified example, a program needs 500 MB and only 200 MB of RAM is free. There is a 300 MB shortfall. If enough less-needed data is currently in RAM and enough secondary-storage space is available, moving that data out can free working space. The figures illustrate capacity, not the speed of a real computer.
Follow the same block out and back
Choose a block of data that is in RAM but is not currently needed. Moving it to the reserved secondary-storage area frees RAM for more urgent work. This movement is often called swapping out.
If the program needs that block again, it must return to RAM for processing. Another less-needed block may have to move out first to make room. The two locations are RAM and secondary storage, not ROM and cache.
| Event | Location of block P |
|---|---|
| Before swapping out | RAM |
| After swapping out | Reserved secondary-storage area |
| After swapping back | RAM |
Why more usable space can mean more waiting
Access to secondary storage is slower than access to RAM. Repeated transfers therefore take time and can leave the processor waiting for required data. Virtual memory may allow work to continue, but heavy use can make the application slower.
More RAM can reduce swapping by keeping more active work in RAM. A larger SSD increases storage capacity but does not by itself add RAM or speed up each transfer. Virtual memory is also not a saved document or a backup to rely on after shutdown.
Continue with your exam board
The course combines lesson videos, interactive activities, topic questions and original exam mocks. Sign in to use the learning tools and save your progress; your account’s course access applies.
Independent learning resources. Not endorsed by AQA or OCR. These public introductions complement the full course and the official specification.