In
computer science,
thrashing occurs when a computer's
virtual memory subsystem is in a constant state of
paging, rapidly exchanging data in memory for data on disk, to the exclusion of most application-level processing. This causes the performance of the computer to degrade or collapse. The situation may continue indefinitely until the underlying cause is addressed. The term is also used for various similar phenomena, particularly movement between other levels of the
memory hierarchy, where a process progresses slowly because significant time is being spent acquiring resources.