Re: Multitasking and containers




Dmitry A. Kazakov wrote:
2. Using a protected object's procedure/entry would kill concurrency by
serialization of the action to undertake.

There is a difference between "synchronizing access to a shared
resource" and "waiting for a resource to become available".

Calling a protected function or procedure is an example of the former.
Calling a protected procedure would hardly "kill concurrency". In a
monitor there is only synchronization. (I think it's the case that the
task stays in a running state.)

Calling a protected entry whose barrier condition is false is an
example of the latter. If the barrier condition were false this would
mean the task waits (it transitions to a blocked state). I would be
loathe to say that that would "kill" concurrency since in typical
designs that's exactly what the task is supposed to do.

.



Relevant Pages