Asynchronous output
System Mangler
mangler at cit-vax.Caltech.Edu
Sun Dec 21 04:33:29 AEST 1986
In article <1858 at batcomputer.tn.cornell.edu>, garry at batcomputer.UUCP writes:
> I have an application which entails computing and churning out vast
> quantities of data and, for speed, I'd like to have the I/O happening
> in parallel with the computing.
Many computations go through a "read the data, crunch it, output it"
cycle in which the crunching of one block is independent of the
crunching of another. If that's your case, use three processes.
At any given time, one is reading, another is crunching what it
just read, and one is writing. You'll get a fairly continuous
flow of data, won't have to pass around large volumes of data
(i.e. low overhead), and get a large share of the CPU.
One curious gotcha is that throughput will be substantially worse
if you run it "nice --20". Explain that, BSD scheduler wizards!
(I noticed this on 4.3bsd dump, which works in precisely this fashion).
Don Speck speck at vlsi.caltech.edu {seismo,rutgers,ames}!cit-vax!speck
More information about the Comp.unix.questions
mailing list