| home | contents | previous | next page | send comment | send link | add bookmark |

The New Hacker's Dictionary

thud // n.

1. Yet another metasyntactic variable (see foo). It is reported that at CMU from the mid-1970s the canonical series of these was 'foo', 'bar', 'thud', 'blat'.

2. Rare term for the hash character, '#' (ASCII 0100011). See ASCII for other synonyms.

thumb // n.

The slider on a window-system scrollbar. So called because moving it allows you to browse through the contents of a text window in a way analogous to thumbing through a book.

thundering herd problem //

Scheduler thrashing. This can happen under Unix when you have a number of processes that are waiting on a single event. When that event (a connection to the web server, say) happens, every process which could possibly handle the event is awakened. In the end, only one of those processes will actually be able to do the work, but, in the meantime, all the others wake up and contend for CPU time before being put back to sleep. Thus the system thrashes briefly while a herd of processes thunders through. If this starts to happen many times per second, the performance impact can be significant.

thunk /thuhnk/ n.

1. [obs.]"A piece of coding which provides an address", according to P. Z. Ingerman, who invented thunks in 1961 as a way of binding actual parameters to their formal definitions in Algol-60 procedure calls. If a procedure is called with an expression in the place of a formal parameter, the compiler generates a thunk which computes the expression and leaves the address of the result in some standard location.

2. Later generalized into: an expression, frozen together with its environment, for later evaluation if and when needed (similar to what in techspeak is called a 'closure'). The process of unfreezing these thunks is called 'forcing'.

3. A stubroutine, in an overlay programming environment, that loads and jumps to the correct overlay. Compare trampoline.

4. People and activities scheduled in a thunklike manner. "It occurred to me the other day that I am rather accurately modeled by a thunk -- I frequently need to be forced to completion." -- paraphrased from a plan file.

Historical note: There are a couple of onomatopoeic myths circulating about the origin of this term. The most common is that it is the sound made by data hitting the stack; another holds that the sound is that of the data hitting an accumulator. Yet another suggests that it is the sound of the expression being unfrozen at argument-evaluation time. In fact, according to the inventors, it was coined after they realized (in the wee hours after hours of discussion) that the type of an argument in Algol-60 could be figured out in advance with a little compile-time thought, simplifying the evaluation machinery. In other words, it had 'already been thought of'; thus it was christened a 'thunk', which is "the past tense of 'think' at two in the morning".


| home | contents | previous | next page | send comment | send link | add bookmark |