Talk:Thrashing (computer science)
|WikiProject Computer science|
|This page has been Transwikied to Wiktionary. The transwiki process is complete.|
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 220.127.116.11 (talk) 15:06, 6 April 2008 (UTC)
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.)
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  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)
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. --18.104.22.168 (talk) 01:36, 3 April 2009 (UTC)
Oh, man, the definition is so far off the mark!
"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.
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
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)
- 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)