当前位置:网站首页>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内核读数据拿到缓冲区,直接发出去
边栏推荐
- Getting started with Paxos
- node版本管理器nvm安装及切换
- Combinaison Oracle et json
- MySQL IN 和 NOT IN () 空列表报错
- Nordic nrf52832 flash 下载M4错误
- Skip the test cases to be executed in the unittest framework
- 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)
- 英特爾實驗室公布集成光子學研究新進展
- [buuctf.reverse] 144_[XMAN2018排位赛]easyvm
- CVPR22 |CMT:CNN和Transformer的高效结合(开源)
猜你喜欢

Intel Labs annonce de nouveaux progrès en photonique intégrée

Unittest 框架介绍及第一个demo

Value 1000 graduation project campus information publishing platform website source code

“目标检测”+“视觉理解”实现对输入图像的理解及翻译(附源代码)

软件项目管理 9.2.软件项目配置管理过程

In June 2022, it was the first programming language?!

商汤进入解禁期:核心管理层自愿禁售 强化公司长期价值信心

Huawei Equipment configure les services de base du réseau WLAN à grande échelle

Ten years of sharpening a sword: unveiling the secrets of ant group's observability platform antmonitor

为什么一定要从DevOps走向BizDevOps?
随机推荐
BAIC bluevale: performance under pressure, extremely difficult period
The first anniversary of the data security law, which four major changes are coming?
【MAUI】为 Label、Image 等控件添加点击事件
Database experiment report (I)
Getting started with Paxos
Value 1000 graduation project campus information publishing platform website source code
CPI教程-异步接口创建及使用
How does MySQL copy table data from one database to another (two databases are not linked to the same database)
MySQL in and not in() empty list error
openinstall:微信小程序跳转H5配置业务域名教程
Oracle和JSON的结合
Why must we move from Devops to bizdevops?
CVPR 2022 | self enhanced unpaired image defogging based on density and depth decomposition
华泰证券网上开户安全吗?
Website source code whole site download website template source code download
How to realize the four isolation levels of MySQL (brief)
Y48. Chapter III kubernetes from introduction to mastery -- pod status and probe (21)
LeetCode. One question of the day: offer II 091 Paint the house (DP problem)
商汤进入解禁期:核心管理层自愿禁售 强化公司长期价值信心
Jd.com renewed its cooperation with Tencent: issuing class A shares to Tencent with a maximum value of US $220million