当前位置:网站首页>The difference between parallelism and concurrency
The difference between parallelism and concurrency
2022-07-06 17:53:00 【TABE_】
Here's the catalog title
parallel
parallel (Parallel), When the system has more than one CPU when , When one CPU When executing a process , the other one CPU Another process can be executed , The two processes do not preempt each other CPU resources , You can do it at the same time , This way we call parallel (Parallel).
In fact, the determinant of parallelism is not CPU The number of , It is CPU The number of cores , For example, a CPU Multiple cores can also be parallel .
Concurrent
Concurrent (Concurrent), In the operating system , It means that several programs in a period of time are between the start and the completion of running , And these programs are all running on the same processor .
Concurrency is not really “ At the same time ”, It's just CPU Divide a time period into several time segments ( Time interval ), And then switch back and forth between these time intervals , because CPU The processing speed is very fast , As long as the time interval is handled properly , It makes users feel that multiple applications are running at the same time . Such as : Playing games and listening to music are both completed from the beginning to the end on the same computer in the same time period . that , It can be said that listening to music and playing games are concurrent .
The difference between concurrency and parallelism
Concurrent , It refers to multiple things , It happened at the same time . parallel , It refers to multiple things , At the same time .
Multiple concurrent tasks preempt each other's resources . Parallel tasks do not preempt each other's resources .
Concurrency is that multiple programs run simultaneously in a period of time , Parallelism is at some point , There are really multiple programs running .
Only in many CPU Or a CPU In the case of multicore , It's going to happen in parallel . otherwise , What seems to happen at the same time , In fact, they are all concurrent .
边栏推荐
- The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
- RB157-ASEMI整流桥RB157
- Xin'an Second Edition: Chapter 26 big data security demand analysis and security protection engineering learning notes
- Nodejs developer roadmap 2022 zero foundation Learning Guide
- MySQL 8 sub database and table backup database shell script
- scratch疫情隔离和核酸检测模拟 电子学会图形化编程scratch等级考试三级真题和答案解析2022年6月
- kivy教程之在 Kivy 中支持中文以构建跨平台应用程序(教程含源码)
- Getting started with pytest ----- allow generate report
- 面试突击62:group by 有哪些注意事项?
- PySpark算子处理空间数据全解析(5): 如何在PySpark里面使用空间运算接口
猜你喜欢
李書福為何要親自掛帥造手機?
【MySQL入门】第一话 · 初入“数据库”大陆
[translation] principle analysis of X Window Manager (I)
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
PySpark算子处理空间数据全解析(5): 如何在PySpark里面使用空间运算接口
Zen integration nails, bugs, needs, etc. are reminded by nails
C # nanoframework lighting and key esp32
开源与安全的“冰与火之歌”
Getting started with pytest ----- allow generate report
ASEMI整流桥DB207的导通时间与参数选择
随机推荐
Kivy tutorial: support Chinese in Kivy to build cross platform applications (tutorial includes source code)
Is it meaningful for 8-bit MCU to run RTOS?
SQL statement optimization, order by desc speed optimization
Pytest learning ----- pytest operation mode and pre post packaging of interface automation testing
After entering Alibaba for the interview and returning with a salary of 35K, I summarized an interview question of Alibaba test engineer
kivy教程之在 Kivy 中支持中文以构建跨平台应用程序(教程含源码)
10 advanced concepts that must be understood in learning SQL
[ASM] introduction and use of bytecode operation classwriter class
Spark calculation operator and some small details in liunx
微信小程序获取手机号
视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
Solution qui ne peut pas être retournée après la mise à jour du navigateur Web flutter
OpenEuler 会长久吗
[rapid environment construction] openharmony 10 minute tutorial (cub pie)
遠程代碼執行滲透測試——B模塊測試
sql语句优化,order by desc速度优化
Xin'an Second Edition: Chapter 25 mobile application security requirements analysis and security protection engineering learning notes
Getting started with pytest ----- test case rules
How to solve the error "press any to exit" when deploying multiple easycvr on one server?
Debug and run the first xv6 program