remzi-arpacidusseau / ostep-typos

51 stars 44 forks source link

28.13: Rephrase to include ticket locks #17

Closed jcavar closed 1 year ago

jcavar commented 3 years ago

Hello, Sorry for opening an issue and not following suggested approach of creating a file, but I am not yet sure about the contents of potential fix. I am happy to create a file if you agree about the issue:

In chapter 28.13 (A Simple Approach: Just Yield, Baby), as an introduction to 28.14 (Using Queues: Sleeping Instead Of Spinning), it says

Worse, we have not tackled the starvation problem at all. A thread may get caught in an endless yield loop while other threads repeatedly enter and exit the critical section. We clearly will need an approach that addresses this problem directly.

A similar line can be found in 28.14 (in context of previously introduced approaches):

Either way, there is potential for waste and no prevention of starvation.

Starvation problem was addressed with the ticket lock I believe?

remzi-arpacidusseau commented 1 year ago

Kind of addressed now. I agree that is a bit confusing as it was. Thanks!