# 锁内存定义

## 目录

* [锁的释放-获取建立的happens-before关系](/java-concurrent/di-san-zhang-java-nei-cun-mo-xing/suo-nei-cun-ding-yi/suo-de-shi-653e-huo-qu-jian-li-de-happens-before-guan-xi.md)
* [锁的释放和获取的内存语义](/java-concurrent/di-san-zhang-java-nei-cun-mo-xing/suo-nei-cun-ding-yi/suo-de-shi-fang-he-huo-qu-de-nei-cun-yu-yi.md)
* [锁内存语义的实现](/java-concurrent/di-san-zhang-java-nei-cun-mo-xing/suo-nei-cun-ding-yi/suo-nei-cun-yu-yi-de-shi-xian.md)
* [concurrent包的实现](/java-concurrent/di-san-zhang-java-nei-cun-mo-xing/suo-nei-cun-ding-yi/concurrentbao-de-shi-xian.md)

众所周知，锁可以让临界区互斥执行。这里将介绍锁的另一个同样重要，但常常被忽视的功能：锁的内存语义。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tuonioooo-notebook.gitbook.io/java-concurrent/di-san-zhang-java-nei-cun-mo-xing/suo-nei-cun-ding-yi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
