Preventing deadlock with timestamps: the wait-die method