[lkml]   [2001]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: semaphores and noatomic flag
> -----Original Message-----
> From:
> []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:
(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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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