Talk:Thrashing (computer science)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computer science  
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

Plagarism[edit]

The last two sections (cause of thrashing and limiting the effects of thrashing) appear to be copied word-for-word from the textbook Operating System Concepts (Silberschatz, Galvin, Gagne). —Preceding unsigned comment added by 72.138.253.205 (talk) 15:06, 6 April 2008 (UTC)

I've removed them both. -- The Anome (talk) 20:47, 8 March 2010 (UTC)

Engineering[edit]

Is this term commonly used to refer to work? I'm a software engineer and I often hear thrashing to mean what happens when engineers are switching between projects far too often. Since the term has its roots in our field, is it exclusive to us, or does it exist in other fields? Should it be mentioned here?

CSZero 22:10, 29 October 2006 (UTC)



IMHO, an animation of "thrashing" would be worth "a million" words. (Since "a picture is worth a 1000 words." An animation is a ~1000 pictures, thus(1000X1000=1,000,000) "a million" words.)

Permaswap[edit]

I'd like to see the term "permaswap" added to this article. It's a common way to describe the situation where the system is almost completely stalled, and the disk is going crazy. See for instance this link [1] or just do a Google search for the term. There are lots of references, but the term doesn't exist in Wikipedia. leifbk 09:26, 5 October 2007 (UTC)


Practical considerations[edit]

The advice to increase memory is in principle a good one, though on some systems I believe that this will not always solve the problem, depending on what programs are used. For example, running a virus checker over a disc drive may result in any caches being flushed, and any other program will slow down to snail's pace. This seems to be quite common in systems such as Windows XP. This is hinted at in the article, but specific details are not given. Programs which look at significant parts of storage discs, or which create large files themselves (e.g sound, video recorders), and programs which use large temporary memory or files (e.g photo manipulation programs) are more likely to cause thrashing problems than programs which only use a small amount of memory, and few files. David Martland 16:00, 17 October 2007 (UTC)

I agree with your main point -- scanning the entire disk will always make the hard-drive light stay constantly on for a long time and slow down other programs, just like a thrashing system, no matter how much memory you put in.
I have seen other programs "slow down to a snail's pace" -- but other processes seem to run only slightly slower than normal if the virus checker is given a lower "priority" (using "renice" or the "Windows Task Manager"). Can/should I add this to the "user can do" list? Or would that violate WP:NOR and/or WP:NOTHOWTO ?
Yes, scanning over data too large to fit into RAM -- if one uses the LRU page replacement algorithm -- will flush caches and fill them with useless pages -- pages that will never be read again, or at least not for a very long time.
However, better page replacement algorithms such as CLOCK-pro and adaptive replacement cache (ARC) are designed to work better than LRU by recognizing such "streaming" behavior, so they can avoid flushing other pages that will soon be needed again. Although the streaming data is technically "less recently used" than these other pages, these better page replacement algorithms (unlike LRU) use only a few page frames to hold streaming data, and all other pages in the cache are *not* flushed. --68.0.124.33 (talk) 01:36, 3 April 2009 (UTC)

Oh, man, the definition is so far off the mark![edit]

"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."

A thrash is when the same data is being repeatedly passed back and forth between two storage devices. Not some vague reference to over-consumption of any old resource.

This results in only one extra system resource being consumed - time. I guess the side effect of consuming the data channel between the two storage devices for this unwanted duration can be considered a resource too.

And when one storage device is faster then it effectively has to slow down to match the slower storage, consuming even more time.

Evanh (talk) 13:51, 28 November 2009 (UTC) gds —Preceding unsigned comment added by 116.72.180.148 (talk) 09:25, 28 February 2011 (UTC)

Disk threshing[edit]

In the UK, it seems that 'Threshing' is the correct spelling according to the OCR exam board (Computing). What I've been taught was: "Disk threshing is when the system spends more time swapping pages between memory and disk than running the program(s)." I also agree to Evanh's comment that the definition should refer to this swapping of data

Our teacher Eddie says OCR are wrong, they are the only people who spell it this way — Preceding unsigned comment added by Bradhinch (talkcontribs) 09:41, 24 September 2014 (UTC)

Did 'threshing' morph into the more obvious term 'thrashing' in American English? Thanks. Tiscando (talk) 18:00, 10 January 2012 (UTC)

No! It certainly isn't normal usage in the UK. The only people who use this term are the examiners on the OCR exam board. It is very hard to explain this, especially as they use the term consistently throughout their documentation and also in exam questions. It is not the only aspect of the OCR syllabus that is problematic. There are a number of places where the examiners use terms imprecisely or incorrectly. Charlesyoung (talk) 00:33, 28 February 2013 (UTC)

Example Code[edit]

is this a spot the difference game? because I cant spot the difference... 203.36.161.41 (talk) 22:25, 20 May 2013 (UTC)

The array indices are reversed. Mindmatrix 00:35, 21 May 2013 (UTC)
How does that reduce thrashing? --151.75.31.150 (talk) 10:23, 28 September 2013 (UTC)
The sample code assumes a row is a sequence of bytes, and a 2D array is a sequence of rows. Suppose your rows are very large, or your virtual memory page size is very small, so that each row exactly fits one page of virtual memory. If your algorithm goes row-by-row, you will visit each page of virtual memory once. On the other hand, if your algorithm goes column by column, you will visit each page many times. Morrillonline (talk) 14:27, 28 September 2013 (UTC)