当前位置:网站首页>Understanding the IO model
Understanding the IO model
2022-06-28 09:03:00 【Know what you know】
BIO
Synchronize and block ( Traditional obstructive type ), The server implements a pattern of one thread per connection , That is, when the client has a connection request, the server needs to start a thread for processing , If the connection does nothing, it will cause unnecessary thread overhead .

NIO
Synchronous nonblocking , The server implementation mode deals with multiple requests for one thread ( Connect ), That is, the connection request sent by the client will be registered on the multiplexer , Multiplexer polled for I/O The request will be processed .

Selector
Selector The multiplexer is right linux Under the select/poll/epoll encapsulate ,selector There can be multiple implementations ,linux By default, the system uses epoll How to implement .
- Java Of NIO Non blocking I/O The way . You can handle several client connections with one thread , Will be used to Selector( Selectors ).
- Selector It can detect whether events occur on multiple registration channels ( Multiple Channel Register to the same as an event selector), If something happens , Then we get the events and deal with them accordingly .
- Only when there is a real read-write event in the connection , To read and write , Reduced system overhead , And you don't have to create a thread for each connection , No need to maintain multiple threads .
- Avoid the overhead caused by context switching between multiple threads .
AIO
Asynchronous non-blocking ,AIO The concept of asynchronous channel is introduced , Adopted Proactor Pattern , Simplified programming , Valid request to start thread , Its characteristic is to inform the server program to start the thread to process after the operating system completes , Generally, it is suitable for applications with more connections and longer connection time .
边栏推荐
- DEJA_ Vu3d - 051 of cesium function set - perfect realization of terrain excavation
- 玩玩sftp上传文件
- High rise building fire prevention
- 个人究竟如何开户炒股?在线开户安全么?
- Is it safe for CICC fortune to open an account? How much do you charge?
- Assertions used in the interface automation platform
- Is it safe to open an account for mobile phone stock speculation?
- 罗氏线圈可以测量的大电流和频率范围
- JMeter -- interface test 2
- Maintenance and protection of common faults of asynchronous motor
猜你喜欢

如何抑制SiC MOSFET Crosstalk(串扰)?

RMAN backup message ora-19809 ora-19804

Test cases for learning the basic content of software testing (II)
![[.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service](/img/19/296f124becb87461accf8b73b0a8bc.png)
[.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service
理解IO模型

Common tools for interface testing --postman

Apiccloud, together with 360 Tianyu, helps enterprises keep the "first pass" of APP security

Webrtc advantages and module splitting
![[cloud native | kubernetes] in depth understanding of pod (VI)](/img/ae/f16f5c090251ab603b88ddadff7eb3.png)
[cloud native | kubernetes] in depth understanding of pod (VI)

redis5.0的槽点迁移,随意玩(单机迁移集群)
随机推荐
Data modeling based on wide table
Which securities company is better and safer to choose when opening an account for the inter-bank certificate of deposit fund with mobile phone
Analysis of prepaid power purchase device
隐私计算FATE-----离线预测
Application of current limiting protector in preventing electrical fire in shopping malls
High rise building fire prevention
Which is a better ERP management system for electronic component sales?
The Falling Leaves
Privacy computing fat----- offline prediction
temple
Implement global double finger long press to return to the desktop
Rman Backup Report Ora - 19809 Ora - 19804
Is it safe to open an account for mobile phone stock speculation?
【转载】STM32 GPIO类型
Decision table method for basic content learning of software testing (2)
How to implement two factor authentication MFA based on RADIUS protocol?
Postman interface test
The Cassandra cluster reinstalls and starts from the node. An error is reported. There is an existing solution
Basic content learning of software testing (I)
Maintenance and protection of common faults of asynchronous motor