A process is thrashing when it is spending more time on page faults (and page replacements) than executing its code.
Cause: historically, whenever the OS notices that the CPU utilization is low (the CPU is not executing code,) it runs more processes. The problem is that when memory is filled up and processes start spending more time waiting for their pages to be loaded from disk, then CPU utilization would decrease (since the processes are waiting,) causing the scheduler to add in even more processes, which makes thrashing grow.
To prevent thrashing, we check how many frames the process needs "right now" using one of the methods below: