当前位置:网站首页>epoll介绍
epoll介绍
2022-07-01 11:19:00 【每日一悟】
多个客户端连接到达kernel(内核)
线程/进程 read fd 读内核
BIO:socket在 这个时期是blocking (多进程)
NIO:同步非阻塞时期 (但进程)
多路复用NIO:kernel中增加了select
NIO:如果有1000fd代表用户进程轮训调用1000次kernel,成本大
多路复用NIO:kernel中增加了select ,内核先select(1000fds),返回有用的,进程再read(fd)
用户态、内核态
内核的区域,用户是不能访问的,所以需要传递数据,导致fd相关数据拷来拷去
如何改善:共享空间(红黑树、链表、mmap)属于内核的部分,也属于用户的部分
进程中文件描述符放红黑树,将数据放到链表里
零拷贝:kernel中多了个sendfile(系统调用)(out,in) 、read(fd)、write(fd)
网卡到kernel socketIO
文件到kernel 文件IO
sendfile:进程调sendfile内核读数据拿到缓冲区,直接发出去
边栏推荐
- Dameng data rushes to the scientific innovation board: it plans to raise 2.4 billion yuan. Feng Yucai was once a professor of Huake
- NeurIPS 2022 | 细胞图像分割竞赛正式启动!
- Tempest HDMI leak reception 4
- 微信小程序开发 – 用户授权登陆「建议收藏」
- CANN算子:利用迭代器高效实现Tensor数据切割分块处理
- kafuka学习之路(一)kafuka安装和简单使用
- IPlImage的width和widthStep
- Nordic nrf52832 flash download M4 error
- flutter path_ Provider: ^2.0.10 can get temporary directory
- 银行卡借给别人是否构成犯罪
猜你喜欢

Value 1000 graduation project campus information publishing platform website source code

MIT最新论文《对可解释特征的需求:动机和分类》:在机器学习模型的组成元素中建立可解释性

Mall applet source code open source version - two open

Applymiddleware principle

Unittest 框架介绍及第一个demo

BAIC bluevale: performance under pressure, extremely difficult period

Neurips 2022 | cell image segmentation competition officially launched!

China's cellular Internet of things users have reached 1.59 billion, and are expected to surpass mobile phone users within this year

TEMPEST HDMI泄漏接收 3

Huawei equipment is configured with large network WLAN basic services
随机推荐
Test case writing specification in unittest framework and how to run test cases
華為設備配置大型網絡WLAN基本業務
kafuka学习之路(一)kafuka安装和简单使用
Database experiment report (I)
Mingchuang plans to be listed on July 13: the highest issue price is HK $22.1, and the net profit in a single quarter decreases by 19%
Skip the test cases to be executed in the unittest framework
[buuctf.reverse] 144_[XMAN2018排位赛]easyvm
Width and widthstep of iplimage
IPlImage的width和widthStep
Why must we move from Devops to bizdevops?
Nordic nrf52832 flash 下载M4错误
When is testing not unit testing- When is a Test not a Unit-test?
Packet mode and three streaming modes in SDP protocol
The project bar on the left side of CodeBlocks disappears, workspace automatically saves the project, default workspace, open the last workspace, workspace (Graphic tutorial, solved)
证券账户销户后果 开户安全吗
Ultra detailed black apple installation graphic tutorial sent to EFI configuration collection and system
Nordic nrf52832 flash download M4 error
华为设备配置大型网络WLAN基本业务
Intel Labs announces new progress in integrated photonics research
Win平台下influxDB导出、导入