Thrashing: the time spent on page faults (swapping things out, swapping things in) exceeds the time spent on execution of a program. Very fast things a computer does: arithmetic. That's done at the chip level. Computers work in base 2. Humans work in base 10. If you're dealing with real numbers that don't terminate in base 2 (and most don't), you're have some conversion and arithmetic errors when you work these approximations caused by round-off. Very slow thing a computer does. Loading off a disk. Internet transmission. Sending information to a screen. Moving things back and forth in memory is somewhere in the middle. Faster than moving things back and forth to disk. Not as fast moving things into registers and doing chip-based arithmetic. Different algorithms have been suggested to reduce thrashing. One is to use local page replacement rather than global page replacement. This means that if I need a page swapped in from my program then the page that is swapped out also comes from my program (as opposed to coming from some other process on the system.) In this way, if my program starts thrashing, it's only going to affect me, and not the other running processes. Other approaches use things called the working set, really keeping track of these pages that are likely to be used soon so that they don't keep getting swapped. Memory Compression: Rather than swap pages out to disk, if possibly you can compression several pages and store them in a free frame in memory. So if I swap page 14 to disk so I have a free frame where 14 used to be, and I haven't used pages 2, 11, and 106 in awhile, I can compress them and store them on page 14. If I then need to access page 11, I can find or make a free frame, and uncompress page 11 into that frame rather than load it. What is compression? Making files smaller while preserving more or less the information. Lossy compression vs. lossless compression. Lossless compression means that when the file is decompressed, it will be exactly as it was before it was compressed. A good example of this is zip files. Lossy compression is when the uncompressed file might be different from the original but in a slight, hopefully unnoticeable way. MP3 files. Your pages 2, 11, and 106 probably aren't using the entire page. Some of the page has stuff in it, some of it isn't, and so you might to store all 3 pages onto a single page with the proper algorithm. Compression algorithms don't always work. Compression makes some files larger. Handhelds often use this because handheld devices really don't want to swap. The flash drives of a handheld isn't really designed for lots of memory transfers. It's slow and it causes the memory to wear out faster. Linux OS tends to use global page replacement (if you need to swap a page in, the page swapped out can be from any process, and a variant of least recently used (LRU) to decide which page should be swapped out. Windows 10 used shared libraries (libraries common to many processes are stored on certain pages in physical memory. The virtual memory of each individual process points to these pages so that all processors can use them without each of them needing their own copy.), demand paging (pages don't loaded unless you ask for them), copy-on-write, (if memory needs to be copied, the literal copying doesn't happen unless one of the copies is changed), memory compression.