The point of this example is to show that a naive locking scheme may cause operations to become serialized even if they are independent. Here we could've written to nodes 3 and 4 without any locks (assuming these are the only transactions taking place).
rrp123
If we did hand-over-hand locking, we wouldn't be able to concurrently modify 3 & 4 since both those actions would need a lock on 2, but by the property of a lock, we know that only one transaction (thread) can have a lock at a time.
sherwood
Since we are not adding/deleting node, we are not using hand-over locking in this case
The point of this example is to show that a naive locking scheme may cause operations to become serialized even if they are independent. Here we could've written to nodes 3 and 4 without any locks (assuming these are the only transactions taking place).
If we did hand-over-hand locking, we wouldn't be able to concurrently modify 3 & 4 since both those actions would need a lock on 2, but by the property of a lock, we know that only one transaction (thread) can have a lock at a time.
Since we are not adding/deleting node, we are not using hand-over locking in this case