当前位置:网站首页>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 .
边栏推荐
- [pointer] find the length of the string
- Pointeurs: maximum, minimum et moyenne
- C language learning summary (I) (under update)
- Login the system in the background, connect the database with JDBC, and do small case exercises
- Keil5 MDK's formatting code tool and adding shortcuts
- Uibutton status exploration and customization
- Fundamentals of digital circuits (I) number system and code system
- How to learn automated testing in 2022? This article tells you
- What level do 18K test engineers want? Take a look at the interview experience of a 26 year old test engineer
- 函数:计算字符串中大写字母的个数
猜你喜欢

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

《统计学》第八版贾俊平第十章方差分析知识点总结及课后习题答案

Want to learn how to get started and learn software testing? I'll give you a good chat today

Fundamentals of digital circuits (III) encoder and decoder

SystemVerilog discusses loop loop structure and built-in loop variable I

Statistics 8th Edition Jia Junping Chapter IX summary of knowledge points of classified data analysis and answers to exercises after class

Proceedingjoinpoint API use

Statistics, 8th Edition, Jia Junping, Chapter 11 summary of knowledge points of univariate linear regression and answers to exercises after class

Four methods of exchanging the values of a and B

Apache APIs IX has the risk of rewriting the x-real-ip header (cve-2022-24112)
随机推荐
[pointer] octal to decimal
Fundamentals of digital circuit (V) arithmetic operation circuit
Statistics 8th Edition Jia Junping Chapter 5 probability and probability distribution
《统计学》第八版贾俊平第十二章多元线性回归知识点总结及课后习题答案
Fundamentals of digital circuits (III) encoder and decoder
Transplant hummingbird e203 core to Da Vinci pro35t [Jichuang xinlai risc-v Cup] (I)
浙大版《C语言程序设计实验与习题指导(第3版)》题目集
Four methods of exchanging the values of a and B
Sentinel overall workflow
Statistics 8th Edition Jia Junping Chapter 4 Summary and after class exercise answers
Keil5-MDK的格式化代码工具及添加快捷方式
ES全文索引
使用 flask_whooshalchemyplus jieba实现flask的全局搜索
The salary of testers is polarized. How to become an automated test with a monthly salary of 20K?
flask实现强制登陆
High concurrency programming series: 6 steps of JVM performance tuning and detailed explanation of key tuning parameters
Always of SystemVerilog usage_ comb 、always_ iff
函数:求方程的根
How to use Moment. JS to check whether the current time is between 2 times
Don't you even look at such a detailed and comprehensive written software test question?