odeo.docx - NAME KIPKORIR GIDEON ADM NO CIT-221-050/2014 TRANSACTION PROCESSING ASSIGNMENT Question 1 a Pessimistic concurrency control(or pessimistic

odeo.docx - NAME KIPKORIR GIDEON ADM NO CIT-221-050/2014...

This preview shows page 1 - 2 out of 3 pages.

NAME: KIPKORIR GIDEON ADM NO: CIT-221-050/2014 TRANSACTION PROCESSING ASSIGNMENT Question 1 a) Pessimistic concurrency control (or pessimistic locking ) is called "pessimistic" because the system assumes the worst — it assumes that two or more users will want to update the same record at the same time, and then prevents that possibility by locking the record, no matter how unlikely conflicts actually are. The locks are placed as soon as any piece of the row is accessed, making it impossible for two or more users to update the row at the same time. Depending on the lock mode ( shared , exclusive , or update ), other users might be able to read the data even though a lock has been placed. Optimistic concurrency control (or optimistic locking ) assumes that although conflicts are possible, they will be very rare. Instead of locking every record every time that it is used, the system merely looks for indications that two users actually did try to update the same record at the same time. If that evidence is found, then one user's updates are discarded and the user is informed. For example, if User1 updates a record and User2 only wants to read it, then User2 simply reads whatever data is on the disk and then proceeds, without checking whether the data is locked. User2 might see slightly out-of-date information if User1 has read the data and updated it, but has not yet committed the transaction. Optimistic locking is available on disk-based tables (D-tables) only. b) Granularity is the size of data item allowed to lock.
Image of page 1

Subscribe to view the full document.

Image of page 2

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes