From: Daniel Phillips <phillips@bonn-fries.net>
To: "Anil Kumar" <anilk@subexgroup.com>,
"Mihai Moise" <mmoise@giref.ulaval.ca>,
<linux-kernel@vger.kernel.org>
Subject: Re: semaphores and noatomic flag
Date: Tue, 5 Jun 2001 12:37:53 +0200 [thread overview]
Message-ID: <01060512375300.00553@starship> (raw)
In-Reply-To: <NEBBIIKAMMOCGCPMPBJOCEGICEAA.anilk@subexgroup.com>
In-Reply-To: <NEBBIIKAMMOCGCPMPBJOCEGICEAA.anilk@subexgroup.com>
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Mihai Moise
>
> up(semaphore 1) /* wake up client */
> down(semaphore 0) /* put iself to sleep */
>
> The problem is that the two system calls make the whole process twice
> as slow as it needs to be, and they are both needed because the semop
> system call is implemented in an atomic manner. If the semop system
> call had an IPC_NOATOMIC flag, then the each process would only have
> to do one call,
>
> semop(up semaphore 0 & down semaphore 1, IPC_NOATOMIC)
>
> which would be interpreted in the kernel as the sequence of two
> system calls I have written previously.
On Tuesday 05 June 2001 08:28, Anil Kumar wrote:
> Will it not be a very specialized case rather than being general call
> type?
The concept is general and useful, though I don't think its expression
here is correct. A similar feature used in dynix was described earlier
in some detail by Paul Cassella:
http://marc.theaimsgroup.com/?l=linux-kernel&m=97742705300697&w=2
(Re: [RFC] Semaphores used for daemon wakeup)
The idea is to atomically release one serializer and grab another. We
have quite a few flavors of lock so square that and you have the number
of primitives you'd need for a complete set.
To sell the idea you'd have to come up with a few places where the new
primitives would make the kernel run better, then you'd have to
implement it or find someone with the necessary scheduler hacking
skills to do it for you. The last part is the tricky one. ;-)
--
We had
next prev parent reply other threads:[~2001-06-05 10:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-04 17:34 Mihai Moise
2001-06-05 6:28 ` Anil Kumar
2001-06-05 10:37 ` Daniel Phillips [this message]
2001-06-05 17:26 ` davide.rossetti
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=01060512375300.00553@starship \
--to=phillips@bonn-fries.net \
--cc=anilk@subexgroup.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mmoise@giref.ulaval.ca \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®