huihut 2021-04-02 19:17:30 +08:00
parent 0adfa8dcd1
commit e6dbc2b9c3
2 changed files with 2 additions and 2 deletions

View File

@ -2650,7 +2650,7 @@ So there is a FIN and ACK in each direction.
* Basic lock types: exclusive lock (X lock / write lock), shared lock (S lock / read lock). * Basic lock types: exclusive lock (X lock / write lock), shared lock (S lock / read lock).
* Livelock deadlock: * Livelock deadlock:
* Livelock: The transaction is always in a waiting state, which can be avoided through a first come, first served policy. * Livelock: The transaction is always in a waiting state, which can be avoided through a first come, first served policy.
* Deadlock: Things can never end * Deadlock: The transaction can never end
* Prevention: one-time block method, sequential block method; * Prevention: one-time block method, sequential block method;
* Diagnosis: timeout method, waiting graph method; * Diagnosis: timeout method, waiting graph method;
* Cancel: Undo the transaction with the least deadlock cost and release all the locks of this transaction, so that other transactions can continue to run. * Cancel: Undo the transaction with the least deadlock cost and release all the locks of this transaction, so that other transactions can continue to run.

View File

@ -2642,7 +2642,7 @@ ssize_t write(int fd, const void *buf, size_t count);
* 基本封锁类型排他锁X 锁 / 写锁、共享锁S 锁 / 读锁)。 * 基本封锁类型排他锁X 锁 / 写锁、共享锁S 锁 / 读锁)。
* 活锁死锁: * 活锁死锁:
* 活锁:事务永远处于等待状态,可通过先来先服务的策略避免。 * 活锁:事务永远处于等待状态,可通过先来先服务的策略避免。
* 死锁:事永远不能结束 * 死锁:事永远不能结束
* 预防:一次封锁法、顺序封锁法; * 预防:一次封锁法、顺序封锁法;
* 诊断:超时法、等待图法; * 诊断:超时法、等待图法;
* 解除:撤销处理死锁代价最小的事务,并释放此事务的所有的锁,使其他事务得以继续运行下去。 * 解除:撤销处理死锁代价最小的事务,并释放此事务的所有的锁,使其他事务得以继续运行下去。