This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.
This methods detects and fixes deadlocks in strict 2PL systems. This implements the idea that each transaction should be executed instantly when it is started. This makes it equivalent to a serial schedule that has a transactions in the order of their start time. Timestamps Each transaction $T$ is assigned...
There are thee main approaches for deadlock detection: Timeouts - Assume a transaction is in a deadlock if it exceeds a given time limit. Wait-for Graphs: Nodes - Transactions Edge from $T_1$ to $T_2$ if $T_1$ waits for $T_2$ to release a lock. Deadlock correspond to cycles. graph LR T1...
Cascading rollbacks have the issues of breaking durability and they are also slow. As a result we want to avoid them. Recoverable schedules still cascade. Cascadeless Schedules A schedule is cascadeless if each transaction in it reads only values that were written by transaction that have already committed. No dirty...
This lecture aims to fix the Concurrency & Partial Execution Example. We said that there a no good solutions to recover from this problem. Dirty Reads This is where the isolation property is not enforced in order to gain efficiency: Spend less time preventing dirty reads. Gain more parallelism by...
By making checkpoints we can enable faster recovery and make the log files use less space. Simple Checkpointing This method is applicable for undo logging. The idea is that we checkpoint the log periodically: Every $m$ minutes or after $t$ transaction since the last checkpoint. No need to undo transactions...
These notes are low-effort, due to catching up in this module. See the videos and slides for more detail. TCP Features TCP has the following features: Point-to-Point - one sender, one receiver Reliable, In-Order Byte Stream - no “message boundaries” Full Duplex Data: Bi-directional data flow in same connection. MSS...
These notes are low-effort, due to catching up in this module. See the videos and slides for more detail. Calculating Utilisation Stop and wait protocols are inefficient as ideally they can only send one packet per round trip time. To calculate the time to transmit a 1 MB packet into...
These notes are low-effort, due to catching up in this module. See the videos and slides for more detail. Recovering From Errors We can use acknowledgements and negative acknowledgements from the client to the sender: Acknowledgements (ACKs) - Tells the sender that the packet was received okay. Negative Acknowledgements (NACKs)...
These notes are low-effort, due to catching up in this module. See the videos and slides for more detail. Connection-Less Transport This means that there is: No handshaking between sender, receiver. Each UDP segment handled independently of others. This saves time, is simpler and gives a small header size. UDP...
These notes are low-effort, due to catching up in this module. See the videos and slides for more detail. Demultiplexing Each IP datagram carries the source and destination IP address and a transport-layer segment. This segment includes: Source Port Destination Port Other Header Fields Application Data Connection-less Demultiplexing This is...