Q1: What happens when RAM is full and new page is needed?
A: Page replacement algorithm kicks in. System selects a victim page using algorithms like LRU, FIFO, or Optimal. Victim page is written to disk if modified (dirty), then new page is loaded into that frame.
Q2: Difference between Paging and Segmentation?
A: Paging divides memory into fixed-size blocks (pages), while segmentation divides into variable-size logical units (segments). Paging eliminates external fragmentation but may cause internal fragmentation.
Q3: How to calculate effective memory access time?
A: EMAT = (1-p) × ma + p × page_fault_time
Where p = page fault rate, ma = memory access time
Q4: What is the difference between logical and physical address?
A: Logical address is generated by CPU (virtual), physical address is actual RAM location. MMU translates logical to physical using page tables.
Q5: Why is LRU better than FIFO?
A: LRU considers usage pattern (temporal locality), while FIFO only considers arrival time. LRU typically has fewer page faults in real-world scenarios.