Can you explain the following to me ?
An implementation may perform the sequence of steps of a protected action using any thread of control; it need not be that of the task that started the protected action (RM)
(book) Assume that the producer in the program using protected objects attempts to append an item to a full buffer. The entry call Buffer.Append will be enqueued, the producer task will be blocked and a consumer task will be allowed to execute. Eventually, the consumer task will take an item from the buffer. Upon completion of the body of Take, servicing of the entry queue can be done by the consumer task, as shown in the following diagram:
If the caller of the protected action does not execute the code, who does ? I can’t be arbitrary, and I can’t see why a completely unrelated thread would do it. I mean, when they execute on the same core it would be irrelevant, since in any case the calling task is blocked until completion of the action, no matter where it happens. But it matters in case of multicore, multiprocessor or fully distributed systems, right ?