Virtual Memory: is Secondary storage. Acts as RAM when it is full or not efficient. It holds data currently not in use and transfers it back to the RAM when needed.
RAM: is Primary Storage that temporarily holds data currently in use. It is Volatile
ROM: Read-Only Memory
ROM: Is primary storage, which permanently stores data. Its holds BIOS instructions to boot up a pc. It is Non-Volatile.
Advantages of RAM: High speed, Faster than secondary storage but volatile, can be expensive.
Advantages of ROM: Non-Volatile, instructions to boot up (BIOS), but slow speed.
Cache: Stores regularly used data. The CPU accesses it. Veryfast memory. Faster than RAM.
Using Virtual Memory can make the computer slower to respond due to constanttransferring and switching of data. This is Disk Thrashing.