File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/main/java/com/algorithm/study/demo/thread Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 113113 - 对AbstractQueuedSynchronizer了解多少,讲讲加锁和解锁的流程,独占锁和公平所加锁有什么不同。
114114 - 使用synchronized修饰静态方法和非静态方法有什么区别。
115115 - 简述ConcurrentLinkedQueue和LinkedBlockingQueue的用处和不同之处。
116- - 导致线程死锁的原因?怎么解除线程死锁。
116+ - [ 导致线程死锁的原因?怎么解除线程死锁。] ( https://github.com/randian666/algorithm-study/blob/master/src/main/java/com/algorithm/study/demo/thread/DeadlockTest.java )
117117 - 非常多个线程(可能是不同机器),相互之间需要等待协调,才能完成某种工作,问怎么设计这种协调方案。
118118 - 用过读写锁吗,原理是什么,一般在什么场景下用。
119119 - 开启多个线程,如果保证顺序执行,有哪几种实现方式,或者如何保证多个线程都执行完再拿到结果。
Original file line number Diff line number Diff line change 33import java .util .concurrent .TimeUnit ;
44
55/**
6- * 死锁案例
7- *
6+ * 死锁是指两个或两个以上的进程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用,它们都将无法推进下去
87 * 避免死锁:一种是加锁顺序(线程按照一定的顺序加锁);另一种是加锁时限(线程尝试获取锁的时候加上一定的时限,超过时限则放弃对该锁的请求,并释放自己占有的锁);
98 */
109public class DeadlockTest {
You can’t perform that action at this time.
0 commit comments