Skip to content

Commit

Permalink
✏更新 NIO
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcaffebabe committed Jul 31, 2020
1 parent fee2fc1 commit 0e88822
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
20 changes: 19 additions & 1 deletion 编程语言/JAVA/高级/NIO.md
Expand Up @@ -180,4 +180,22 @@ while (true) {
iterator.remove();
}
}
```
```

## 系统层面的NIO

BIO模型

![批注 2020-06-18 143426](/assets/批注%202020-06-18%20143426.png)

同步非阻塞 NIO

![批注 2020-06-18 143440](/assets/批注%202020-06-18%20143440.png)

在用户空间对fd轮询 需要在内核与用户空间之间拷贝fd

![批注 2020-06-18 143959](/assets/批注%202020-06-18%20143959.png)

多路复用 无需再拷贝fd

![批注 2020-06-18 144854](/assets/批注%202020-06-18%20144854.png)
10 changes: 0 additions & 10 deletions 计算机系统/程序间的交互和通信/系统级IO.md
Expand Up @@ -63,13 +63,3 @@ int dup2(int ofd,int nfd);
```
![](https://images.cnblogs.com/cnblogs_com/mydomain/201107/201107032229433652.png)
## NIO
![批注 2020-06-18 143426](/assets/批注%202020-06-18%20143426.png)
![批注 2020-06-18 143440](/assets/批注%202020-06-18%20143440.png)
![批注 2020-06-18 143959](/assets/批注%202020-06-18%20143959.png)
![批注 2020-06-18 144854](/assets/批注%202020-06-18%20144854.png)

0 comments on commit 0e88822

Please sign in to comment.