当前位置:网站首页>Differences between select, poll and epoll in i/o multiplexing
Differences between select, poll and epoll in i/o multiplexing
2022-07-06 14:52:00 【What should I do if I can't afford my beloved cat】
I/O Multiplexing select、poll and epoll difference
- select: Through it , We can send the array of file descriptors to the operating system , Let the operating system traverse , Wait until the data arrives , Tell us which file descriptor can be read and written . The operating system kernel does traversal , There is no switching overhead from user mode to kernel mode
- poll: It and select The main difference is , Removed select Can only monitor 1024 Limit of file descriptors . because select Descriptor types use arrays , The default size is 1024;poll The descriptor type of is linked list .
- epoll: It's solved select Three shortcomings of , The kernel holds a set of file descriptors , You can register new descriptors with the kernel , Or change the state of descriptors in the descriptor set ; The kernel no longer finds ready file descriptors by polling , It's through asynchrony IO Events awaken ; The kernel will only have IO The file descriptor of the event is returned to the user , Users don't have to traverse the entire set of file descriptors .
select Three deficiencies :
- Copying arrays to the kernel will consume resources
- select The kernel is still traversing to check the ready state of the file descriptor , It's a synchronous process , It's just that there's no system call context switching overhead .
- select Returns the number of readable file descriptors , It's up to the user to traverse which one is readable .
边栏推荐
- Function: find the root of the equation by Newton iterative method
- 【指针】求解最后留下的人
- 《统计学》第八版贾俊平第一章课后习题及答案总结
- 指针:最大值、最小值和平均值
- “人生若只如初见”——RISC-V
- Numpy快速上手指南
- Intranet information collection of Intranet penetration (3)
- The common methods of servlet context, session and request objects and the scope of storing data in servlet.
- The four connection methods of JDBC are directly coded
- . Net6: develop modern 3D industrial software based on WPF (2)
猜你喜欢

关于超星脚本出现乱码问题

Don't you even look at such a detailed and comprehensive written software test question?

《统计学》第八版贾俊平第六章统计量及抽样分布知识点总结及课后习题答案

Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class

5分钟掌握机器学习鸢尾花逻辑回归分类

Statistics, 8th Edition, Jia Junping, Chapter 6 Summary of knowledge points of statistics and sampling distribution and answers to exercises after class

Fundamentals of digital circuit (V) arithmetic operation circuit

数据库多表链接的查询方式

四元数---基本概念(转载)

《统计学》第八版贾俊平第八章假设检验知识点总结及课后习题答案
随机推荐
{1,2,3,2,5} duplicate checking problem
“Hello IC World”
数字电路基础(二)逻辑代数
New version of postman flows [introductory teaching chapter 01 send request]
What is an index in MySQL? What kinds of indexes are commonly used? Under what circumstances will the index fail?
JDBC 的四种连接方式 直接上代码
Keil5 MDK's formatting code tool and adding shortcuts
Why can swing implement a form program by inheriting the JFrame class?
四元数---基本概念(转载)
[Ogg III] daily operation and maintenance: clean up archive logs, register Ogg process services, and regularly back up databases
5 minutes to master machine learning iris logical regression classification
[pointer] find the value of the largest element in the two-dimensional array
Lintcode logo queries the two nearest saplings
线程的实现方式总结
《统计学》第八版贾俊平第三章课后习题及答案总结
Login the system in the background, connect the database with JDBC, and do small case exercises
数字电路基础(一)数制与码制
函数:用牛顿迭代法求方程的根
Résumé des points de connaissance et des réponses aux exercices après la classe du chapitre 7 de Jia junping dans la huitième édition des statistiques
Statistics, 8th Edition, Jia Junping, Chapter 11 summary of knowledge points of univariate linear regression and answers to exercises after class