<aside>
💡
Summary of Section 9.1: Swapping
</aside>
Standard Swapping
- Swapping allows processes to be temporarily moved from memory to a backing store (secondary storage) and later brought back.
- Purpose:
- Increases multiprogramming by allowing more processes than available physical memory.
- Frees memory from idle processes, making space for active ones.
- Challenges:
- Time-consuming to move entire processes.
- Not commonly used in modern systems, except in rare cases (e.g., Solaris under extreme memory pressure).
Swapping with Paging
- Modern OS (Linux, Windows) use paging-based swapping instead of moving entire processes.
- Key operations:
- Page Out → Moves a page to the backing store.
- Page In → Brings a page back into memory.
- Benefit: More efficient than swapping entire processes.
Swapping in Mobile Systems
- Most mobile OS (iOS, Android) do not support swapping due to:
- Limited flash memory space.
- Wear-out issues (flash memory has limited write cycles).
- Low throughput between RAM and flash.
- Alternatives:
- iOS: Requests apps to free memory; may terminate apps if necessary.
- Android: Saves app state before termination to allow quick restarts.
System Performance and Swapping
- Excessive swapping indicates insufficient memory.
- Solutions:
- Terminate processes.
- Increase physical memory.
Glossary