参考书籍《Java并发编程的艺术》
一、并发编程的基础
1、多线程上下文切换
概念:https://www.cnblogs.com/xrq730/p/5186609.html
2、如何减少上下文切换
方式: https://www.jianshu.com/p/1dd95d9bc8c5
a、无锁编程
b、Cas算法:
c、使用最少线程
d、使用协程:单线程执行多个任务的方式,减少线程切换
3、死锁产生的条件和解决方式:
条件: https://blog.csdn.net/hd12370/article/details/82814348
http://c.biancheng.net/view/1236.html
解决方式:
http://c.biancheng.net/view/2620.html
https://blog.csdn.net/ysl1242157902/article/details/52904883
4、线程间的通信方式
https://juejin.im/post/5d595558e51d4561ac7bccc4
https://www.cnblogs.com/lgyxrk/p/10404839.html
5、Java的各种锁
https://www.cnblogs.com/jyroy/p/11365935.html
6、线程间的状态转换
二、多线程关键字
1、volatile的实现原理
CPU原理
http://ifeve.com/volatile/
内存语义原理
https://baijiahao.baidu.com/s?id=1655055831382625926&wfr=spider&for=pc
volatile不能确保原子性的原因:
https://www.zhihu.com/question/329746124
https://fireinrain.com/2020/02/01/volatile%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%8D%E8%83%BD%E4%BF%9D%E8%AF%81%E5%8E%9F%E5%AD%90%E6%80%A7/
2、synchronized的实现原理
实现原理:
https://www.jianshu.com/p/e62fa839aa41
锁升级:
https://blog.csdn.net/tongdanping/article/details/79647337
https://blog.csdn.net/baidu_38083619/article/details/82527461
https://juejin.im/post/5c936018f265da60ec281bcb
3、如何保证原子性(CAS和锁)
https://www.jianshu.com/p/435dc89816cd
三、多线程java内存模型
1、java指令重排序
https://blog.csdn.net/yjp198713/article/details/78839698
https://tech.meituan.com/2014/09/23/java-memory-reordering.html (美团技术)
2、重排序对多线程的影响
https://www.jianshu.com/p/586e44045453
3、as-if-serial语义
https://blog.csdn.net/Lzz0614/article/details/89975284
4、happen-before的含义和原则
https://www.jianshu.com/p/1508eedba54d/
https://www.cnblogs.com/fanyi0922/p/11486580.html
5、volatile的内存语义
https://www.cnblogs.com/yuanfy008/p/9335168.html
6、final的内存语义
https://www.cnblogs.com/senlinyang/p/7875468.html
7、锁的内存语义
https://www.cnblogs.com/yuanfy008/p/9346925.html
四、并发包底层依赖原理
1、AQS(AbstractQueuedSynchronizer) 结合源码
https://www.jianshu.com/p/cc308d82cc71
共享锁
https://www.jianshu.com/p/1161d33fc1d0
2、CAS 以及相关问题
https://juejin.im/post/5a73cbbff265da4e807783f5
ABA问题的处理 (AtomicStampedReference)
https://www.jianshu.com/p/8b227a8adbc1
AtomicStampedReference的原理
https://blog.csdn.net/lizc_lizc/article/details/102989288
3、Unsafe的实现原理
https://www.jianshu.com/p/db8dce09232d
4、ReentrantLock原理
https://www.cnblogs.com/sunshine-ground-poems/p/10340147.html
https://blog.csdn.net/qq_20597727/article/details/86263237
五、原子类
1、基本数据类型
2、原子更新数组
3、原子更新引用类型
4、原子更新字段
六、并发工具类
1、CountdownLatch的作用和工作原理 (直接基于AQS实现)
https://cloud.tencent.com/developer/article/1038486
2、CycileBarrier的作用和工作原理 (基于ReentrantLock+Condition实现)
https://www.cnblogs.com/200911/p/6060195.html
3、Semaphore信号量的作用和工作原理 (直接基于AQS实现)
https://www.cnblogs.com/sunshine-ground-poems/p/10398475.html
4、Exchange
七、线程池工作原理
1、线程池工作原理(组成参数)
https://www.cnblogs.com/captainad/p/10943091.html
2、线程池源码分析
https://blog.csdn.net/mayongzhan_csdn/article/details/80790966
https://blog.csdn.net/programmer_at/article/details/79799267
八、java并发编程实战
1、生产者与消费者的实现
https://juejin.im/entry/596343686fb9a06bbd6f888c
2、创建多少线程合适
https://mp.weixin.qq.com/s/TTxKi2_x2vyH6EiqgSLoIg
3、面试题
https://thinkwon.blog.csdn.net/article/details/104863992
方志朋
https://mp.weixin.qq.com/s/VQFnvA345cRqOzKPpXR21A
4、高并发限流
https://www.cnblogs.com/itsoku123/p/11383684.html
https://zhuanlan.zhihu.com/p/99348889