Document details

Preventing atomicity violations with contracts

Author(s): Sousa, Diogo Miguel Gaspar de

Date: 2013

Persistent ID: http://hdl.handle.net/10362/11471

Origin: Repositório Institucional da UNL

Subject(s): Atomicity violation; Concurrency; Thread safety; Design by contract; Program analysis


Description

Concurrent programming is a difficult and error-prone task because the programmer must reason about multiple threads of execution and their possible interleavings. A concurrent program must synchronize the concurrent accesses to shared memory regions, but this is not enough to prevent all anomalies that can arise in a concurrent setting. The programmer can misidentify the scope of the regions of code that need to be atomic, resulting in atomicity violations and failing to ensure the correct behavior of the program. Executing a sequence of atomic operations may lead to incorrect results when these operations are co-related. In this case, the programmer may be required to enforce the sequential execution of those operations as a whole to avoid atomicity violations. This situation is specially common when the developer makes use of services from third-party packages or modules. This thesis proposes a methodology, based on the design by contract methodology, to specify which sequences of operations must be executed atomically. We developed an analysis that statically verifies that a client of a module is respecting its contract, allowing the programmer to identify the source of possible atomicity violations.

Fundação para a Ciência e Tecnologia - research project Synergy-VM(PTDC/EIA-EIA/113613/2009)

Document Type Master thesis
Language English
Advisor(s) Lourenço, João; Ferreira, Carla
Contributor(s) RUN
facebook logo  linkedin logo  twitter logo 
mendeley logo

Related documents

No related documents