Thrashing (computer science)

Thrashing (computer science)

In computer science, thrashing is a situation where large amounts of computer resources are used to do a minimal amount of work, with the system in a continual state of resource contention.[1][2][3] Once started, thrashing is typically self-sustaining until something occurs to remove the original situation that led to the initial thrashing behavior.

Usually thrashing refers to two or more processes accessing a shared resource repeatedly such that serious system performance degradation occurs because the system is spending a disproportionate amount of time just accessing the shared resource. Resource access time may generally be considered as wasted, since it does not contribute to the advancement of any process. This is often the case when a CPU can process more information than can be held in available RAM; consequently the system spends more time preparing to execute instructions than actually executing them.

Silly window syndrome is a type of communications system thrashing.

Overview

If a process does not have "enough" pages, the page-fault rate is high. This leads to low CPU utilization. In modern computers, thrashing may occur in the paging system (if there is not 'sufficient' physical memory or the disk access time is overly long), or in the communications system (especially in conflicts over internal bus access), etc. Depending on the configuration and algorithms involved, the throughput and latency of a system may degrade by multiple orders of magnitude.

In virtual memory systems, thrashing may be caused by programs or workloads that present insufficient locality of reference: if the working set of a program or a workload cannot be effectively held within physical memory, then constant data swapping, i.e., thrashing, may occur. The term was first used during the tape operating system days to describe the sound the tapes made when data was being rapidly written to and read from them. Many older low-end computers have insufficient RAM (memory) for modern usage patterns and increasing the amount of memory can often cause the computer to run noticeably faster. This speed increase is due to the reduced amount of swapping necessary.

An example of this sort of situation occurred on the IBM System/370 series mainframe computer, in which a particular instruction could consist of an execute instruction, which crosses a page boundary, that the instruction points to a move instruction, that itself also crosses a page boundary, targeting a move of data from a source that crosses a page boundary, to a target of data that also crosses a page boundary. The total number of pages thus being used by this particular instruction is eight, and all eight pages must be present in memory at the same time. If the operating system allocates less than eight pages of actual memory in this example, when it attempts to swap out some part of the instruction or data to bring in the remainder, the instruction will again page fault, and it will thrash on every attempt to restart the failing instruction.

To resolve thrashing due to excessive paging, a user can do any of the following.

  1. Increase the amount of RAM in the computer (generally the best long-term solution).
  2. Decrease the number of programs being run on the computer.
  3. Replace programs that are memory-heavy with equivalents that use less memory.

The term is also used when a small set of faster storage space, intended to be used to speed up access to a larger set of slower storage space, is accessed in a way that cancels out any benefits from the faster storage. An example of this is cache thrashing, where main memory is accessed in a pattern that leads to multiple main memory locations competing for the same cache lines, resulting in excessive cache misses. This is most problematic for caches that have low associativity. Quite similar is TLB thrashing, where the TLB is overrun by more requests than it can handle efficiently.

See also

References

  1. ^ Kime, Charles R. (2004). Logic and computer design fundamentals. Upper Saddle River, N.J: Pearson/Prentice Hall. ISBN 0-13-140539-X. pp. 622.
  2. ^ Denning, P. J. (1968). "Thrashing". Proceedings of the December 9-11, 1968, fall joint computer conference, part I on - AFIPS '68 (Fall, part I). pp. 915. doi:10.1145/1476589.1476705.  edit
  3. ^ Abraham Silberschatz, Peter Baer Galvin and Greg Gagne. Operating System Principles, pp. 331, 348-353.

Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Thrash (computer science) — In computer science, thrash (verb), is the term used to describe a degenerate situation on a computer where increasing resources are used to do a decreasing amount of work. In this situation the system is said to be thrashing . Usually it refers… …   Wikipedia

  • Thrashing — The term thrashing may refer to: * Thrash (computer science), an effect of resource contention, or an extensive test of software * A severe corporal punishment * A clear victory * The dance style moshing * Threshing, a process in agriculture *… …   Wikipedia

  • National Science Foundation — Motto: Supporting Education and Research across all the fields of Science, Mathematics and Technology America s Investment in the Future Where Discoveries Begin Agency overview Formed 10 May 1950 …   Wikipedia

  • Multithreading (computer architecture) — This article describes hardware supports for multithreads. For thread in software, see Thread (computer science). Multithreading computers have hardware support to efficiently execute multiple threads. These are distinguished from multiprocessing …   Wikipedia

  • Multithreading (computer hardware) — Multithreading computers have hardware support to efficiently execute multiple threads. These are distinguished from multiprocessing systems (such as multi core systems) in that the threads must all operate in the same address space, as there is… …   Wikipedia

  • Paging — This article is about computer virtual memory. For the wireless communication devices, see Pager . Bank switching is also called paging. Page flipping is also called paging. For calling people in a public place see Public address. In computer… …   Wikipedia

  • CICS — For the Sudbury, Ontario radio station, see CICS FM. Customer Information Control System (CICS) is a transaction server that runs primarily on IBM mainframe systems under z/OS and z/VSE. CICS is a transaction manager designed for rapid, high… …   Wikipedia

  • Out of memory — in Linux 2.6.32 Out of memory (OOM) is a state of computer operation (often undesired) where no additional memory can be allocated for use by programs or the operating system. Such a system will be unable to load any additional programs and since …   Wikipedia

  • Peter J. Denning — Peter James Denning (By Louis Fabian Bachrach) Born January 6, 1942 (1942 01 06 …   Wikipedia

  • History of IBM mainframe operating systems — The history of operating systems running on IBM mainframes is a notable chapter of history of mainframe operating systems, because of IBM s long standing position as the world s largest hardware supplier of mainframe computers.Arguably the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”