当前位置:网站首页>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 .
边栏推荐
- 【指针】统计一字符串在另一个字符串中出现的次数
- The salary of testers is polarized. How to become an automated test with a monthly salary of 20K?
- Database monitoring SQL execution
- Statistics 8th Edition Jia Junping Chapter 10 summary of knowledge points of analysis of variance and answers to exercises after class
- 指针 --按字符串相反次序输出其中的所有字符
- 函数:计算字符串中大写字母的个数
- My first blog
- 数字电路基础(三)编码器和译码器
- Statistics, 8th Edition, Jia Junping, Chapter VIII, summary of knowledge points of hypothesis test and answers to exercises after class
- Based on authorized access, cross host, and permission allocation under sqlserver
猜你喜欢
What is the transaction of MySQL? What is dirty reading and what is unreal reading? Not repeatable?
. Net6: develop modern 3D industrial software based on WPF (2)
High concurrency programming series: 6 steps of JVM performance tuning and detailed explanation of key tuning parameters
Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
Fundamentals of digital circuits (I) number system and code system
《统计学》第八版贾俊平第十四章指数知识点总结及课后习题答案
Statistics 8th Edition Jia Junping Chapter 4 Summary and after class exercise answers
Four methods of exchanging the values of a and B
What level do 18K test engineers want? Take a look at the interview experience of a 26 year old test engineer
数字电路基础(三)编码器和译码器
随机推荐
【指针】求解最后留下的人
Summary of thread implementation
JDBC read this article is enough
Vysor uses WiFi wireless connection for screen projection_ Operate the mobile phone on the computer_ Wireless debugging -- uniapp native development 008
Uibutton status exploration and customization
c语言学习总结(上)(更新中)
Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
With 27K successful entry ByteDance, this "software testing interview notes" has benefited me for life
函数:计算字符串中大写字母的个数
数字电路基础(二)逻辑代数
Soft exam information system project manager_ Project set project portfolio management --- Senior Information System Project Manager of soft exam 025
Pointer -- output all characters in the string in reverse order
DVWA exercise 05 file upload file upload
Fire! One day transferred to go engineer, not fire handstand sing Conquest (in serial)
flask实现强制登陆
Realize applet payment function with applet cloud development (including source code)
The common methods of servlet context, session and request objects and the scope of storing data in servlet.
Fundamentals of digital circuit (IV) data distributor, data selector and numerical comparator
[pointer] solve the last person left
[pointer] counts the number of times one string appears in another string