lkml.org 
[lkml]   [1998]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Thread implementations...
On Sun, 21 Jun 1998, John Kodis wrote:

> On Sat, Jun 20, 1998 at 01:49:50PM -0700, Dean Gaudet wrote:
>
> > - let the kernel queue an event when the FD becomes ready. So rather than
> > calling poll() with a list of 100s of FDs, we tell the kernel on a per-FD
> > basis "when this is ready for read/write queue an event on this pipe, and
> > could you please hand me back this void * with it? thanks".
>
> Yow! Shades of VMS! This sounds very much like the VMS Async System
> Trap mechanism that allowed you to perform a queued IO operation using
> a call something like:
>
> status = sys$qio(
> READ_OPCODE, fd, buffer, sizeof(buffer),
> <lots of other parameters that I've long since forgotten>,
> ast_function, ast_parameter, ...);
>
> The read would get posted, and when complete the ast_function would
> get called with the ast_parameter in the context of the process that
> posted the QIO. This provided a powerful and easy-to-use method of
> dealing with async IO. It's one of the few VMS features that I wish
> Unix supported.

Yes! Essentially, the I/O completion code creates a thread on the fly,
dispatches it to the AST function, and when that function returns the
thread is destroyed. You don't have tons of waiting threads sitting
around using kernel memory to instantiate them; just a couple of longwords
in each I/O Request Packet (which has to exist anyway).

The implications could be felt throughout the I/O system, though. VMS
was designed from the beginning to make all I/O asynchronous, and if you
want synchronous I/O you follow with a SYS$WAIT() or use SYS$QIOW()
(which does the SYS$WAIT() for you). This sounds like a change that
would require much thought.

--
Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
Nothing is so dangerous as being too modern. One is apt to grow old-fashioned
quite suddenly. -- Oscar Wilde

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.175 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site