From owner-freebsd-hackers Tue Jul 30 15:05:57 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA11698 for hackers-outgoing; Tue, 30 Jul 1996 15:05:57 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA11677 for ; Tue, 30 Jul 1996 15:05:51 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id PAA00765; Tue, 30 Jul 1996 15:00:11 -0700 From: Terry Lambert Message-Id: <199607302200.PAA00765@phaeton.artisoft.com> Subject: Re: Asynchronous IO - Posix AIO To: dchapes@zeus.leitch.com (Dave Chapeskie) Date: Tue, 30 Jul 1996 15:00:11 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199607261922.PAA01514@ale.zeus.leitch.com> from "Dave Chapeskie" at Jul 26, 96 03:22:01 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I have need of an AIO subsystem and have been thinking about how I > might do a partial Posix AIO implementation under FreeBSD. Has > anyone else given this any thoughts? > > Would this best be done via a user side library, via new system > calls, via a mix of both, etc. Any thoughts on this would be greatly > appreciated. I think the correct thing to do is create an alternate call gate and aiowait/aiocancel calls, plus kernel context records, and add a flag to each system call to indicate that it is potentially blocking or not. Then "aioread" is "read using async call gate" and "aiowrite" is "write using async call gate". The reasoning is that things other than read/write can also block, and you might want to trade the block for queue + context switch (the POSIX AIO was originally for support of SunOS LWP ALA the University of Washington paper on "SPARC Register Windows and User Space Threading"). This would also let you write "team" in one process... 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.