Load on first use
Executable and data pages remain on secondary storage until referenced, reducing initial load and allowing more processes to coexist.
Code
Bhavya
Follow a nonresident page from CPU reference to disk and back, compare replacement decisions, and diagnose when excessive paging destroys useful execution.
A process sees a private virtual address space. Page-table entries map resident pages to frames; a valid/present bit tells hardware whether translation can continue.
Executable and data pages remain on secondary storage until referenced, reducing initial load and allowing more processes to coexist.
Processes initially share read-only frames. A write fault creates a private copy, making fork() cheaper.
Reads and writes use ordinary memory references while the OS handles caching, loading and eventual persistence.
page = ⌊virtual address / page size⌋
offset = virtual address mod page size
EAT depends on TLB hit and fault rate
A TLB miss and a page fault are different. On a TLB miss the mapping may already exist in the page table; on a page fault the page is not resident and OS intervention is required.
Hardware traps to the kernel. The OS checks whether the address is legal; illegal references terminate or signal the process.
Use a free frame or select a victim. If the victim is dirty, schedule its write-back before reuse.
Issue storage I/O and block the faulting process so another ready process can run.
Record frame number and protection bits; invalidate stale TLB state.
Return to user mode and repeat the faulting instruction as though the page had been present.
FIFO removes the oldest loaded page; LRU removes the least recently used; Optimal removes the page used farthest in the known future and is an offline benchmark.
The complete hit/fault and victim trace will appear here.
| Policy | Information | Strength | Limitation |
|---|---|---|---|
| FIFO | Load order | Small metadata | Belady anomaly possible |
| LRU | Past recency | Uses temporal locality | Exact tracking costly |
| Optimal | Future references | Minimum faults for trace | Not online implementable |
The pages referenced in a recent window approximate the process’s active locality. Enough frames keep that locality resident.
Processes block for paging; a naive scheduler may admit more processes and make pressure worse.
Suspend processes, use working-set or page-fault-frequency control, and allocate frames according to locality.
Global replacement may take frames from another process; local replacement restricts victims to the faulting process. Global policies can improve utilization but couple processes and weaken performance isolation.
Press Next step to begin.
Start with present-bit failure, validate the address, obtain a frame, write dirty victim if necessary, read the page, update page table/TLB, unblock and restart. Mention that disk latency dominates and another process can run meanwhile.
Mark complete after you can trace one fault and manually run LRU.
Saved only in this browser.