* Does UNIX do async i/o?
1994-03-11 14:43 ` Hugh McIntyre
@ 1994-03-11 19:01 ` Joseph Crowe
1994-03-11 22:38 ` Carl J Lydick
` (2 more replies)
0 siblings, 3 replies; 31+ messages in thread
From: Joseph Crowe @ 1994-03-11 19:01 UTC (permalink / raw)
In article <1994Mar11.144337.13745@inmos.co.uk>, hughm@inmos.co.uk (Hugh McIntyre) writes:
|> In article <11MAR199400234346@hearts.aces.com>, gavron@hearts.aces.com (Ehud Gavron) writes:
|> |> In article <ROCKWELL.94Mar10070553@nova.umd.edu>, rockwell@nova.umd.edu (Raul Deluth Miller) writes...
|> |> #Carl J Lydick:
|> |> #.. Unix doesn't have support asynchronous I/O...
|> |> #
|> |> #Huh? What do you mean?
|> |> #
|> |> #I can do asynchronous I/O under Unix.
|> |>
|> |> OH, you must have confused what "asynchronous" means,
|> |> because of course there is no asynchronous I/O under
|> |> Unix.
|>
|> Hmm:
|>
|> SunOS_4.1.3% man aioread
|> Reformatting page. Wait... done
|>
|> AIOREAD(3) C LIBRARY FUNCTIONS AIOREAD(3)
|>
|> NAME
|> aioread, aiowrite - asynchronous I/O operations
[man page deleted for brevity]
|> While I agree that the some people may be confusing the normal behaviour of
|> Unix write (where the data is not actually transferred to disk before the call
|> returns) with real asynchronous I/O as supported by some of the VMS system
|> services, it's not true to say that you can't do asynchronous I/O under any
|> version of Unix. The above stuff was apparently added in SunOS 4.1 - other
|> versions of Unix may or may not include the same facility.
I agree that most UNIX versions at this point do not provide async i/o
capabilities at the user level. My question is....so what? Why should the
user concern h(er|im)self with the intricacies of scatter/gather i/o at
the API level when it automatically gets handled in a hopefully optimal
way on h(er|is) behalf by the kernel and device drivers. Or am I missing
something. I remember doing scatter/gather async i/o almost twenty
years ago on the then UNIVAC 1100 mainframe. It's a nice exercise
to demonstrate what goes on at low levels. I believe that with the
addition of thread support in SVR4 ES/MP we will probably see
async i/o at the user level. I think it would make more sense in a
multiprocessor system. If I'm missing something here, I fell sure one
of the reader/contributor types in this newsgroup will let me know.
But please, the use of words like idiot and moron in lieu of calm,
reasoned debate will be piped to the blackhole device.
--
==============================================
| Joe Crowe |
| Tandem Computers Inc. |
| Internet Address:jcrowe@mpd.tandem.com |
==============================================
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-11 19:01 ` Does UNIX do async i/o? Joseph Crowe
@ 1994-03-11 22:38 ` Carl J Lydick
1994-03-12 4:03 ` Mark A Harrison
1994-03-12 3:28 ` David L. Cathey
1994-03-12 23:48 ` gezelter
2 siblings, 1 reply; 31+ messages in thread
From: Carl J Lydick @ 1994-03-11 22:38 UTC (permalink / raw)
In article <1994Mar11.190110.20289@integrity.uucp>, jcrowe@zaphodmpd.tandem.com (Joseph Crowe) writes:
= I agree that most UNIX versions at this point do not provide async i/o
=capabilities at the user level. My question is....so what? Why should the
=user concern h(er|im)self with the intricacies of scatter/gather i/o at
=the API level when it automatically gets handled in a hopefully optimal
=way on h(er|is) behalf by the kernel and device drivers. Or am I missing
=something.
You're missing the fact that doing async I/O on most Unix systems is simply
impossible. Sure, you could spawn a subprocess for each I/O request you want
to make, have each subprocess issue a synchronous I/O request, then signal the
parent when it completed. Seems like a fair amount of additional overhead to
do something that could be incorporated in the system I/O routines.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-11 19:01 ` Does UNIX do async i/o? Joseph Crowe
1994-03-11 22:38 ` Carl J Lydick
@ 1994-03-12 3:28 ` David L. Cathey
1994-03-14 18:39 ` Joseph Crowe
1994-03-12 23:48 ` gezelter
2 siblings, 1 reply; 31+ messages in thread
From: David L. Cathey @ 1994-03-12 3:28 UTC (permalink / raw)
In article <1994Mar11.190110.20289@integrity.uucp>, jcrowe@zaphodmpd.tandem.com (Joseph Crowe) writes:
> I agree that most UNIX versions at this point do not provide async i/o
> capabilities at the user level. My question is....so what? Why should the
> user concern h(er|im)self with the intricacies of scatter/gather i/o at
> the API level when it automatically gets handled in a hopefully optimal
> way on h(er|is) behalf by the kernel and device drivers. Or am I missing
> something.
You're missing something. I/O is the slowest thing you can do.
The advantage of timesharing systems give the O/S something to do (someone
elses job) while your in a wait state for an I/O to complete. In several
cases, there are many things your job could be doing rather than wait on
an I/O. It's another nethod to avoid wasting cycles. With the speed of
processors across the entire computing spectrum increasing, I/O waits are
taking larger chunks of your elapsed time. And its irritating to managers
to buy a faster machine that hardly makes a dent in elapsed time.
Asynch I/O is how to optimize your use of CPU vs. I/O. True there
is some help in the caching, buffering, but you are still stalled at
various points because an I/O request isn't done (and your return status is
really accurately reflecting reality). Asynch I/O is comparable to parallel
processing, and like parallel processing, the O/S needs help in determining
which operations are not truly idempotent or can be interleaved. Asynch
operations can be absolutely invaluable in client-server applications where
several transactions are going on concurrently.
Case history? Data analysis of 50+ data files across multiple spindles
(about 750MBytes). Analysis took over 7 hours with normal I/O. Asynch the I/O
across several spindles at once (Using RMS no less) and the elapsed time was
reduced to about 25 minutes. If you can't see that as a benefit, then you're
still missing something.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David L. Cathey |INET: davidc@montagar.lonestar.org
Montagar Software Concepts |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
NOTE: Due to circumstances beyond my control, please use the lonestar.org
address until further notice.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-11 22:38 ` Carl J Lydick
@ 1994-03-12 4:03 ` Mark A Harrison
1994-03-12 4:32 ` Carl J Lydick
` (2 more replies)
0 siblings, 3 replies; 31+ messages in thread
From: Mark A Harrison @ 1994-03-12 4:03 UTC (permalink / raw)
Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
> You're missing the fact that doing async I/O on most Unix systems is simply
> impossible. Sure, you could spawn a subprocess for each I/O request you want
> to make, have each subprocess issue a synchronous I/O request, then signal the
> parent when it completed. Seems like a fair amount of additional overhead to
> do something that could be incorporated in the system I/O routines.
Haven't you been paying attention? Do we need to repost the man pages?
These are modern times, we have THREADS these days!
--
Mark Harrison
mharriso@utdallas.edu
mharriso@spd.dsccc.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 4:03 ` Mark A Harrison
@ 1994-03-12 4:32 ` Carl J Lydick
1994-03-12 13:30 ` Raul Deluth Miller
1994-03-13 11:45 ` Mark A Harrison
1994-03-12 16:34 ` Chris Kalisiak
1994-03-13 17:57 ` David L. Cathey
2 siblings, 2 replies; 31+ messages in thread
From: Carl J Lydick @ 1994-03-12 4:32 UTC (permalink / raw)
In article <2lrev2$q4u@news.utdallas.edu>, mharriso@utdallas.edu (Mark A Harrison) writes:
=Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
=> You're missing the fact that doing async I/O on most Unix systems is simply
=> impossible. Sure, you could spawn a subprocess for each I/O request you want
=> to make, have each subprocess issue a synchronous I/O request, then signal the
=> parent when it completed. Seems like a fair amount of additional overhead to
=> do something that could be incorporated in the system I/O routines.
=
=Haven't you been paying attention? Do we need to repost the man pages?
=These are modern times, we have THREADS these days!
Some do. A lot don't.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 4:32 ` Carl J Lydick
@ 1994-03-12 13:30 ` Raul Deluth Miller
1994-03-12 16:59 ` Carl J Lydick
` (2 more replies)
1994-03-13 11:45 ` Mark A Harrison
1 sibling, 3 replies; 31+ messages in thread
From: Raul Deluth Miller @ 1994-03-12 13:30 UTC (permalink / raw)
Carl J Lydick:
=> You're missing the fact that doing async I/O on most Unix
=> systems is simply impossible. Sure, you could spawn a
=> subprocess for each I/O request you want to make, have each
=> subprocess issue a synchronous I/O request, then signal the
=> parent when it completed. Seems like a fair amount of
=> additional overhead to do something that could be incorporated
=> in the system I/O routines.
Mark A Harrison:
=Haven't you been paying attention? Do we need to repost the man
=pages? These are modern times, we have THREADS these days!
Carl J Lydick:
Some do. A lot don't.
Hmm.. user level threads can be implemented on any system where
there's a user that has enough of an understanding of the underlying
machine to save machine state. But, that's just an aside.
On those unix systems where "true asynch I/O" or "true [kernel]
threads" haven't been implemented, it's possible to achieve most of
the benefits of asynch i/o using select (synchronous multiplexed i/o)
in conjunction with non-blocking (polling) i/o. You do have to do a
bit of queue management, but that's easy compared to issues like race
conditions [which don't go away when you go to kernel support for
asynch i/o]. But that's still an aside.
I've still not seen a discussion of the VMS library design where, in
essence, all VMS i/o is done with what would be an ioctl() under unix,
and there's all these useless arguments to be specified even in simple
cases where they're not needed. Seems to me that VMS is providing a
low-level mechanism here, with all that implies.
Which brings me back to my judgement that Unix provides a lot more
("higher level") modularity than VMS. Or, most of the benefits of VMS
have to do with it providing a lower level machine interface.
[Flashback to the "assembly" vs "high level language" wars of
yesteryear.]
Raul D. Miller
<rockwell@nova.umd.edu>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 4:03 ` Mark A Harrison
1994-03-12 4:32 ` Carl J Lydick
@ 1994-03-12 16:34 ` Chris Kalisiak
1994-03-13 11:50 ` Mark A Harrison
1994-03-13 17:57 ` David L. Cathey
2 siblings, 1 reply; 31+ messages in thread
From: Chris Kalisiak @ 1994-03-12 16:34 UTC (permalink / raw)
Mark A Harrison (mharriso@utdallas.edu) wrote:
>Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
>> You're missing the fact that doing async I/O on most Unix systems is simply
>> impossible. Sure, you could spawn a subprocess for each I/O request you want
>> to make, have each subprocess issue a synchronous I/O request, then signal the
>> parent when it completed. Seems like a fair amount of additional overhead to
>> do something that could be incorporated in the system I/O routines.
>Haven't you been paying attention? Do we need to repost the man pages?
>These are modern times, we have THREADS these days!
Yes, so does VMS! Even with threads you still have the overhead of
creating a new thread to do the I/O. The fact remains that you
"have to jump through hoops" (as someone said in reference to VMS
a little while back) to do asynch I/O because it is not built into
the system.
Chris
--
Chris Kalisiak |"Pound for pound, lame puns are your best entertainment
kalisiak@cs.buffalo.edu | value." -- Gogo Dodo, Tiny Toon Adventures
Tel/Fax:(716)692-5128/695-8481 |"Cocaine is God's way of telling you you have
I'm a student; I don't speak for UB.| way too much money." -- Sting, The Police
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 13:30 ` Raul Deluth Miller
@ 1994-03-12 16:59 ` Carl J Lydick
1994-03-13 12:00 ` Mark A Harrison
1994-03-12 20:24 ` Bryan J Jensen
1994-03-13 11:22 ` Casper H.S. Dik
2 siblings, 1 reply; 31+ messages in thread
From: Carl J Lydick @ 1994-03-12 16:59 UTC (permalink / raw)
In article <ROCKWELL.94Mar12083003@nova.umd.edu>, rockwell@nova.umd.edu (Raul Deluth Miller) writes:
=I've still not seen a discussion of the VMS library design where, in
=essence, all VMS i/o is done with what would be an ioctl() under unix,
Under VMS, if you want to do I/O, you call SYS$QIO. You don't go browsing
through the manuals to find out what they're calling the routines for various
types of I/O in this particular version.
=and there's all these useless arguments to be specified even in simple
=cases where they're not needed.
Gee. It's really an incredible amount of trouble to type in:
#define qread(chan, buff, count, iosb) \
SYS$QIOW(0, chan, IO$_READVBLK, iosb, 0, 0, buff, count, 0, 0, 0, 0)
#define qwrite(chan, buff, count, iosb) \
SYS$QIOW(0, chan, IO$_WRITEVBLK, iosb, 0, 0, buff, count, 0, 0, 0, 0)
in an include file and include it in programs where you're going to use
SYS$QIOW only for synchronous virtual I/O. So much more difficult than trying
to coerce Unix into doing anything BUT synchronous virtual I/O.
=Seems to me that VMS is providing a
=low-level mechanism here, with all that implies.
=
=Which brings me back to my judgement that Unix provides a lot more
=("higher level") modularity than VMS. Or, most of the benefits of VMS
=have to do with it providing a lower level machine interface.
=[Flashback to the "assembly" vs "high level language" wars of
=yesteryear.]
Hmmm. You just can't please some people: SYS$QIO is too low level, RMS is too
high-level. SHEESH!
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 13:30 ` Raul Deluth Miller
1994-03-12 16:59 ` Carl J Lydick
@ 1994-03-12 20:24 ` Bryan J Jensen
1994-03-12 20:44 ` John Hascall
` (2 more replies)
1994-03-13 11:22 ` Casper H.S. Dik
2 siblings, 3 replies; 31+ messages in thread
From: Bryan J Jensen @ 1994-03-12 20:24 UTC (permalink / raw)
In article <ROCKWELL.94Mar12083003@nova.umd.edu>,
rockwell@nova.umd.edu (Raul Deluth Miller) writes:
>On those unix systems where "true asynch I/O" or "true [kernel]
>threads" haven't been implemented, it's possible to achieve most of
>the benefits of asynch i/o using select (synchronous multiplexed i/o)
>in conjunction with non-blocking (polling) i/o.
I recently had the opportunity to program under the toy version of
UNIX - Linux. Prior to that my experience was limited to VMS. I
used "select" and non-blocking I/O to manage my terminal and network
I/O. It worked well.
Then I found I had to create some processes. UNIX requires the
parent process to do a "wait()" on the child process before it will
terminate a child. Since I can't wait around for processes to
finish, I need some mechanism to let me know when a process
terminates so that I can safely do the wait to complete its rundown.
Unfortunately, "select" may only be used to wait for certain types of
I/O to complete - it can't be used to wait for child process termination.
"wait" can be used to wait for any process to complete, but it can't
be used to wait for I/O to complete.
My suspicion is that I can use signals, and pause till either a
process completes or I/O completes. However, I'm still searching
for a sufficiently complete description of UNIX to find out how.
Linux man pages seem quite inadequate for this, and Sun only somewhat
better.
VMS seems to win in this situation because various synchronization
methods were originally included with VMS (event flags, async traps,
and hibernate). As a result, pretty much everything uses one or more
of these facilities (with some notable exceptions - queue manipulation,
UCX name resolver, and RMS file opens).
UNIX, on the other hand, patched async facilities in later, which seems
to be in keeping with the general haphazard nature of UNIX (that's
not really a criticism - diversity is politically correct these days).
>You do have to do a bit of queue management, but that's easy compared
>to issues like race conditions [which don't go away when you go to
>kernel support for asynch i/o]. But that's still an aside.
Yup, I did find the wait queue management easy under UNIX.
An aside on races, I was amused by the following comment in Linux (tty_io.c):
* This is so ripe with races that you should *really* not touch this
* unless you know exactly what you are doing. All the changes have to be
* made atomically, or there may be incorrect pointers all over the place.
Judging by all the bugs in Linux, I'd say the authors should never have
written the code to begin with. Often times, a little forethought can
eliminate most possibilities for races, particularly in something like
an operating system where a bit of extra overhead or response delays
are not critical. An understanding of what's going on while coding
can eliminate most of the other race conditions. I suspect the Linux
authors skipped the forethought and have been slow to understand what
they're doing.
>I've still not seen a discussion of the VMS library design where, in
>essence, all VMS i/o is done with what would be an ioctl() under unix,
>and there's all these useless arguments to be specified even in simple
>cases where they're not needed. Seems to me that VMS is providing a
>low-level mechanism here, with all that implies.
I do agree that VMS system calls are painful, taking away some of the
joy of programming. But then, my first experience was TOPS-10, which
has far more friendly system calls then UNIX.
I think the one thing that hurts most under VMS is that all system calls
return a status code. As a result, programmers feel obligated to test
for errors. Contrast that with UNIX where errors are rarely checked,
with the resulting frequent core dumps on null pointers. So it's
really just a tradeoff between developement time and reliability.
Actually, I think TOPS-20 had the right idea. System calls return
error status, but if you don't put in a check for them, the operating
system will bomb your program with an appropriate error.
>Which brings me back to my judgement that Unix provides a lot more
>("higher level") modularity than VMS. Or, most of the benefits of VMS
>have to do with it providing a lower level machine interface.
>[Flashback to the "assembly" vs "high level language" wars of
>yesteryear.]
It's also fair to see that VMS provides a higher level interface then
UNIX. RMS' indexed files are a good example of that.
I don't think you meant to use the word modularity though - VMS
kernel provided support is the uncontested winner in modularity.
But that's another story.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 20:24 ` Bryan J Jensen
@ 1994-03-12 20:44 ` John Hascall
1994-03-13 12:22 ` Mark A Harrison
1994-03-14 21:11 ` Karl Strickland
2 siblings, 0 replies; 31+ messages in thread
From: John Hascall @ 1994-03-12 20:44 UTC (permalink / raw)
Bryan J Jensen <bjj@ECLD.PSU.EDU> wrote:
}Then I found I had to create some processes. UNIX requires the
}parent process to do a "wait()" on the child process before it will
}terminate a child. Since I can't wait around for processes to
}finish, I need some mechanism to let me know when a process
}terminates so that I can safely do the wait to complete its rundown.
oldfunc = signal(SIGCHLD, functiontocall);
or perhaps you would prefer an occasional:
pid = wait3(&exit_status_var, WNOHANG, &resource_usage_var)
John
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-11 19:01 ` Does UNIX do async i/o? Joseph Crowe
1994-03-11 22:38 ` Carl J Lydick
1994-03-12 3:28 ` David L. Cathey
@ 1994-03-12 23:48 ` gezelter
1994-03-14 19:40 ` Brad Daniels
2 siblings, 1 reply; 31+ messages in thread
From: gezelter @ 1994-03-12 23:48 UTC (permalink / raw)
In article <1994Mar11.190110.20289@integrity.uucp>, jcrowe@zaphodmpd.tandem.com (Joseph Crowe) writes:
>
> ... Citations from earlier postings deleted ...
>
> I agree that most UNIX versions at this point do not provide async i/o
> capabilities at the user level. My question is....so what? Why should the
> user concern h(er|im)self with the intricacies of scatter/gather i/o at
> the API level when it automatically gets handled in a hopefully optimal
> way on h(er|is) behalf by the kernel and device drivers. Or am I missing
> something. I remember doing scatter/gather async i/o almost twenty
> years ago on the then UNIVAC 1100 mainframe. It's a nice exercise
> to demonstrate what goes on at low levels. I believe that with the
> addition of thread support in SVR4 ES/MP we will probably see
> async i/o at the user level. I think it would make more sense in a
> multiprocessor system. If I'm missing something here, I fell sure one
> of the reader/contributor types in this newsgroup will let me know.
> But please, the use of words like idiot and moron in lieu of calm,
> reasoned debate will be piped to the blackhole device.
> --
> ==============================================
> | Joe Crowe |
> | Tandem Computers Inc. |
> | Internet Address:jcrowe@mpd.tandem.com |
> ==============================================
--
Joe,
The point of asynchronous IO is not scatter gather, although, in
a sense, you could use asynchronous IO to implement a scatter
gather scheme.
The point of asynchronous event is situations where you have
multiple simultaneous activities proceeding. For example,
consider a process which has an outstanding terminal IO, a
network link to manage, and a real-time device to control. The
sequence of event completions (and possible exceptions) on the
different devices is unpredictable. On OpenVMS, the best way to
implement this is through the $QIO system service, using AST
routines to receive control when each particular operation
complete (alternatively, one could use DECthreads to implement
the same functionality).
If you used blocking IO, then you would not notice anything wrond
with your network link until the realtime IO or terminal
operation completed. Programs which use synchronous (blocking) IO
in such situations tend to fall victim to the "Printer out of
paper" catastrophe, where the entire system comes to a screaching
halt because the console printer ran out of paper.
I hope that this explanation has been helpful. If I have been
unclear, or if I can be of further assistance, please feel free
to contact me via Email or phone.
- Bob
+--------------------------------------------------------------------------+
| Robert "Bob" Gezelter E-Mail: gezelter@rlgsc.com |
| Robert Gezelter Software Consultant Voice: +1 718 463 1079 |
| 35-20 167th Street, Suite 215 Fax: (on Request) |
| Flushing, New York 11358-1731 |
| United States of America |
+--------------------------------------------------------------------------+
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 13:30 ` Raul Deluth Miller
1994-03-12 16:59 ` Carl J Lydick
1994-03-12 20:24 ` Bryan J Jensen
@ 1994-03-13 11:22 ` Casper H.S. Dik
2 siblings, 0 replies; 31+ messages in thread
From: Casper H.S. Dik @ 1994-03-13 11:22 UTC (permalink / raw)
rockwell@nova.umd.edu (Raul Deluth Miller) writes:
>Hmm.. user level threads can be implemented on any system where
>there's a user that has enough of an understanding of the underlying
>machine to save machine state. But, that's just an aside.
There's a big difference between threads with kernel support and
threads exclusively in user mode. User mode threads will not
be running on different processors, will block if one thread gets
a page fault, will block while one does I/O, etc.
>On those unix systems where "true asynch I/O" or "true [kernel]
>threads" haven't been implemented, it's possible to achieve most of
>the benefits of asynch i/o using select (synchronous multiplexed i/o)
>in conjunction with non-blocking (polling) i/o. You do have to do a
>bit of queue management, but that's easy compared to issues like race
>conditions [which don't go away when you go to kernel support for
>asynch i/o]. But that's still an aside.
That isn't true for disk I/O. For asynch disk I/O you need kernel threads
or kernel asynch I/O.
Modern Unixes have one or both of kernel threads or asynch I/O.
Casper
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 4:32 ` Carl J Lydick
1994-03-12 13:30 ` Raul Deluth Miller
@ 1994-03-13 11:45 ` Mark A Harrison
1994-03-13 18:34 ` David L. Cathey
1994-03-14 7:39 ` gleason
1 sibling, 2 replies; 31+ messages in thread
From: Mark A Harrison @ 1994-03-13 11:45 UTC (permalink / raw)
Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
> In article <2lrev2$q4u@news.utdallas.edu>, mharriso@utdallas.edu (Mark A Harrison) writes:
> =Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
> => You're missing the fact that doing async I/O on most Unix systems is simply
> => impossible. Sure, you could spawn a subprocess for each I/O request you want
> => to make, have each subprocess issue a synchronous I/O request, then signal the
> => parent when it completed. Seems like a fair amount of additional overhead to
> => do something that could be incorporated in the system I/O routines.
> =
> =Haven't you been paying attention? Do we need to repost the man pages?
> =These are modern times, we have THREADS these days!
> Some do. A lot don't.
True, but not very relevant. If you're in a position where you need
the extra of using asynch. I/O, you are probably in a position where
you can use one of the modern boxes that support asynch. I/O.
("Gentlemen, we need the highest throughput possible. Should we use
our PDP-11 or our 3B2?")
--
Mark Harrison
mharriso@utdallas.edu
mharriso@spd.dsccc.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 16:34 ` Chris Kalisiak
@ 1994-03-13 11:50 ` Mark A Harrison
0 siblings, 0 replies; 31+ messages in thread
From: Mark A Harrison @ 1994-03-13 11:50 UTC (permalink / raw)
Chris Kalisiak (kalisiak@cs.buffalo.edu) wrote:
> Mark A Harrison (mharriso@utdallas.edu) wrote:
> Yes, so does VMS! Even with threads you still have the overhead of
> creating a new thread to do the I/O.
Of course VMS has threads... It would be silly to go to the trouble
to support something like async I/O and not support threads as well!
> The fact remains that you
> "have to jump through hoops" (as someone said in reference to VMS
> a little while back) to do asynch I/O because it is not built into
> the system.
Sorry, but the whole point is that on systems that support
asynch I/O, asynch I/O is built into the system. You just
don't have to go to the trouble of using it if you don't
need it.
--
Mark Harrison
mharriso@utdallas.edu
mharriso@spd.dsccc.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 16:59 ` Carl J Lydick
@ 1994-03-13 12:00 ` Mark A Harrison
0 siblings, 0 replies; 31+ messages in thread
From: Mark A Harrison @ 1994-03-13 12:00 UTC (permalink / raw)
Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
> Under VMS, if you want to do I/O, you call SYS$QIO. You don't go browsing
> through the manuals to find out what they're calling the routines for various
> types of I/O in this particular version.
This is starting to stray really far afield. This is similar to the
debates we used to have with regards to hll's vs assembler. One of
the arguments consistently made by the assembler afficianados was
the ease of access to the OS: set your registers and control
blocks, and vector to the OS.
How simple, only one entrance point!
(MS-DOS copied this style of access, I believe.)
> Gee. It's really an incredible amount of trouble to type in:
> #define qread(chan, buff, count, iosb) \
> SYS$QIOW(0, chan, IO$_READVBLK, iosb, 0, 0, buff, count, 0, 0, 0, 0)
> #define qwrite(chan, buff, count, iosb) \
> SYS$QIOW(0, chan, IO$_WRITEVBLK, iosb, 0, 0, buff, count, 0, 0, 0, 0)
> in an include file and include it in programs where you're going to use
> SYS$QIOW only for synchronous virtual I/O.
Sure, it's easy to TYPE.
> So much more difficult than trying
> to coerce Unix into doing anything BUT synchronous virtual I/O.
You don't *coerce* it, you just make the asynch I/O calls. I'm
assuming you're still discussing a Unix capable of async I/O.
> Hmmm. You just can't please some people: SYS$QIO is too low level, RMS is too
> high-level. SHEESH!
That's the problem... it needs to have something that's "just right!" ;-)
--
Mark Harrison
mharriso@utdallas.edu
mharriso@spd.dsccc.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 20:24 ` Bryan J Jensen
1994-03-12 20:44 ` John Hascall
@ 1994-03-13 12:22 ` Mark A Harrison
1994-03-14 21:11 ` Karl Strickland
2 siblings, 0 replies; 31+ messages in thread
From: Mark A Harrison @ 1994-03-13 12:22 UTC (permalink / raw)
Bryan J Jensen (bjj@ECLD.PSU.EDU) wrote:
> Then I found I had to create some processes. UNIX requires the
> parent process to do a "wait()" on the child process before it will
> terminate a child. Since I can't wait around for processes to
> finish, I need some mechanism to let me know when a process
> terminates so that I can safely do the wait to complete its rundown.
Try a SIGCHLD... details are in just about any unix programming
book, if you can't find it in the man page. Here's a handy
tip: grep can be used as a nice indexing tool in the man
page directories. (flame protection -- It's also in the SUNOS master
index, under both "process" and "termination"). Here's the
relevant information:
If the parent process of the calling process is executing a
wait() or waitpid(), or is interested in the SIGCHLD signal,
then it is notified of the calling process's termination and
the low-order eight bits of status are made available to it
(see wait(2V)).
> Unfortunately, "select" may only be used to wait for certain types of
> I/O to complete - it can't be used to wait for child process termination.
> "wait" can be used to wait for any process to complete, but it can't
> be used to wait for I/O to complete.
That's because I/O and processes are two different things.
> UNIX, on the other hand, patched async facilities in later, which seems
> to be in keeping with the general haphazard nature of UNIX (that's
> not really a criticism - diversity is politically correct these days).
That's one of the reasons Unix has succeeded against all odds over
the past 25 years. It adapts. (TCP/IP has had the same characteristics.)
> I think the one thing that hurts most under VMS is that all system calls
> return a status code. As a result, programmers feel obligated to test
> for errors. Contrast that with UNIX where errors are rarely checked,
> with the resulting frequent core dumps on null pointers. So it's
> really just a tradeoff between developement time and reliability.
This is a bit of an ad hominem: VMS returns error codes and VMS
programmers feel obligated to check these codes, Unix returns
error codes and Unix programmers rarely check error codes.
Disclaimer: I'm so picky that I even check the return code
from printf().
--
Mark Harrison
mharriso@utdallas.edu
mharriso@spd.dsccc.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 4:03 ` Mark A Harrison
1994-03-12 4:32 ` Carl J Lydick
1994-03-12 16:34 ` Chris Kalisiak
@ 1994-03-13 17:57 ` David L. Cathey
1994-03-15 22:14 ` Mark A Harrison
2 siblings, 1 reply; 31+ messages in thread
From: David L. Cathey @ 1994-03-13 17:57 UTC (permalink / raw)
In article <2lrev2$q4u@news.utdallas.edu>, mharriso@utdallas.edu (Mark A Harrison) writes:
> Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
>> You're missing the fact that doing async I/O on most Unix systems is simply
>> impossible. Sure, you could spawn a subprocess for each I/O request you want
>> to make, have each subprocess issue a synchronous I/O request, then signal the
>> parent when it completed. Seems like a fair amount of additional overhead to
>> do something that could be incorporated in the system I/O routines.
>
> Haven't you been paying attention? Do we need to repost the man pages?
> These are modern times, we have THREADS these days!
But VMS has had asynch functionality for over a decade. And not
every Unix has threads or asynch I/O calls yet. It's in *your* man pages,
but not all Unixes man pages...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David L. Cathey |INET: davidc@montagar.lonestar.org
Montagar Software Concepts |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
NOTE: Due to circumstances beyond my control, please use the lonestar.org
address until further notice.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-13 11:45 ` Mark A Harrison
@ 1994-03-13 18:34 ` David L. Cathey
1994-03-15 12:04 ` Anders Rolff
1994-03-14 7:39 ` gleason
1 sibling, 1 reply; 31+ messages in thread
From: David L. Cathey @ 1994-03-13 18:34 UTC (permalink / raw)
In article <2luud9$47t@news.utdallas.edu>, mharriso@utdallas.edu (Mark A Harrison) writes:
> Carl J Lydick (carl@SOL1.GPS.CALTECH.EDU) wrote:
>> =Haven't you been paying attention? Do we need to repost the man pages?
>> =These are modern times, we have THREADS these days!
>
>> Some do. A lot don't.
>
> True, but not very relevant. If you're in a position where you need
> the extra of using asynch. I/O, you are probably in a position where
> you can use one of the modern boxes that support asynch. I/O.
Actually, for a business it is very relevant. Needing asynch I/O
and it is not provided by my current Unix vendor means that I have to go
out and buy another CPU and O/S from another Unix vendor. And maybe another
license to run my database on it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David L. Cathey |INET: davidc@montagar.lonestar.org
Montagar Software Concepts |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
NOTE: Due to circumstances beyond my control, please use the lonestar.org
address until further notice.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-13 11:45 ` Mark A Harrison
1994-03-13 18:34 ` David L. Cathey
@ 1994-03-14 7:39 ` gleason
1 sibling, 0 replies; 31+ messages in thread
From: gleason @ 1994-03-14 7:39 UTC (permalink / raw)
In article <2luud9$47t@news.utdallas.edu>, mharriso@utdallas.edu (Mark A Harrison) writes:
>
> ("Gentlemen, we need the highest throughput possible. Should we use
> our PDP-11 or our 3B2?")
>
Use the PDP-11...it'll run RSX, and it has asynch IO ;-)
Lee K. Gleason N5ZMR
Control-G Consultants
gleason@mwk.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 3:28 ` David L. Cathey
@ 1994-03-14 18:39 ` Joseph Crowe
1994-03-14 22:05 ` Carl J Lydick
0 siblings, 1 reply; 31+ messages in thread
From: Joseph Crowe @ 1994-03-14 18:39 UTC (permalink / raw)
In article <1994Mar11.222806.18797@avatar.montagar.com>, davidc@avatar.montagar.com (David L. Cathey) writes:
|> In article <1994Mar11.190110.20289@integrity.uucp>, jcrowe@zaphodmpd.tandem.com (Joseph Crowe) writes:
|> > I agree that most UNIX versions at this point do not provide async i/o
|> > capabilities at the user level. My question is....so what? Why should the
|> > user concern h(er|im)self with the intricacies of scatter/gather i/o at
|> > the API level when it automatically gets handled in a hopefully optimal
|> > way on h(er|is) behalf by the kernel and device drivers. Or am I missing
|> > something.
|>
|> You're missing something. I/O is the slowest thing you can do.
|> The advantage of timesharing systems give the O/S something to do (someone
|> elses job) while your in a wait state for an I/O to complete. In several
|> cases, there are many things your job could be doing rather than wait on
|> an I/O. It's another nethod to avoid wasting cycles. With the speed of
|> processors across the entire computing spectrum increasing, I/O waits are
|> taking larger chunks of your elapsed time. And its irritating to managers
|> to buy a faster machine that hardly makes a dent in elapsed time.
|>
|> Asynch I/O is how to optimize your use of CPU vs. I/O. True there
|> is some help in the caching, buffering, but you are still stalled at
|> various points because an I/O request isn't done (and your return status is
|> really accurately reflecting reality). Asynch I/O is comparable to parallel
|> processing, and like parallel processing, the O/S needs help in determining
|> which operations are not truly idempotent or can be interleaved. Asynch
|> operations can be absolutely invaluable in client-server applications where
|> several transactions are going on concurrently.
|>
|> Case history? Data analysis of 50+ data files across multiple spindles
|> (about 750MBytes). Analysis took over 7 hours with normal I/O. Asynch the I/O
|> across several spindles at once (Using RMS no less) and the elapsed time was
|> reduced to about 25 minutes. If you can't see that as a benefit, then you're
|> still missing something.
As of an earlier reply, I admit seeing the uses of async i/o....but in your example
above, you reduce the impact of i/o waits for the individual application but at
what impact to the timesharing nature of the machine? When the first realtime
variants of UNIX came to market, I began to wonder whether it made sense to
use a "general purpose" OS for a particular paradigm. This is just a throw it
out for general discussion point. I'm not placing any relative value on UNIX,
VMS or any other OS but let's kick off a new direction. For a general purpose
multi-processor system, when you support realtime type of applications at the
highest priority, does the timesharing application have to suffer? I believe it
does.
|>
|> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|> David L. Cathey |INET: davidc@montagar.lonestar.org
|> Montagar Software Concepts |UUCP: ...!montagar!davidc
|> P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
|> NOTE: Due to circumstances beyond my control, please use the lonestar.org
|> address until further notice.
--
==============================================
| Joe Crowe |
| Tandem Computers Inc. |
| Internet Address:jcrowe@mpd.tandem.com |
==============================================
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 23:48 ` gezelter
@ 1994-03-14 19:40 ` Brad Daniels
0 siblings, 0 replies; 31+ messages in thread
From: Brad Daniels @ 1994-03-14 19:40 UTC (permalink / raw)
In article <1994Mar12.184813.513@rlgsc.com>, <gezelter@rlgsc.com> wrote:
...
>The point of asynchronous event is situations where you have
>multiple simultaneous activities proceeding. For example,
>consider a process which has an outstanding terminal IO, a
>network link to manage, and a real-time device to control. The
>sequence of event completions (and possible exceptions) on the
>different devices is unpredictable. On OpenVMS, the best way to
>implement this is through the $QIO system service, using AST
>routines to receive control when each particular operation
>complete (alternatively, one could use DECthreads to implement
>the same functionality).
I haven't really been following this whole flame fest, but the new topic
caught my attention. Forgive me if I misunderstand the capabilitiy being
requested here. POSIX does provide non-blocking I/O. You can set a file
to be non-blocking using fcntl with an O_NONBLOCK parameter. You can also
set it to send your process a SIGIO signal when I/O completes. You can
also use select() with any file to determine whether a read or write would
block. The only thing which is tough to implement is the equivalent of
a read completion AST. However, on systems which support POSIX threads,
the effect of a read completion AST can be achieved much more easily by
using blocking I/O in another thread. On OSF/1, this approach is very
efficient, while on some other platforms, it is usually actually implemented
using select().
- Brad
------------------------------------------------------------------------
+ Brad Daniels | "Let others praise ancient times; +
+ Biles and Associates | I am glad I was born in these." +
+ These are my views, not B&A's | - Ovid (43 B.C. - 17 A.D.) +
------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-12 20:24 ` Bryan J Jensen
1994-03-12 20:44 ` John Hascall
1994-03-13 12:22 ` Mark A Harrison
@ 1994-03-14 21:11 ` Karl Strickland
1994-03-15 16:42 ` David L. Cathey
2 siblings, 1 reply; 31+ messages in thread
From: Karl Strickland @ 1994-03-14 21:11 UTC (permalink / raw)
In article <2lt8e4$ia2@genesis.ait.psu.edu> bjj@ECLD.PSU.EDU (Bryan J Jensen) writes:
> My suspicion is that I can use signals, and pause till either a
> process completes or I/O completes. However, I'm still searching
> for a sufficiently complete description of UNIX to find out how.
> Linux man pages seem quite inadequate for this, and Sun only somewhat
> better.
Catch SIGCHLD and do your wait(2). Its hardly fair to flame UN*X
just because you dont know what you're doing.
> An aside on races, I was amused by the following comment in Linux (tty_io.c):
>
> * This is so ripe with races that you should *really* not touch this
> * unless you know exactly what you are doing. All the changes have to be
> * made atomically, or there may be incorrect pointers all over the place.
>
> Judging by all the bugs in Linux, I'd say the authors should never have
> written the code to begin with. Often times, a little forethought can
What qualifies you to say that? Have you written something better?
> eliminate most possibilities for races, particularly in something like
> an operating system where a bit of extra overhead or response delays
> are not critical. An understanding of what's going on while coding
> can eliminate most of the other race conditions. I suspect the Linux
> authors skipped the forethought and have been slow to understand what
> they're doing.
Maybe they should have contracted you to write the kernel eh? (When
you've figured out SIGCHLD that is).
> I do agree that VMS system calls are painful, taking away some of the
> joy of programming. But then, my first experience was TOPS-10, which
> has far more friendly system calls then UNIX.
If you think its joyfull not to check return codes, you shouldnt be
programming at all.
> I think the one thing that hurts most under VMS is that all system calls
> return a status code. As a result, programmers feel obligated to test
Yawn, all OS's return errors for their system calls - VMS is not special.
> for errors. Contrast that with UNIX where errors are rarely checked,
> with the resulting frequent core dumps on null pointers. So it's
> really just a tradeoff between developement time and reliability.
yea yea, never seen an ACCVIO under VMS? You can write bad programs under
any OS.
> It's also fair to see that VMS provides a higher level interface then
> UNIX. RMS' indexed files are a good example of that.
Most UNIX's come with libraries for indexed files too. Who needs/wants
that shit in the kernel anyway?
> I don't think you meant to use the word modularity though - VMS
> kernel provided support is the uncontested winner in modularity.
> But that's another story.
And its changing.
--
------------------------------------------+-----------------------------------
Posted using GNUS 4.1 on FreeBSD 1.1-BETA | Karl Strickland
PGP 2.3a Public Key Available. | Internet: karl@bagpuss.demon.co.uk
"VI. THE SHELL" - BSD PS2:1-9 :-) | or: karl%mvax@bagpuss.demon.co.uk
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-14 18:39 ` Joseph Crowe
@ 1994-03-14 22:05 ` Carl J Lydick
0 siblings, 0 replies; 31+ messages in thread
From: Carl J Lydick @ 1994-03-14 22:05 UTC (permalink / raw)
In article <1994Mar14.183954.21481@integrity.uucp>, jcrowe@mpd.tandem.com (Joseph Crowe) writes:
= As of an earlier reply, I admit seeing the uses of async i/o....but in your example
=above, you reduce the impact of i/o waits for the individual application but at
=what impact to the timesharing nature of the machine?
Well, that depends, of course, on whether other jobs were competing for the
same resources. Hell, if you want to make sure that no job ever competes
with another job, why not just go back to batch processing?
=When the first realtime
=variants of UNIX came to market, I began to wonder whether it made sense to
=use a "general purpose" OS for a particular paradigm. This is just a throw it
=out for general discussion point. I'm not placing any relative value on UNIX,
=VMS or any other OS but let's kick off a new direction. For a general purpose
=multi-processor system, when you support realtime type of applications at the
=highest priority, does the timesharing application have to suffer? I believe it
=does.
Your above paragraph appears to be a complete non sequitur. Nothing was said
of "realtime applications." The job discussed was no more a real-time
application than you would have had had you spawned several subprocess, each
doing I/O to one of the devices in the job, and one subprocess that spent as
much of its time compute-bound as did the original program.
Again we see someone bitching because something works right.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-13 18:34 ` David L. Cathey
@ 1994-03-15 12:04 ` Anders Rolff
1994-03-16 4:58 ` David L. Cathey
0 siblings, 1 reply; 31+ messages in thread
From: Anders Rolff @ 1994-03-15 12:04 UTC (permalink / raw)
In article <1994Mar13.133421.18811@avatar.montagar.com> davidc@avatar.montagar.com (David L. Cathey) writes:
Actually, for a business it is very relevant. Needing asynch I/O
and it is not provided by my current Unix vendor means that I have to go
out and buy another CPU and O/S from another Unix vendor. And maybe another
license to run my database on it.
Hey, look at it from the bright side. These days, most Unix systems _actually_
support the concept of upgrades. You don't have to install the system from
scratch every time a new release is out.
Anders.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-14 21:11 ` Karl Strickland
@ 1994-03-15 16:42 ` David L. Cathey
1994-03-17 0:44 ` Raul Deluth Miller
[not found] ` <bellamy-180394120752@test1.commerce.uq.oz.au>
0 siblings, 2 replies; 31+ messages in thread
From: David L. Cathey @ 1994-03-15 16:42 UTC (permalink / raw)
In article <KARL.94Mar14211116@bagpuss.demon.co.uk>, karl@bagpuss.demon.co.uk (Karl Strickland) writes:
> In article <2lt8e4$ia2@genesis.ait.psu.edu> bjj@ECLD.PSU.EDU (Bryan J Jensen) writes:
>> An aside on races, I was amused by the following comment in Linux (tty_io.c):
>>
>> * This is so ripe with races that you should *really* not touch this
>> * unless you know exactly what you are doing. All the changes have to be
>> * made atomically, or there may be incorrect pointers all over the place.
>>
>> Judging by all the bugs in Linux, I'd say the authors should never have
>> written the code to begin with. Often times, a little forethought can
>
> What qualifies you to say that? Have you written something better?
Seems to me that if it's full of bugs, it could have been written
better. Perhaps a better design of interfaces could have been done to
reduce the impact of race conditions. Whether or not he could write something
better does not discredit that Linux is full of bugs and possibly should
have been written by someone else. However, since Linux is free, you get
what you pay for so why bitch about it here.
>> I do agree that VMS system calls are painful, taking away some of the
>> joy of programming. But then, my first experience was TOPS-10, which
>> has far more friendly system calls then UNIX.
>
> If you think its joyfull not to check return codes, you shouldnt be
> programming at all.
Good point...
>> I think the one thing that hurts most under VMS is that all system calls
>> return a status code. As a result, programmers feel obligated to test
>
> Yawn, all OS's return errors for their system calls - VMS is not special.
>
>> for errors. Contrast that with UNIX where errors are rarely checked,
>> with the resulting frequent core dumps on null pointers. So it's
>> really just a tradeoff between developement time and reliability.
>
> yea yea, never seen an ACCVIO under VMS? You can write bad programs under
> any OS.
True! However, I've found that it's even easier to write them
in C compared to other languages with stronger typing, bounds checking, etc
(at least as far as hidden ACCVIO's just waiting to be discovered).
>> It's also fair to see that VMS provides a higher level interface then
>> UNIX. RMS' indexed files are a good example of that.
>
> Most UNIX's come with libraries for indexed files too. Who needs/wants
> that shit in the kernel anyway?
Me? Actually, RMS is not strictly part of the kernel. The code
shares system address space, but is executed in executive mode as part
of the process. Having it there isvery handy, since you can change file
attributes, process attributes, and even system attributes to improve file I/O
performance characteristics of the application without code changes.
Also, another program can access the indexed file without requiring
re-coding, since those RMS access routines are used as a common interface
(much like stdio).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David L. Cathey |INET: davidc@montagar.lonestar.org
Montagar Software Concepts |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
NOTE: Due to circumstances beyond my control, please use the lonestar.org
address until further notice.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-13 17:57 ` David L. Cathey
@ 1994-03-15 22:14 ` Mark A Harrison
0 siblings, 0 replies; 31+ messages in thread
From: Mark A Harrison @ 1994-03-15 22:14 UTC (permalink / raw)
David L. Cathey (davidc@avatar.montagar.com) wrote:
: In article <2lrev2$q4u@news.utdallas.edu>, mharriso@utdallas.edu (Mark A Harrison) writes:
: > These are modern times, we have THREADS these days!
: But VMS has had asynch functionality for over a decade. And not
Right, and if we would have been arguing this argument a decade ago,
I would have agreed with you.
: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: David L. Cathey |INET: davidc@montagar.lonestar.org
: Montagar Software Concepts |UUCP: ...!montagar!davidc
: P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
: NOTE: Due to circumstances beyond my control, please use the lonestar.org
: address until further notice.
--
Mark Harrison
mharriso@utdallas.edu
mharriso@spd.dsccc.com
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-15 12:04 ` Anders Rolff
@ 1994-03-16 4:58 ` David L. Cathey
1994-03-17 18:46 ` Larry Mulcahy
0 siblings, 1 reply; 31+ messages in thread
From: David L. Cathey @ 1994-03-16 4:58 UTC (permalink / raw)
In article <ROLFF.94Mar15120428@svea.eurokom.ie>, rolff@svea.eurokom.ie (Anders Rolff) writes:
> In article <1994Mar13.133421.18811@avatar.montagar.com> davidc@avatar.montagar.com (David L. Cathey) writes:
> Actually, for a business it is very relevant. Needing asynch I/O
> and it is not provided by my current Unix vendor means that I have to go
> out and buy another CPU and O/S from another Unix vendor. And maybe another
> license to run my database on it.
>
> Hey, look at it from the bright side. These days, most Unix systems _actually_
> support the concept of upgrades. You don't have to install the system from
> scratch every time a new release is out.
That presupposes that the feature you need is in the upgrade. Did the
vendor decide to put it in? Your features are at the mercy of what the vendor
decides to add. Otherwise you look for another vendor for both
hardware/software.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David L. Cathey |INET: davidc@montagar.lonestar.org
Montagar Software Concepts |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
NOTE: Due to circumstances beyond my control, please use the lonestar.org
address until further notice.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
@ 1994-03-16 23:16 Esther Lumsdon
0 siblings, 0 replies; 31+ messages in thread
From: Esther Lumsdon @ 1994-03-16 23:16 UTC (permalink / raw)
References: <1994Feb26.204059.4068@mixcom.mixcom.com> <ROCKWELL.94Mar10070553@nova.umd.edu> <11MAR199400234346@hearts.aces.com> <1994Mar11.144337.13745@inmos.co.uk>,<1994Mar11.190110.20289@integrity.uucp> <2lqrtk$99p@gap.cco.caltech.edu>
carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>In article <1994Mar11.190110.20289@integrity.uucp>, jcrowe@zaphodmpd.tandem.com (Joseph Crowe) writes:
>= I agree that most UNIX versions at this point do not provide async i/o
>=capabilities at the user level. My question is....so what? Why should the
>=user concern h(er|im)self with the intricacies of scatter/gather i/o at
>=the API level when it automatically gets handled in a hopefully optimal
>=way on h(er|is) behalf by the kernel and device drivers. Or am I missing
>=something.
>You're missing the fact that doing async I/O on most Unix systems is simply
>impossible. Sure, you could spawn a subprocess for each I/O request you want
>to make, have each subprocess issue a synchronous I/O request, then signal the
>parent when it completed. Seems like a fair amount of additional overhead to
>do something that could be incorporated in the system I/O routines.
Spawn a subprocess? no! Use Ada tasking to do your asynchronous I/O
for unix. From the Verdix Ada support BBS:
Asynchronous IO package example
Many customers have indicated that they would like to be able to use IO
in multiple tasks without having the program suspend. This is possible
on Unix by either polling, or using the Unix async features. This package
is an example of using these async features to communicate through
sockets in multi-tasking programs. It includes a fairly complete binding
to most of the unix calls associated with sockets, as well as a library
of higher-level communication routines built on the binding. It also
includes a crude example program to demonstrate the functionality.
Anything on the Verdix support BBS is free.
--
-- Esther Lumsdon, not a tech support engineer, and not speaking for Verdix.
esther@verdix.com I wanna be where the sky is Carolina blue!
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-15 16:42 ` David L. Cathey
@ 1994-03-17 0:44 ` Raul Deluth Miller
[not found] ` <bellamy-180394120752@test1.commerce.uq.oz.au>
1 sibling, 0 replies; 31+ messages in thread
From: Raul Deluth Miller @ 1994-03-17 0:44 UTC (permalink / raw)
David L. Cathey:
[linux]
. Seems to me that if it's full of bugs, it could have been written
. better. Perhaps a better design of interfaces could have been done
. to reduce the impact of race conditions. Whether or not he could
. write something better does not discredit that Linux is full of
. bugs and possibly should have been written by someone else.
. However, since Linux is free, you get what you pay for so why bitch
. about it here.
It's not full of bugs. Prerelease versions of Linux [like 0.12] were
full of bugs. More recent versions [like 1.0.1] are solid.
Raul D. Miller
<rockwell@nova.umd.edu>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
1994-03-16 4:58 ` David L. Cathey
@ 1994-03-17 18:46 ` Larry Mulcahy
0 siblings, 0 replies; 31+ messages in thread
From: Larry Mulcahy @ 1994-03-17 18:46 UTC (permalink / raw)
David L. Cathey (davidc@avatar.montagar.com) wrote:
: > Hey, look at it from the bright side. These days, most Unix systems _actually_
: > support the concept of upgrades. You don't have to install the system from
: > scratch every time a new release is out.
: That presupposes that the feature you need is in the upgrade. Did the
: vendor decide to put it in? Your features are at the mercy of what the vendor
: decides to add. Otherwise you look for another vendor for both
: hardware/software.
At least if your Unix lacks an important feature, there IS another
vendor, not to mention countless gigabytes of free sources.
Larry Mulcahy
lmulcahy@nyx.cs.du.edu
lmulcah@lookout.ecte.uswc.uswest.com
______________________________________________________________________________
When they took the fourth amendment, I was quiet because I don't deal drugs.
When they took the six amendment, I was quiet because I'm innocent.
When they took the second amendment, I was quiet because I'm don't own a gun.
Now they've taken the first amendment and I can't say anything at all.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Does UNIX do async i/o?
[not found] ` <bellamy-180394120752@test1.commerce.uq.oz.au>
@ 1994-03-18 19:35 ` David L. Cathey
0 siblings, 0 replies; 31+ messages in thread
From: David L. Cathey @ 1994-03-18 19:35 UTC (permalink / raw)
In article <bellamy-180394120752@test1.commerce.uq.oz.au>, bellamy@commerce.uq.edu.au (David Bellamy) writes:
> In article <1994Mar15.114228.18827@avatar.montagar.com>,
> davidc@avatar.montagar.com (David L. Cathey) wrote:
>> Seems to me that if it's full of bugs, it could have been written
>> better. Perhaps a better design of interfaces could have been done to
>> reduce the impact of race conditions. Whether or not he could write something
>> better does not discredit that Linux is full of bugs and possibly should
>> have been written by someone else. However, since Linux is free, you get
>> what you pay for so why bitch about it here.
>>
>
> Linux came out of beta a few days ago. There have been many articles
> written by people who have had early beta versions running for months.
> Note some beta versions were more stable than others (stability usually
> decreased when new features were added). In many cases what people have
> tried out were alpha versions. The Linux project has been remarkable in
> that is was a Net combined operation, so it needed to go through a cycle of
> alpha->beta->alpha _public_ testing.
Really, I have no complaints against Linux. I've heard better things
about it than most proprietary Unix incarnations.
> The comment "Linux is full of bugs and possibly should have been written by
> someone else" seems strange. While Linus has written the bulk of the
> kernel a lot has been contribited by programmers from all over the planet
> and the filesystems and networking code have been almost entirely written
> by other teams. Linux was not written by any someONE. If someone else
> wants to write a free OS, be it Unix based or otherwise, go ahead. You
> have nine months from the day you open the box on your new PC to the day
> you post to the Net that you have written this OS and would anyone like to
> try it (Linux 0.10 was announced about 9 months after first code).
The initial response to the bugs "do you think you can do better?"
did nothing to discredit the previous authors comments. Again, since it's
free I think he has nothing to bitch about, and the authors seem to be
fairly responsive. Still, somethings might have been done better, however
I haven't seen the code to make any comment on that.
Hopefully, Linus will be at New Orleans DECUS, but it's sounding
like that will not be the case...
> BTW, just in case someone things I have an axe to grind: last night I
> rebooted our VAX cluster (VMS5.5-2) as part of a multinet netware change.
> It had been up since upgrading VMS in Feb 1993. That's reliability.
:-)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David L. Cathey |INET: davidc@montagar.lonestar.org
Montagar Software Concepts |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX 75026-0772 |Fone: (214)-618-2117
NOTE: Due to circumstances beyond my control, please use the lonestar.org
address until further notice.
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~1994-03-18 19:35 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-16 23:16 Does UNIX do async i/o? Esther Lumsdon
-- strict thread matches above, loose matches on Subject: below --
1994-02-26 20:40 Is VMS Dying? Craig Dedo
1994-03-10 12:05 ` Raul Deluth Miller
1994-03-11 7:23 ` Ehud Gavron
1994-03-11 14:43 ` Hugh McIntyre
1994-03-11 19:01 ` Does UNIX do async i/o? Joseph Crowe
1994-03-11 22:38 ` Carl J Lydick
1994-03-12 4:03 ` Mark A Harrison
1994-03-12 4:32 ` Carl J Lydick
1994-03-12 13:30 ` Raul Deluth Miller
1994-03-12 16:59 ` Carl J Lydick
1994-03-13 12:00 ` Mark A Harrison
1994-03-12 20:24 ` Bryan J Jensen
1994-03-12 20:44 ` John Hascall
1994-03-13 12:22 ` Mark A Harrison
1994-03-14 21:11 ` Karl Strickland
1994-03-15 16:42 ` David L. Cathey
1994-03-17 0:44 ` Raul Deluth Miller
[not found] ` <bellamy-180394120752@test1.commerce.uq.oz.au>
1994-03-18 19:35 ` David L. Cathey
1994-03-13 11:22 ` Casper H.S. Dik
1994-03-13 11:45 ` Mark A Harrison
1994-03-13 18:34 ` David L. Cathey
1994-03-15 12:04 ` Anders Rolff
1994-03-16 4:58 ` David L. Cathey
1994-03-17 18:46 ` Larry Mulcahy
1994-03-14 7:39 ` gleason
1994-03-12 16:34 ` Chris Kalisiak
1994-03-13 11:50 ` Mark A Harrison
1994-03-13 17:57 ` David L. Cathey
1994-03-15 22:14 ` Mark A Harrison
1994-03-12 3:28 ` David L. Cathey
1994-03-14 18:39 ` Joseph Crowe
1994-03-14 22:05 ` Carl J Lydick
1994-03-12 23:48 ` gezelter
1994-03-14 19:40 ` Brad Daniels
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox