a. Yup, was there.
b. Nothing really missing.
c. The extent to which transaction deadlocks were handled i found were a bit too much. I assume this is common knowledge to most of your students.
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-X(B) | ||
$w_1(B)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(C) | ||
$w_2(C)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(A) | ||
$w_3(A)$ | ||
unlock(A) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-X(B) | ||
$w_1(B)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(C) | ||
$w_2(C)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(A) | ||
$w_3(A)$ | ||
unlock(A) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-X(B) | ||
$w_1(B)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(C) | ||
$w_2(C)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(A) | ||
$w_3(A)$ | ||
unlock(A) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(D) | ||
$r_3(D)$ | ||
lock-X(C) | ||
$w_1(C)$ | ||
unlock(C) | ||
unlock(B) | ||
unlock(A) | ||
lock-X(D) | ||
$w_2(D)$ | ||
unlock(D) | ||
unlock(C) | ||
unlock(B) | ||
lock-X(E) | ||
$w_3(E)$ | ||
unlock(E) | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(D) | ||
$r_3(D)$ | ||
lock-X(C) | ||
$w_1(C)$ | ||
unlock(C) | ||
unlock(B) | ||
unlock(A) | ||
lock-X(D) | ||
$w_2(D)$ | ||
unlock(D) | ||
unlock(C) | ||
unlock(B) | ||
lock-X(E) | ||
$w_3(E)$ | ||
unlock(E) | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(D) | ||
$r_3(D)$ | ||
lock-X(C) | ||
$w_1(C)$ | ||
unlock(C) | ||
unlock(B) | ||
unlock(A) | ||
lock-X(D) | ||
$w_2(D)$ | ||
unlock(D) | ||
unlock(C) | ||
unlock(B) | ||
lock-X(E) | ||
$w_3(E)$ | ||
unlock(E) | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-X(A) | ||
$r_1(A)$ | ||
lock-X(B) | ||
$r_2(B)$ | ||
lock-X(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(A) | ||
$r_3(A)$ | ||
$w_1(A)$ | ||
unlock(A) | ||
unlock(B) | ||
$w_2(B)$ | ||
unlock(B) | ||
unlock(C) | ||
$w_3(C)$ | ||
unlock(C) | ||
unlock(A) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(A) | ||
$r_3(A)$ | ||
lock-X(A) | ||
$w_1(A)$ | ||
unlock(A) | ||
unlock(B) | ||
lock-X(B) | ||
$w_2(B)$ | ||
unlock(B) | ||
unlock(C) | ||
lock-X(C) | ||
$w_3(C)$ | ||
unlock(C) | ||
unlock(A) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-U(A) | ||
$r_1(A)$ | ||
lock-U(B) | ||
$r_2(B)$ | ||
lock-U(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(A) | ||
$r_3(A)$ | ||
lock-X(A) | ||
$w_1(A)$ | ||
unlock(A) | ||
unlock(B) | ||
lock-X(B) | ||
$w_2(B)$ | ||
unlock(B) | ||
unlock(C) | ||
lock-X(C) | ||
$w_3(C)$ | ||
unlock(C) | ||
unlock(A) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-X(B) | ||
$w_1(B)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(C) | ||
$w_2(C)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(D) | ||
$w_3(D)$ | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-X(B) | ||
$w_1(B)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(C) | ||
$w_2(C)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(D) | ||
$w_3(D)$ | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-X(B) | ||
$w_1(B)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(C) | ||
$w_2(C)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(D) | ||
$w_3(D)$ | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-X(A) | ||
$r_1(A)$ | ||
lock-X(B) | ||
$r_2(B)$ | ||
lock-X(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(D) | ||
$r_3(D)$ | ||
$w_1(A)$ | ||
unlock(B) | ||
unlock(A) | ||
$w_2(B)$ | ||
unlock(C) | ||
unlock(B) | ||
$w_3(C)$ | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-S(A) | ||
$r_1(A)$ | ||
lock-S(B) | ||
$r_2(B)$ | ||
lock-S(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(D) | ||
$r_3(D)$ | ||
lock-X(A) | ||
$w_1(A)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(B) | ||
$w_2(B)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(C) | ||
$w_3(C)$ | ||
unlock(D) | ||
unlock(C) |
$T_1$ | $T_2$ | $T_3$ |
---|---|---|
lock-U(A) | ||
$r_1(A)$ | ||
lock-U(B) | ||
$r_2(B)$ | ||
lock-U(C) | ||
$r_3(C)$ | ||
lock-S(B) | ||
$r_1(B)$ | ||
lock-S(C) | ||
$r_2(C)$ | ||
lock-S(D) | ||
$r_3(D)$ | ||
lock-X(A) | ||
$w_1(A)$ | ||
unlock(B) | ||
unlock(A) | ||
lock-X(B) | ||
$w_2(B)$ | ||
unlock(C) | ||
unlock(B) | ||
lock-X(C) | ||
$w_3(C)$ | ||
unlock(D) | ||
unlock(C) |
insert into instrument (name, gid, comment) values ('mayonaise', uuid_generate_v4(), 'mayonaise is geen instrument');
delete from instrument where name='mayonaise');
select artist.name, track.name from track left join artist on track.artist_credit=artist.id where artist.id=1;