> For the complete documentation index, see [llms.txt](https://jupiter-1992.gitbook.io/jupiter-note/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jupiter-1992.gitbook.io/jupiter-note/hou-duan/netty/01-bio-nio-aio.md).

# 01 BIO、NIO、AIO

阻塞与非阻塞：线程访问资源，该资源是否准备就绪的一种处理方式。阻塞会一直等待资源就绪，而非阻塞会立即响应结果，先处理其他资源。

同步和异步：访问数据的一种机制。

![阻塞与非阻塞](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/01_阻塞与非阻塞.png)

![同步与异步](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/02_同步与异步.png)

![BIO](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/03_BIO.png)

![NIO](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/04_NIO.png)

![AIO](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/05_AIO.png)

![生活实例](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/06_生活实例.png)

![三者区别](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/07_三者区别.png)

## Reactor 线程模型

![单线程模型](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/08_单线程模型.png)

![多线程模型](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/09_多线程模型.png)

![主从线程模型](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/BIO-NIO-AIO/10_主从线程模型.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://jupiter-1992.gitbook.io/jupiter-note/hou-duan/netty/01-bio-nio-aio.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.
