operating-system-paging.html
* created: 2025-05-29T15:16
* modified: 2025-07-03T08:52
title
Paging
description
This is the act of partially storing or loading processes into memory.
related notes
Partially swapping
Paging is the act of partially loading or storing a process in or out of memory.
If we don't have access to a MMU or decide for simplicity reasons that we don't want to handle virtual memory we would resort to swapping.
We can use the MMU to map our logical address to a physical address, so that each physical page maps to exactly one virtual page frame which only exists inside our logical memory.
We can split our process into multiple page frames. The main benefit we get from doing this, is that we can now load individual page frames, instead of our entire process. So we only have to load these parts of our process into the fairly expensive RAM, that are currently needed for execution. The rest can be stored somewhere cheap like a solid state drive.
A process that is partially loaded into memory can only execute as long as the CPU only accesses these parts that are currently in memory. If the CPU try's to access other parts (see: present/absent bit) we trigger a page fault.