Operating Systems Formula Sheet

CPU scheduling metrics (turnaround, waiting, and response time for FCFS, SJF, and Round-Robin) and virtual memory page replacement hit/fault rates (FIFO, LRU, Optimal).

Core Equations & Variable Definitions

Turnaround & Waiting Time

T_{\text{turnaround}} = T_{\text{completion}} - T_{\text{arrival}}, \quad T_{\text{wait}} = T_{\text{turnaround}} - T_{\text{burst}}

Lower average waiting time indicates tighter scheduling efficiency.

Effective Memory Access Time (EMAT)

\mathrm{EMAT} = (1 - p)\cdot t_{\text{mem}} + p \cdot t_{\text{fault}}

p: page fault rate; even tiny p dominates EMAT because disk/SSD service is orders of magnitude slower.

Page Hit & Fault Ratio

\text{Hit Ratio} = \frac{N_{\text{hits}}}{N_{\text{refs}}}, \quad \text{Fault Ratio} = 1 - \text{Hit Ratio}

Measured across a reference string with a fixed physical frame count.

CPU Utilization

U = \frac{\sum T_{\text{burst}}}{T_{\text{total elapsed}}} \times 100\%

Fraction of timeline where the CPU executes processes rather than idling.

Interactive Operating Systems Calculators

Common Exam Questions

What is Beladys anomaly in page replacement?

Under FIFO page replacement, adding more physical memory frames can paradoxically increase the number of page faults on certain reference strings. Stack algorithms like LRU and Optimal never suffer from it.

Why is Shortest Job First (SJF) optimal for average waiting time?

Running shorter bursts first minimizes the cumulative delay imposed on all queued processes, though true burst lengths must be predicted in practice.

How does the Round-Robin time quantum affect scheduling?

Very large quanta turn Round-Robin into FCFS with poor response time, while very small quanta cause excessive context-switching overhead.