Re: Netscape broken with 2.2.0-pre7

Albert D. Cahalan (acahalan@cs.uml.edu)
Tue, 19 Jan 1999 09:05:04 -0500 (EST)


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/