Flexible locking in SCOOP

Piotr Nienaltowski · 2009

Abstract. The SCOOP model provides programmers with a simple extension of Eiffel that allows them to produce high-quality concurrent applications with little more effort than sequential ones. The model is simple yet powerful. Nevertheless, its access control policy is pessimistic: (1) all separate actual arguments of a feature call are locked, even if it is not necessary, and (2) at most one client object can access a given supplier object at any time. This results in increased potential for deadlocks; additionally, some interesting synchronisation scenarios cannot be implemented efficiently. This paper presents two mechanisms that increase the flexibility of locking in SCOOP: (1) a type-based mechanism to specify which arguments of a routine call should be locked, and (2) a lock-passing mechanism that allows for safe handling of callbacks and complex synchronisation scenarios that involve mutual locking of several separate objects. When combined, these two approaches greatly increase the expressive power of SCOOP and reduce the risk of deadlock. 1

Read the paper · More papers on PaperTik