Subj : Re: Reader Writer Puzzle To : comp.programming.threads From : Joe Seigh Date : Tue Jun 14 2005 06:50 pm bonnie.caballero@ktd-kyocera.com wrote: > Hi, > > There is a linked list. A Reader task reads each node one at a time > starting from the head of the list. When it reaches the end of the > list, it just goes back to the head and starts all over again. One > Writer task searches for a node within the list and deletes it. > Another Writer task searches for a node within the list and inserts > another node before it. > > Can anybody give the code in C Language for the Reader, Writer(Deleter) > and Writer(Inserter) tasks? > Is this a homework problem? How saavy is your teacher? If we give you one of the more advanced lock-free solutions using PCOW (partial copy on write) will your teacher be able to understand it? How about a moving barrier solution? There's more than one solution. This is a whole area of study. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .