当前位置:网站首页>同步/异步、阻塞/非阻塞 与 IO
同步/异步、阻塞/非阻塞 与 IO
2022-07-29 06:40:00 【HTmonster】
同步与异步
- 关键:能不能同时工作

阻塞与非阻塞
- 关键: 能不能动

两两组合
同步阻塞
- 可能表现:一个线程在等待

同步非阻塞
- 可能表现:一个线程在正常运行

异步阻塞
- 可能表现:多个线程在等待

异步非阻塞
- 可能表现:多个线程正常运行

I/O操作
- 过程1:等待数据到来
- 过程2:读写、拷贝数据
阻塞IO与非阻塞IO
阻塞IO:用户进程参与上述两个过程,被阻塞在IO过程上

非阻塞IO:用户进程不用参与到上述的两个过程,等完成后,内核通知用户线程

异步IO与信号驱动IO
- 信号驱动IO:当描述符数据就绪时,通过产生SIGIO信号发起对应用程序信号关联函数的调用,应用程序可通过recvfrom进行数据拷贝(还需要自己拷贝)

- 异步IO: 应用程序触发系统调用后可立即返回,内核在数据拷贝完成后再对应用程序发出信号,触发应用程序逻辑。(不需要自己拷贝)

模型对比

边栏推荐
- fillder使用
- [C language brush leetcode] 1054. Bar code with equal distance (m)
- MySQL queries are case sensitive
- Guess the number / / generate a random number for the first time
- gin 服务退出
- 2D cartoon rendering - advanced skills
- Win11vmware turns on the virtual machine and restarts on the blue screen and the solution that cannot be started
- MySQL 有这一篇就够(呕心狂敲37k字,只为博君一点赞!!!)
- Summary of OCR optical character recognition methods
- WPF 界面布局必知基础
猜你喜欢

CVPR2021| 基于自监督学习的多视图立体匹配 (CVPR2021)

VMware16创建虚拟机:Win11无法安装

最新百亿量化私募名单
![[Charles' daily problems] when you open Charles, you can't use nails](/img/ef/037fc416175d4de769ac6484cb53df.png)
[Charles' daily problems] when you open Charles, you can't use nails

ECCV 2022 lightweight model frame Parc net press apple mobilevit code and paper Download

作业7.28 文件IO与标准IO

2022-07-28:以下go语言代码输出什么?A:AA;B:AB;C:BA;D:BB。 package main import ( “fmt“ ) func main() { f

win11系统错误:由于找不到 iertutil.dll,无法继续执行代码。重新安装程序可能会解决此问题

Why does ETL often become ELT or even let?

Student achievement ranking system based on C language design
随机推荐
Thread - thread safety - thread optimization
WPF 界面布局必知基础
我的创业邻居们
Summary of OCR optical character recognition methods
npm install报错npm ERR Could not resolve dependency npm ERR peer
Flink real time warehouse DWD layer (traffic domain) template code
Improved pillar with fine grained feature for 3D object detection paper notes
Guess the number / / generate a random number for the first time
buck电路boot和ph引脚实测
MySQL 有这一篇就够(呕心狂敲37k字,只为博君一点赞!!!)
Analog volume leetcode [normal] 093. Restore IP address
spark学习笔记(七)——sparkcore核心编程-RDD序列化/依赖关系/持久化/分区器/累加器/广播变量
Leetcode 879. profit plan
SSH password free login - two virtual machines establish password free channel two-way trust
Cvpr2021 | multi view stereo matching based on self supervised learning (cvpr2021)
我的个人网站不让接入微信登录,于是我做了这个
【C语言刷LeetCode】1054. 距离相等的条形码(M)
MySQL----多表查询
VMware16创建虚拟机:无法创建新虚拟机,不具备执行此操作的权限
网上传说软件测试培训真的那么黑心吗?都是骗局?