Definition
Page Fault
Handling
Page Fault Handler
The OS intervenes to bring the required page into memory:
- Trap to Kernel: Hardware generates a trap, transferring control to the OS
- Locate Page: OS determines page location on secondary storage
- Find Free Frame: OS searches for an available frame; if none free, invokes replacement policy
- I/O Operation: Page read from disk into allocated frame
- Update Page Table: Page table updated (present bit set to 1)
- Restart Instruction: CPU restarts the faulting instruction
Thrashing
Performance Impact
Frequent page faults lead to thrashing, where the system spends more time performing I/O than executing user code.