Linearizability and sequential consistency