Swapping is, we have too many processes requiring more memory than our machine has, so we have to move some memory to storage periodically. "Standard swapping" is when entire processes can swapped out. Perhaps there are processes that have been idle for awhile so you won't miss them if they stop working for awhile. A process, everything about it, its variables, its memory, its program counter is halted and put into storage until it is needed. I used "standard swapping" in the 1980's, but it is largely unused now. There's not much need to swap out a whole entire process. Nowadays, we use "swapping with paging". You don't swap out whole processes; you just swap out pages of memory from still running processes. If a process finds it needs that missing page of memory, then it has to be swapped back for the program to continue. Earlier programming languages allowed you to specify (if you wished) which pages of memory you wanted your variables stored in. This would allow to you consolidate variables as you needed them, so that all the important ones could be stored on the same page as each other so that page wouldn't get swapped out and pages with less important variables could be swapped as needed. Mobile devices don't swap because of smaller drive space, the problems of too many writes on flash drives, and slow write times. Instead, iOS and Android just terminate processes without swapping them. (Or ask the process if it's OK with being terminated.) VIRTUAL MEMORY With virtual memory, everything pertaining to the physical memory on the machine is handled by the operating system. The individuals programs or processes control none of this. Programs use virtual memory which uses the computer term "virtual" meaning "not really there". For example, if you have "64-bit addressing" this means that memory addresses take up 64 bits, or 8 bytes. You can access any memory location from 000 000 000 000 000 000 000 000 to 377 377 377 377 377 377 377 377. (64 bits of zero to 64 bits of one). I have certainly 16-bit and 32-bit machines in the past. In the 1990's, they started releasing 128-bit machines (16 bytes for each memory address). A 64-bit machine can store 2^64 bytes or 18 exabytes. A 128-bit machine can store 2^128 bytes or humungous bytes. Your physical memory doesn't really have that much storage. The address space is a convenience for your program to organize data in a way that pretends to have that much space. The convention is for memory to be divided into four chunks: the stack, the heap, the global variables, and the program itself. Also remember, that the stack and the heap use the same chunk of memory but opposite ends of it. So, when you allocate space on the stack (say) your new memory will have higher addresses than the stuff already on the stack. Your new memory on the heap will have lower addresses than the stuff already on the heap.) The stack grows from the bottom end of the memory. The heap shrinks from the top end of the memory, and they meet in the middle. Since we have very large numbers for our memory addresses, it is unlikely that your stack and your heap ever will meet in the middle; there's so much memory there. That huge swath of memory in the middle that is unused...simply doesn't exist. It's not stored anywhere. Those addresses there in case you want to use it, but until you do use it, it's empty. When you access a memory address (your 64-bits, or whatever), the OS knows what process you are and knows what frame in real memory your memory location maps to. If the page you're accessing turns out to really be in memory, then your memory accessed worked and you've loaded up whatever is there. If your page is not in memory, then that's a "page fault." If that page can be swapped back into memory, then it will be, and your memory is accessed. If that page cannot be swapped back into memory, primarily because it is a malformed address that does not correspond to any existing page or frame, then the page fault will likely cause the program to crash. BOLD CLAIM: Directly controlling which pages need to be swapped out and which pages need to be retained is a more challenging problem with virtual memory, since the program doesn't control this, the OS controls all of it. "Copy-on-write". This is an aspect of virtual memory that you particularly see on Linux/UNIX machines. What basic feature does a Linux machine have that a Windows machine does not? In fact, PG1 was based on this. Linux programs fork. Windows programs do not. Windows (and every other older machine I've ever used), when you start a process, you specify the program that is to run on the new process, and that new program starts from scratch. On Linux, you fork, and you now have two copies of that same program, with the same memory, and the same program counter, except for one of them, fork() returned true and for the other, fork() returned false. When you fork(), both parent and child have the same memory. Maybe the child will execl, or maybe not. However, if the parent or child makes a change to the memory (changes a variable) or something that does not affect the other one. What has to happen is that an exact copy of a process's memory has to be made when a fork() happens. Because that's inefficient, that isn't what really happens. What really happens is that both parent and child use the same memory, until one of them changes something and THEN the memory is duplicated. In this way, if the child calls execl right away--as it frequently does--then the memory will not have to be copies. In fact, virtual memory is used frequently to store pages of memory between processes in situations in which this is useful, for example in shared libraries. I may be running six programs each using C's math library, say. Each of these processes has the library loaded up in virtual memory, but the library is only loaded ONCE in physical memory, and OS directs the virtual memory addresses associated with the library in each process to the single copy of the library stored in physical memory. The processes themselves don't even have to store the library in the same place as each other in virtual memory. The OS makes sure it all points to the same piece of physical memory anyway.