Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Apple HD SC 80 does not support Asynch i/o. Keywords: Hall of Shame entry? Message-ID: <27318@ucbvax.BERKELEY.EDU> Date: 3 Jan 89 19:27:32 GMT References: <11605@dartvax.Dartmouth.EDU> <271@berlin.acss.umn.edu> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 41 1.) Since I wrote the original posting and the test program I learned that the SCSI hardware on a MacPlus, anyway, does not support any kind of interrupt mechanism. This, at first glance, would seem to make it impossible, but it doesn't really (after all, the floppies do it.): Disk drive access consists of two phases: latency, and transfer. During disk drive latency, the computer is waiting for the disk head to move to the correct track, and to wait for the correct sector to come under the disk head. During transfer, the actual data is transfered. You can't do much processing during the transfer phase, because you need the memory bus to move the data, and, on a mac without DMA, you need the CPU to move the data for you. The latency phase is another matter. Here are many milliseconds where the disk drive is silent, busy playing with itself, and mac programs are wasting their time waiting for it. A driver could easily use the time manager to poll the drive once a millisecond to see if a "seek" command has finished, giving all that seek time back to the application program, then do the actual transfer as it is done now. 2.) Some people still think a Mac is a bad unix system. It is completely inappropriate to leave asynchronous i/o to the operating system. When I am working with a program, I want _that program_ to run absolutely as fast as possible. In a multi-user operating system, it si common practise not to bother with this, but give the i/o time to other users. On a single user machine, there are no other users. 10 years ago, when I was in graduate school, there was research on implementing programming langauges that used the asynchronus i/o time to fetch head, so that programs written in these langauges never had to wait for the disk for their data: they asked for it before they needed it and kept on going. By the time they needed the data, it wa there. To do this, you _need_ asynchronous i/o. It may be that only clever programmers will use this to write superior application programs. I'm not afraid of that. I'm clever enough to compete, and I want those superior applications to use. --- David Phillip Oster --"When we replace the mouse with a pen, Arpa: oster@dewey.soe.berkeley.edu --3 button mouse fans will need saxophone Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu --lessons." - Gasee