microsoft / verona-rt

The runtime for the Verona project
MIT License
25 stars 14 forks source link

Split schedule many #54

Open marioskogias opened 3 weeks ago

marioskogias commented 3 weeks ago

Attempt to refactor schedule many as proposed in #49

mjp41 commented 2 weeks ago

So I think Vishal is right. So there are two cases where we need to specify that the read_available flag:

The second of these is after the release phase, so I think could cause a lost wake up. The first one is in the correct place. I think we need to flag the read_available for read only chains in:

https://github.com/microsoft/verona-rt/blob/45e93715955eaca6ad7ede0740c544bc5eaed9b6/src/rt/sched/behaviourcore.h#L849-L853

vishalgupta97 commented 2 weeks ago

The read reference count also needs to be taken along with marking the slot as being read available before marking the slot as ready otherwise read and writes can happen in parallel.

marioskogias commented 3 days ago

I am not sure I fully understand the concern. I see the difference before and after the refactoring, but it is not clear to me why in this example A will not wake up B. Is the problem that B will never be scheduled or that it will not be scheduled as early as it could?

I think that given that we call resolve() at the very end of the function, none of the behaviours are run before this function finishes.