Professional Documents
Culture Documents
Week5 Solution
Week5 Solution
6. What are the main types of Concurrency control? In what situation would you prefer one
over another?
Ans.
Optimistic: interactions carried on; prohibited interactions are cleared by rollback.
Pessimistic: no prohibited interactions are allowed to occur in the first place occur, hence
limited parallelism.
Benefit of optimistic: If things rarely go wrong, we won’t have to do extra work.
Benefit of pessimistic: If things do often go wrong, we don't have loads of rollbacks.