File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ \section{Chapter 18 Concurrency Control}
66
77\subfile {./sec1.tex}
88\subfile {./sec2.tex}
9+ \subfile {./sec3.tex}
910
1011\end {document }
Original file line number Diff line number Diff line change 1+ \documentclass [../../main.tex ]{subfiles }
2+
3+ \begin {document }
4+
5+ \subsection {18.3 Enforcing Serializability by Locks }
6+
7+ \subsubsection* {Exercise 3.1 }
8+
9+ a)
10+
11+ Suppose that we have the schedule derived from the given transactions.
12+
13+ $$
14+ r_{1}(A); r_{2}(B); w_{2}(B); r_{2}(A); w_{1}(A); r_{1}(B); w_{1}(B); w_{2}(A)
15+ $$
16+
17+ Note that $ r_{1}(A)$ must hold a lock on $ A$ , since a transaction is granted with
18+ lock before its read and write action. Likewise, $ r_{2}(A)$ must also hold a lock
19+ on $ A$ .
20+
21+ Since the unlock of $ A$ for $ r_{1}(A)$ is executed after $ w_{1}(A)$ and $ r_{2}(A)$
22+ appears before $ w_{1}(A)$ . Therefore, the schedule is prohibited.
23+
24+ b)
25+
26+ $$
27+ \frac {4!}{2! \times (4 - 2)!} \times \frac {4!}{2! \times (4 - 2)!} + 2 = 38
28+ $$
29+
30+ c)
31+
32+ $$
33+ \frac {4!}{2! \times (4 - 2)!} \times \frac {4!}{2! \times (4 - 2)!} = 36
34+ $$
35+
36+
37+ d)
38+
39+ The number of conflict serializable schedule is 2.
40+
41+ e)
42+
43+ All legal schedules are serializable. It is impossible for a legal schedule
44+ to be unserializable.
45+
46+ \subsubsection* {Exercise 3.2 }
47+
48+ Need community help.
49+
50+ \subsubsection* {Exercise 3.3 }
51+
52+ Need community help.
53+
54+ \subsubsection* {Exercise 3.4 }
55+
56+ Need community help.
57+
58+ \end {document }
You can’t perform that action at this time.
0 commit comments