---
title: "jdk util concurrent 源码阅读（一）"
author: "youngphy"
date: "2013-03-08T11:34:59Z"
tags: []
categories: ["编程语言"]
slug: "jdk-util-concurrent"
draft: false
lastmod: "2013-03-12T11:39:20Z"
id: 1826104
url: "https://youngphy.iteye.com/blog/1826104"
---

对于object隐式锁和lock(condition)两种方式，下面问题：
1. entry set 抢锁机制
2. wait set 唤醒机制（随机？）
3. wait set 唤醒之后没有抢到锁直接放入entry set?还是继续留存wait set?
4. reentrantlock lock readwritelock 经典场景

To a great extent, the manner in which a Java Virtual Machine implementation selects the next thread from the wait or entry sets is a decision of individual implementation designers. For example, implementation designers can decide how to select:
* thread from the wait set given a notify command 
* the order to resurrect threads from the wait set given a notify all command 
* the order to allow threads from the entry set to acquire the monitor 
* how to choose between threads suspended in the wait set versus the entry set after a notify command

阅读资料：
1. inside jvm
2. java concurrecy in practice
3. java 多线程
待补

http://robbinfan.com/blog/38/orm-cache-sumup