当前位置:网站首页>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 .
边栏推荐
- Database monitoring SQL execution
- flask实现强制登陆
- [pointer] find the length of the string
- Statistics 8th Edition Jia Junping Chapter 4 Summary and after class exercise answers
- Fundamentals of digital circuits (II) logic algebra
- Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
- Matplotlib绘图快速入门
- Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
- Function: calculates the number of uppercase letters in a string
- Intranet information collection of Intranet penetration (3)
猜你喜欢

《统计学》第八版贾俊平第七章知识点总结及课后习题答案
![Transplant hummingbird e203 core to Da Vinci pro35t [Jichuang xinlai risc-v Cup] (I)](/img/85/d6b196f22b60ad5003f73eb8d8a908.png)
Transplant hummingbird e203 core to Da Vinci pro35t [Jichuang xinlai risc-v Cup] (I)

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

Fundamentals of digital circuit (V) arithmetic operation circuit

Query method of database multi table link

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

. Net6: develop modern 3D industrial software based on WPF (2)

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

150 common interview questions for software testing in large factories. Serious thinking is very valuable for your interview

Statistics, 8th Edition, Jia Junping, Chapter 11 summary of knowledge points of univariate linear regression and answers to exercises after class
随机推荐
My first blog
The salary of testers is polarized. How to become an automated test with a monthly salary of 20K?
[pointer] find the largest string
Bing Dwen Dwen official NFT blind box will be sold for about 626 yuan each; JD home programmer was sentenced for deleting the library and running away; Laravel 9 officially released | Sifu weekly
[pointer] counts the number of times one string appears in another string
内网渗透之内网信息收集(三)
servlet中 servlet context与 session与 request三个对象的常用方法和存放数据的作用域。
MySQL interview questions (4)
《统计学》第八版贾俊平第七章知识点总结及课后习题答案
指针:最大值、最小值和平均值
数字电路基础(三)编码器和译码器
浙大版《C语言程序设计实验与习题指导(第3版)》题目集
Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
Summary of thread implementation
【指针】八进制转换为十进制
Statistics 8th Edition Jia Junping Chapter 10 summary of knowledge points of analysis of variance and answers to exercises after class
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
【指针】删除字符串s中的所有空格
指针--剔除字符串中的所有数字
Binary search tree concept