Xref: utzoo comp.bugs.4bsd:1735 comp.lang.c:35819 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!unisoft!greywolf From: greywolf@unisoft.UUCP (The Grey Wolf) Newsgroups: comp.bugs.4bsd,comp.lang.c Subject: Re: Complexity of reallocating storage (was users command crap) Message-ID: <3340@unisoft.UUCP> Date: 5 Feb 91 20:55:40 GMT References: <6662@exodus.Eng.Sun.COM> <15325:Jan2903:19:4991@kramden.acf.nyu.edu> <21548@yunexus.YorkU.CA> <5883:Feb102:05:4991@kramden.acf.nyu.edu> Reply-To: greywolf@unisoft.UUCP (The Grey Wolf) Organization: Foo Bar and Grill Lines: 32 In article <5883:Feb102:05:4991@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: > >To rephrase: You don't seem to know what good programming techniques >are. Tradeoffs between speed, space, and human effort are important. >Tradeoffs between ``multiple passes'' and ``single pass'' are entirely >irrelevant when they aren't reflected in speed, space, or human effort. As I'm sure someone will/has pointed out already (haven't seen it yet, but then news has strange timing problems), multiple-pass contemplation of a file is stable IFF the file is guaranteed not to be physically rearranged between passes. (Of course the same can be said of a single pass thru a file, but the window is (usually) *much* smaller). Examples where multiple passes work is on (normally) stable files, such as running them thru a compiler or running a disk thru fsck. (Of course, even there, anomalies happen...) Side issue: -- has anyone managed a single-pass fsck? That would be tricky at best, possibly disastrous. I thought for a moment that instead of doing five passes, one could use five file descriptors to handle each phase, seeing as the size of a disk partition is effectively fixed (last I checked, anyway...). But I guess the passes need to happen in a particular order... > >---Dan -- thought: I ain't so damb dumn! | Your brand new kernel just dump core on you war: Invalid argument | And fsck can't find root inode 2 | Don't worry -- be happy... ...!{ucbvax,acad,uunet,amdahl,pyramid}!unisoft!greywolf