Demand Paging and Thrashing | OS Interview | Skill-Lync Resources
Medium Operating Systems Virtual Memory

What is demand paging and what is thrashing?

Answer

Demand paging loads pages into memory only when accessed (lazy loading), not at process start. On page fault: if page is in swap, load it; else it's a new access, allocate frame. Benefits: faster startup, less memory usage, run programs larger than RAM. Thrashing occurs when system spends more time handling page faults than executing - too many processes compete for limited frames. Solutions: working set model, page fault frequency control, swapping out processes.

Master These Concepts with IIT Certification
IIT Certified

Master These Concepts with IIT Certification

175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.

Relevant for Roles

Systems Developer Performance Engineer Software Engineer