Nov. 25, 2011
5:58 p.m.
2011/11/25 Igor Stasenko <siguctua@gmail.com>:
On 25 November 2011 16:25, Pablo Herrero <pablodherrero@gmail.com> wrote: Usually for this you just use critical sections.
sema := Semaphore forMutualExclusion.
process1:
sema critical: [ Â here you modify your data ]
process2:
sema critical: [ Â here you commit your data ]
so, why this is not appropriate for your model?
The thing here is that some processes may not be aware there's a transaction running in the background, and could be reading or modifying objects which are involved in some transaction. So it wouldn't be possible for them to anticipate which objects should be accessed inside a lock.