Snapshot Isolation Anomalies Detection in Software Transactional Memory
Ricardo J. Dias, João Costa Seco, João Lourenço · 2010
Abstract. Some performance issues of transactional memory are caused by unnecessary abort situations where non serializable and yet non con-flicting transactions are scheduled to execute concurrently. Smartly relaxing the isolation properties of transactions may overcome these issues and attain considerable performance improvements. How-ever, it is known that relaxing isolation restrictions may lead to runtime anomalies. In some situations, like database management systems, devel-opers may choose that compromise, hence avoiding anomalies explicitly. Memory transactions protect the state of the program, therefore execu-tion anomalies may have more severe consequences in the semantics of programs. So, the compromise between a relaxed isolation strategy and enforcing the necessary program correctness is harder to setup. The solution we devise is to statically analyse programs to detect the kind of anomalies that emerge under snapshot isolation. Our approach allows a compiler to either warn the developer about the possible snapshot isolation anomalies in a given program, or possibly inform automatic correctness strategies to ensure Serializability.