当前位置:网站首页>NiO knowledge points
NiO knowledge points
2022-07-24 10:14:00 【Pupils learning programming】
One 、NIO brief introduction
1)Java 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 this connection doesn't do anything, it will cause unnecessary thread overhead .
2)Java NIO : Synchronous nonblocking , The server implementation mode deals with multiple requests for one thread ( Connect ), That is, the connection requests sent by the client will be registered on the multiplexer , The multiplexer polls the connection to have I/O The request is processed .
Two 、 Several concepts of operating system
1、 Kernel state and user state
Kernel mode :cpu Access to all data in memory , Including peripherals , For example, hard disk , network card ,CUP You can also switch from one program to another .
User mode : Only limited access to memory , And access to peripherals is not allowed , Occupy CPU The ability to be deprived of .
Why do you want to use user state and kernel state ?
Because it is necessary to restrict the access ability between different programs , To prevent other programs from accessing memory , Or get peripheral data , And send it to the network , CPU There are two levels of authority – User mode and kernel mode .
When will the switch between kernel mode and user mode occur ?
【 When the user mode needs to apply for external resources, it will switch to the kernel mode 】. For example, execute system calls 、 It's happening
边栏推荐
- Set scrolling for the box
- Add a love power logo to your website
- note: expected ‘void * (***)(void ***)’ but argument is of type ‘void (*)(void *)’
- 聚集日志服务器
- [STM32 learning] (10) stm32f1 general timer realizes pulse counter
- How to solve command 'xxx GCC' not found, but can be installed with:??
- 2022, our small goal
- [leecode] get the longest common substring of two strings
- 2022 trusted cloud authoritative assessment released: Tianyi cloud has obtained ten certifications and five best practices
- 2022: I feel like sleeping for the first time during the day
猜你喜欢

String__

Do you really understand the concept of buffer? Take you to uncover the buffer zone~

Mysql database JDBC programming
![CAS principle [concurrent programming]](/img/f0/77e7e1079f70198c601b0f1e25106e.png)
CAS principle [concurrent programming]

二叉树、二叉树排序树的实现及遍历

Homologous policy solutions

2022 trusted cloud authoritative assessment released: Tianyi cloud has obtained ten certifications and five best practices

The paper of gaojingjian center was selected into the ACL 2022 of the international summit to further expand the privacy computing capacity of Chang'an chain

Raspberry Pie:: no space left on device

How does ribbon get the default zoneawareloadbalancer?
随机推荐
脚手架内各文件配置说明、组件化开发步骤
[leecode] get the longest common substring of two strings
How does SRE and development of Google cooperate
[STM32 learning] (10) stm32f1 general timer realizes pulse counter
Implementation principle of acid in MySQL
Raspberry Pie:: no space left on device
[STM32 learning] (18) STM32 realizes LCD12864 display - parallel implementation of 8-bit bus
NIO知识点
How does ribbon get the default zoneawareloadbalancer?
757. Set the intersection size to at least 2: greedy application question
[STM32 learning] (11) STM32 Mifare_ Use of one (S50) m1s50 (read, write, key modification, control bit interpretation)
[STM32 learning] (5) press the key to control the flow light (interrupt Implementation)
Arduino- use millis() to do two (or more) things at the same time
[STM32 learning] (4) press the key to control the flow light
Basic SQL operations
String sort
[STM32 learning] (9) stm32f1 general timer realizes simple breathing lamp
第五章 修改实现(IMPL)类
差分约束系统---1且2--2022年5月27日
【LeeCode】获取2个字符串的最长公共子串