lkml.org 
[lkml]   [1999]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Netscape broken with 2.2.0-pre7

Arvind Sankar writes:
>On Mon, Jan 18, 1999 at 09:17:13PM -0500, Albert D. Cahalan wrote:
>> Consider these events:
>>
>> 1. you check the buffer - it is empty
>> 2. a signal arrives
>> 3. you select() because you think the buffer is empty
>>
>> Time to rant!
>
> What are semaphores for?

other stuff

> Implementing a circular buffer with one reader and one writer is
> probably in the first assignment of any concurrent programming course.

No, it is the first assignment of any operating systems course.
It all works great until you add select() to the problem.

This race condition is documented as being unsolvable in the book
"Advanced Programming in the Unix Environment" by Richard Stevens.
Though it is getting obsolete, the book is still very good.
(it does not cover Linux, BSD 4.4, or anything else recent)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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