All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alon Ziv" <alonz@nolaviz.org>
To: <linux-kernel@vger.kernel.org>
Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	"Alexander Viro" <viro@math.psu.edu>
Subject: Re: light weight user level semaphores
Date: Sun, 22 Apr 2001 18:08:37 +0200	[thread overview]
Message-ID: <003301c0cb46$7d50a400$910201c0@zapper> (raw)
In-Reply-To: <Pine.GSO.4.21.0104221026360.28681-100000@weyl.math.psu.edu>

Oh, I don't argue about that. (Well, almost--- see below...)
It's just that we need _some_ method for getting over the silly POSIX
FD-handling restrictions...  And the negative-FDs may be the solution.

(Note I said we 'can' declare other semantics; not 'should'.  So these
FDs can still be normal ones, just at the other end of the numbering
range...)

My misgivings are:
* There's no way to integrate other signalling mechanisms; e.g., we may
  wish for a 'wake-all-waiters' signaller, or for a 'timed-wait' that
  arrives via an FD and not as a signal
* a pipe is a more-or-less good semaphore; it may be too heavyweight,
  as it's forced to pass useless [in this case] info, and we can't
  control its wakeup order [although POSIX doesn't seem to require this]

[ Actually, I once had an idea of binding signals into an FD, so they can be
  'read' out of it...  with that, an alarm() is a 'timed-wait' waitable by
  poll() :-) ]

    -az

----- Original Message -----
From: "Alexander Viro" <viro@math.psu.edu>
To: "Alon Ziv" <alonz@nolaviz.org>
Cc: <linux-kernel@vger.kernel.org>; "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Sent: Sunday, April 22, 2001 16:31
Subject: Re: light weight user level semaphores


>
>
> On Sun, 22 Apr 2001, Alon Ziv wrote:
>
> > Well, that's the reason for my small-negative-integer semaphore-FD
idea...
> > (It won't support select() easily, but poll() is prob'ly good enough)
> > Still, there is the problem of read()/write()/etc. semantics; sure, we
can
> > declare that 'negative FDs' have their own semantics which just happen
to
> > include poll(), but it sure looks like a kludge...
>
> You _still_ don't get it. The question is not "how to add magic kernel
> objects that would look like descriptors and support a binch of
> ioctls, allowing to do semaphores", it's "do we need semaphores
> to be kernel-level objects". Implementation with pipes allows to avoid
> the magic crap - they are real, normal pipes - nothing special from
> the kernel POV. read(), write(), etc. are nothing but reading and writing
> for pipes.
>
>
>


  reply	other threads:[~2001-04-22 15:08 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010417114433.D1108@w-mikek2.sequent.com>
2001-04-17 19:48 ` light weight user level semaphores Linus Torvalds
2001-04-18 18:13   ` Bernd Eckenfels
2001-04-18 19:35   ` Ulrich Drepper
2001-04-19  8:20     ` Alon Ziv
2001-04-19  8:52       ` Abramo Bagnara
2001-04-19  9:08         ` Alexander Viro
2001-04-19 10:44           ` Abramo Bagnara
2001-04-19 16:11         ` Linus Torvalds
2001-04-19 16:33           ` Alexander Viro
2001-04-19 16:43             ` Linus Torvalds
2001-04-19 17:33               ` Alexander Viro
2001-04-19 17:38                 ` Linus Torvalds
2001-04-19 18:24                   ` Alexander Viro
2001-04-19 19:26                   ` Ulrich Drepper
2001-04-19 19:35                     ` Alan Cox
2001-04-19 20:06                       ` Ulrich Drepper
2001-04-19 20:11                         ` Alan Cox
2001-04-19 20:26                           ` Ulrich Drepper
2001-04-19 20:22                     ` Ingo Oeser
2001-04-19 20:40                       ` Ulrich Drepper
2001-04-19 20:51                       ` Linus Torvalds
2001-04-19 21:38                       ` Alan Cox
2001-04-19 20:49                     ` Linus Torvalds
2001-04-19 21:18                       ` Ulrich Drepper
2001-04-19 21:41                         ` Linus Torvalds
2001-04-19 22:46                           ` Ulrich Drepper
2001-04-20  1:35                             ` Alexander Viro
2001-04-20  2:45                               ` Ulrich Drepper
2001-04-19 16:43           ` Abramo Bagnara
2001-04-19 20:47           ` Ingo Oeser
2001-04-19 20:54             ` Linus Torvalds
2001-04-19  9:08       ` Ingo Oeser
2001-04-19 11:51       ` Alan Cox
2001-04-19 16:03       ` Linus Torvalds
2001-04-19 16:38         ` Alan Cox
2001-04-19 16:46           ` Linus Torvalds
2001-04-19 17:12             ` Alan Cox
2001-04-19 22:35               ` Rogier Wolff
2001-04-20  9:29             ` Olaf Titz
2001-04-20 14:19               ` Jesse Pollard
2001-04-20 18:36                 ` Olaf Titz
2001-04-20 23:33               ` Linus Torvalds
2001-04-21  4:06                 ` fd allocation [was: light weight user level semaphores] Edgar Toernig
2001-04-22  9:48                   ` Olaf Titz
2001-04-22 11:41                     ` light weight user level semaphores Alon Ziv
2001-04-22 12:44                       ` Alan Cox
2001-04-22 15:19                         ` Alon Ziv
2001-04-22 14:31                           ` Alexander Viro
2001-04-22 16:08                             ` Alon Ziv [this message]
2001-04-22 11:41                     ` Alon Ziv
2001-04-22 14:18                     ` David Woodhouse
2001-04-23 13:19                       ` David Howells
2001-04-23 14:48                         ` Alon Ziv
2001-04-23 15:40                           ` David Howells
2001-04-21 10:13                 ` Olaf Titz
2001-04-23 15:34                 ` Jeff Garzik
2001-04-23 19:18             ` Ingo Oeser
2001-04-24  0:19             ` David Wagner
2001-04-24  0:41               ` Alexander Viro
2001-04-19 19:47           ` Ulrich Drepper
2001-04-19 18:48         ` Olaf Titz
2001-04-19 13:59 George Talbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003301c0cb46$7d50a400$910201c0@zapper' \
    --to=alonz@nolaviz.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.