Started implementing deadlock resolution logic

-For the optimistic manager, implementing deadlock resolution
-Included condition to only move to the next activity when the previous
activity was successfuly completed.
Deadlock resolution for optimistic algorithm