Virtual memory allows processes to have a logical address space larger than physical memory by paging portions of memory to disk as needed. When a process accesses a page not in memory, a page fault occurs which the operating system handles by finding a free frame, loading the needed page, and updating data structures. Page replacement algorithms aim to select pages least likely to be used soon when a free frame is unavailable. Thrashing can occur if working set sizes exceed available memory, continuously triggering page faults.