当前位置:网站首页>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 .
边栏推荐
- What is an index in MySQL? What kinds of indexes are commonly used? Under what circumstances will the index fail?
- 函数:计算字符串中大写字母的个数
- Constants, variables, and operators of SystemVerilog usage
- [pointer] find the length of the string
- SystemVerilog discusses loop loop structure and built-in loop variable I
- Es full text index
- 内网渗透之内网信息收集(三)
- 5 minutes to master machine learning iris logical regression classification
- Matplotlib绘图快速入门
- [Ogg III] daily operation and maintenance: clean up archive logs, register Ogg process services, and regularly back up databases
猜你喜欢
《统计学》第八版贾俊平第七章知识点总结及课后习题答案
“Hello IC World”
ES全文索引
Soft exam information system project manager_ Project set project portfolio management --- Senior Information System Project Manager of soft exam 025
150 common interview questions for software testing in large factories. Serious thinking is very valuable for your interview
Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
数字电路基础(四) 数据分配器、数据选择器和数值比较器
Statistics 8th Edition Jia Junping Chapter IX summary of knowledge points of classified data analysis and answers to exercises after class
servlet中 servlet context与 session与 request三个对象的常用方法和存放数据的作用域。
《统计学》第八版贾俊平第二章课后习题及答案总结
随机推荐
Keil5-MDK的格式化代码工具及添加快捷方式
数字电路基础(五)算术运算电路
Proceedingjoinpoint API use
Sentinel overall workflow
[pointer] find the largest string
《统计学》第八版贾俊平第十四章指数知识点总结及课后习题答案
About the garbled code problem of superstar script
关于超星脚本出现乱码问题
c语言学习总结(上)(更新中)
How to earn the first pot of gold in CSDN (we are all creators)
Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
Statistics 8th Edition Jia Junping Chapter 14 summary of index knowledge points and answers to exercises after class
王爽汇编语言学习详细笔记一:基础知识
The salary of testers is polarized. How to become an automated test with a monthly salary of 20K?
Statistics 8th Edition Jia Junping Chapter 2 after class exercises and answer summary
关于交换a和b的值的四种方法
【指针】求二维数组中最大元素的值
Function: calculates the number of uppercase letters in a string
Markdown font color editing teaching
Numpy Quick Start Guide