Virtual memory extends memory available to applications by changing the address space of the physical memory into a virtual address space. It only uses the bits of memory that are actually needed during that time including the OS processes as well. The OS doesn't need every program running at the same time because it's created to run in segments to limit the amount of memory needed at any given time. Essentially, the illusion of increased capacity becomes real because there's not enough memory to even run most operating systems due to their size, so they must run in segments to function at all. For example, a single washer/dryer unit would use half the power if the dryer portion is shut off while the washer is running. Just like there's no need to allocate power to the dryer while the washer is running, many portions of an operating system do not need access to memory while other bits are being accessed.
Virtual memory is also explained as an illusion of more memory because the physical memory hardware doesn't have to increase to support the access to more bits. Instead of holding everything necessary in physical memory it's mapped using the page table into separate virtual address spaces. Then the operating system only uses the minimum amount of memory necessary to execute the current process. Tanenbaum explains virtual memory as, "...each program having its own address space, which is broken up into chunks called pages. When a program references a part of its address space that is in physical memory, the hardware performs the necessary mapping on the fly." Then the pages are put in physical memory to be mapped as the virtual memory requests.
A page fault is a trap in the operation system and a detour during the travel to the physical memory page table. The operating system will write the address information, find it on disk, remap it on the Memory Management Unit and enter it in the page table. Then it will be used as originally needed. The page fault is determined by the virtual memory finding an empty bit in the physical MMU and continues the process of replacing the missing data. As stated early, not all memory is needed to run the operating system at any given time, so new memory may have to be fetched from disk into RAM in order to be accessed. There are a number of other reasons for a bit to be empty, but the operating system must perform this protocol or else the needed information, or missing bit information, won't be available for use.
David Black-Schaffer created a video titled, "Virtual Memory: Address Translation" as a 1 of 11 videos discussing virtual memory in detail. He does a great job explaining how virtual memory accesses physical memory through page mapping, and that each piece of memory is on a long list called a page table. He's well spoken, clear and objective, and he uses good images and design techniques to visualize his words.
Dr. Mike Murphy created a video titled, "Virtual Memory - Part 1" in a similar format to a professor giving a lecture. While the information was strong his presentation was full of text which wasn't easy on the eyes. It's not a good idea to give an audience something to read as you expect them to listen to your words at the same time.
David Black-Schaffer's video on virtual memory taught me much more about the process of virtual memory to physical memory than the second video. The visuals given by David allowed me to see a clearer picture of how the page table maps physical addresses into virtual addresses. It also showed that a page fault has to not only fix its own problem of having missing data, but also find and rewrite the data to the MMU. I also liked Professor Messer's videos because I could see him speaking in the top right corner and he also had better visuals.
Virtual memory increases the amount of physical memory by using segments of it at a time. A page table is used to map the virtual address space to the physical address space in order for it to be executed. Page faults act as an interrupt to the process in order to rewrite the missing data to the physical memory and put the accurate information into the page table for later reference.
Black-Schaffer, David (July, 2014). Virtual Memory: 6 Address Translation.
Retrieved from: https://www.youtube.com/watch?v=ZjKS1IbiGDA
Murphy, Dr. Mike (October, 2011). Virtual Memory: Part 1.
Retrieved from: https://www.youtube.com/watch?v=iqfjWIYyQ9k
Tanenbaum, Andrew S. & Bos, Herbert (2015). Modern Operating Systems, Fourth Edition.
Upper Saddle River, NJ: Pearson Education, Inc.