Hi Alex,

>> The fifo is there to defer requests for chopsticks when the
>> philosopher is hungry or eating.  Do you have any other mechanism in
>> mind?
>
> As the tell -> hear mechanism is a pipe, it behaves like a fifo. So I
> would expect that this would suffice.

Not due to the logic of the algorithm, e.g. when the philosopher is
hungry, he must hand over dirty forks immediately but not clean forks.
He must remember that he was asked for it and hand it over when he is
finished.

> I should explain that the internal tell -> hear mechanism maintains
> dynamic buffers for each parent/child connection, to avoid blocking
> if a child should not fetch (hear) its data fast enough. This way,
> the standard limitation of the PIPE_BUF size is avoided.

That's good to know.

Thank you,

Tomas
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to