Menu

[Solved]3 25 Pts Given Operations Readlock Write Lock Unlock Acquires Read Lock Acquires Write Loc Q37197841

3. (25 pts) Given » operations readlock(?), write lock(?), and unlock(?), that acquires read lock, acquires write lock (or up

3. (25 pts) Given » operations readlock(?), write lock(?), and unlock(?), that acquires read lock, acquires write lock (or upgrades from read to write lock), and releases any lock, respectively (replace? with the proper data item) it is not allowed to issue write lock in order to perform read item (to facilitate more concurrency for read) . Given two transactions in schedules S1 and S2 as illustrated in the following two figures (10 pts) (a) Apply the basic two phase locking (2PL) protocol to each and entire transaction in Schedule S1 (the lost update problem) to justify why the given schedule is not allowed and therefore such problem does not happen (10 pts) (b) Apply the strict 2PL to each and entire transaction in Schedule S2 (the dirty read problem) to justify why the given schedule is not allowed and therefore such problem does not happen (5 pts) (c) Why is the basic 2PL not good enough for schedule S2? Schedule S1: Lost update Schedule S2: Dirty read read item(X) read item(x) read item(X); write_ item(X) Time write item(X) read item(Y) read item(X) Time write item(X) write item(X) read item(Y) abort write item(n: Show transcribed image text 3. (25 pts) Given » operations readlock(?), write lock(?), and unlock(?), that acquires read lock, acquires write lock (or upgrades from read to write lock), and releases any lock, respectively (replace? with the proper data item) it is not allowed to issue write lock in order to perform read item (to facilitate more concurrency for read) . Given two transactions in schedules S1 and S2 as illustrated in the following two figures (10 pts) (a) Apply the basic two phase locking (2PL) protocol to each and entire transaction in Schedule S1 (the lost update problem) to justify why the given schedule is not allowed and therefore such problem does not happen (10 pts) (b) Apply the strict 2PL to each and entire transaction in Schedule S2 (the dirty read problem) to justify why the given schedule is not allowed and therefore such problem does not happen (5 pts) (c) Why is the basic 2PL not good enough for schedule S2? Schedule S1: Lost update Schedule S2: Dirty read read item(X) read item(x) read item(X); write_ item(X) Time write item(X) read item(Y) read item(X) Time write item(X) write item(X) read item(Y) abort write item(n:

Expert Answer


Answer to 3. (25 pts) Given » operations readlock(?), write lock(?), and unlock(?), that acquires read lock, acquires write lock … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *