Virtual memory formulas
Virtual memory: demand paging and page replacement. 6 formulas for GATE CS Operating Systems, each with when to use it. Each is explained in the topic notes.
IAE Academy: Virtual memory: demand paging and page replacement formulas (GATE CS)
All 6 Virtual memory formulas
EFFECTIVE ACCESS TIME
Weighted average of a hit-path access (time m) and a faulting access (total time S).
EFFECTIVE ACCESS TIME WHEN THE FAULT TIME IS EXTRA
Use this form when the question gives S as a delay added on top of the normal memory access, so a faulting access costs m + S.
AVERAGE FAULT SERVICE TIME WITH DIRTY VICTIMS
d is the fraction of faults whose victim is dirty; S_clean and S_dirty are the service times for a clean and a dirty victim.
LARGEST TOLERABLE FAULT RATE
Keeps EAT at most (1+ε)·m, i.e. a slowdown of at most 100ε percent, with S the total time of a faulting access. Follows from (1-p)m + pS ≤ (1+ε)m.
PROPORTIONAL ALLOCATION
s_i is the size (in pages) of process i and m the number of available frames. If a share is not whole, use the rounding the question states (for example, round down and keep the leftover frames free), keeping each share at or above the minimum.
TOTAL FRAME DEMAND
If D is greater than the number of available frames m, thrashing is likely; the OS should suspend a process (freeing its frames). If D is at most m, the OS may start another process.
Where this was asked: 2018 (1), 2020 (1), 2022 (1), 2023 (1), 2025 (2). See the 6 previous-year questions on Virtual memory. This shows what was asked, not what will be asked.