Previous | Next --- Slide 10 of 84
Back to Lecture Thumbnails
qwerty

In optimistic detection, you wait to get to the commit point before you do the conflict detection. To do conflict detection, you compare the committing transaction’s write set with the read set of outstanding transactions. You also compare the write set of the committing transaction with the write set of outstanding transactions. This is checking that the above 2 set intersection are empty. If they are empty, you can proceed with the commit. If not, then I think you have to sort out the conflicts in such a way that gives priority to the committing transaction.

qwerty

I think giving priority to the committing transaction means that the other transaction will abort and restart. Are there other ways in which priority could be given to the committing transaction?

gohan2021

I think commiting transaction would succeed and the rest would abort in optimistic detection.

rthomp

Does the decision to do optimistic vs pessimistic detection happen at the hardware level, or could a programmer ever signal to the hardware that they want one or the other to happen?

noelma

Pessimistic detection always expects conflicts so we check after each operation. Optimistic detection only expects conflicts after commits so we check then.

Please log in to leave a comment.