Q1. Explain Thrashing.
Ans. If the process does not have the number of frames it needs to support page in active use, it will quickly page fault, at this point, it must replace some pages, and however, all its pages are in active use, it must replace a page that will be needed again. It quickly faults again, replacing pages that it must bring back immediately. This high paging activity is called thrashing.
A process is thrashing, if it is spending in memory. We can now use the free frame to hold the page for which the process faulted. We modify the page fault service routine to include page replacement.