In: Computer Science
Recall the Kung and Robinson optimistic concurrency control algorithm. How can you modify that algorithm to ensure that every transaction eventually completes?
Optimistic iconcurrency icontrol i(OCC) iis ia iconcurrency icontrol imethod iapplied ito itransactional isystems isuch ias irelational idatabase imanagement isystems(dbms) iand isoftware itransactional imemory. iOCC iassumes ithat imultiple itransactions ican ifrequently icomplete iwithout iinterfering ieach iother. iWhile irunning, itransactions iuse ithe idata iresources iwithout iacquiring ilocks ion ithose iresources. iBefore icommitting, ieach itransaction iverifies ithat ino iother itransaction ihas imodified ithat idata iit ihas iread. iIf ithe icheck ireveals iconflicting imodifications, ithe icommitting itransaction irolls iback iand ican ibe irestarted.
Optimistic iconcurrency icontrol itransactions iinvolve ibelow iphases: