Re: Async I/O on IRIX 6.x?

From: Alex Rousskov <>
Date: Mon, 14 Sep 1998 13:47:42 -0600 (MDT)

Hi Andres,

        Since you have volunteered to be an async-guru, some async-newbie
questions for you. :)

On Mon, 14 Sep 1998, Andres Kroonmaa wrote:

> In this sense using OS provided threads should be highly preferred to
> other pthreads implementations

What are "OS provided threads"? Are pthreads on IRIX "OS provided"? How do I
tell if pthreads on XXX are "OS provided", in general?

> Let me speculate: guess IRIX is able to process most IO calls
> concurrently, but close() is for some reason enclosed by a mutex.

Interesting speculation. I might try to test that.

> Stew has designed ingenious async-io while avoiding mutexes. At a time
> we had quite a arguing about whether to write academic threaded code
> with zillions of mutexes or designing mutual exclusions algoritmically.

As far as I understand you ended up doing something in between, right? That
is, no mutexes and no guaranteed mutual exclusions?

Also, by "zillions of mutexes", you mean "2", I guess. :)

> So, to be
> pedantic, we might say that on any OS that has ever heard of threads,
> multiple IO operations on the same FD is MT-Safe as each file should be
> protected by its own mutex,

If so, the fact that we want to avoid mutexes sounds strange. If OS already
protects every FD with a mutex, our added overhead should be minimal, unless
OS has access to zero-overhead mutexes and we do not. What am I missing here?

I recall that successfully locking (no blocking) a mutex is a very cheap
operation. Are my recollections correct?

Thank you,

Received on Tue Jul 29 2003 - 13:15:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:55 MST