Skip to content

Commit

Permalink
Merge pull request #235 from QianKuang8/patch-10
Browse files Browse the repository at this point in the history
Fix Typo Update selete_poll_epoll.md
  • Loading branch information
xiaolincoder committed May 23, 2024
2 parents 6e024ed + d8da799 commit e8a871e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/8_network_system/selete_poll_epoll.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ sk_buff 可以表示各个层的数据包,在应用层数据包叫 data,在

一个进程虽然任意时刻只能处理一个请求,但是处理每个请求的事件时,耗时控制在 1 毫秒以内,这样 1 秒内就可以处理上千个请求,把时间拉长来看,多个请求复用了一个进程,这就是多路复用,这种思想很类似一个 CPU 并发多个进程,所以也叫做时分多路复用。

我们熟悉的 select/poll/epoll 内核提供给用户态的多路复用系统调用**进程可以通过一个系统调用函数从内核中获取多个事件**
我们熟悉的 select/poll/epoll 是内核提供给用户态的多路复用系统调用**进程可以通过一个系统调用函数从内核中获取多个事件**

select/poll/epoll 是如何获取网络事件的呢?在获取事件时,先把所有连接(文件描述符)传给内核,再由内核返回产生了事件的连接,然后在用户态中再处理这些连接对应的请求即可。

Expand Down

0 comments on commit e8a871e

Please sign in to comment.