当前位置:网站首页>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 .
边栏推荐
- Unity粒子特效系列-闪星星的宝箱
- Olivetin can safely run shell commands on Web pages (Part 1)
- Stealing others' vulnerability reports and selling them into sidelines, and the vulnerability reward platform gives rise to "insiders"
- [rapid environment construction] openharmony 10 minute tutorial (cub pie)
- Why should Li Shufu personally take charge of building mobile phones?
- Cool Lehman has a variety of AI digital human images to create a vr virtual exhibition hall with a sense of technology
- Interview shock 62: what are the precautions for group by?
- 李書福為何要親自掛帥造手機?
- PySpark算子处理空间数据全解析(5): 如何在PySpark里面使用空间运算接口
- VR全景婚礼,帮助新人记录浪漫且美好的场景
猜你喜欢

基本磁盘与动态磁盘 RAID磁盘冗余阵列区分

Why should Li Shufu personally take charge of building mobile phones?

Stealing others' vulnerability reports and selling them into sidelines, and the vulnerability reward platform gives rise to "insiders"

Sqoop I have everything you want

Optimization of middle alignment of loading style of device player in easycvr electronic map

Kali2021 installation and basic configuration

【MySQL入门】第四话 · 和kiko一起探索MySQL中的运算符

After entering Alibaba for the interview and returning with a salary of 35K, I summarized an interview question of Alibaba test engineer

面试突击62:group by 有哪些注意事项?

FlutterWeb瀏覽器刷新後無法回退的解决方案
随机推荐
Solution qui ne peut pas être retournée après la mise à jour du navigateur Web flutter
Video fusion cloud platform easycvr adds multi-level grouping, which can flexibly manage access devices
面试突击62:group by 有哪些注意事项?
Essai de pénétration du Code à distance - essai du module b
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
Xin'an Second Edition: Chapter 26 big data security demand analysis and security protection engineering learning notes
SAP UI5 框架的 manifest.json
In terms of byte measurement with an annual salary of 30W, automated testing can be learned in this way
The NTFS format converter (convert.exe) is missing from the current system
Stealing others' vulnerability reports and selling them into sidelines, and the vulnerability reward platform gives rise to "insiders"
How to solve the error "press any to exit" when deploying multiple easycvr on one server?
Alertmanager sends the alarm email and specifies it as the Alibaba mailbox of the company
VR panoramic wedding helps couples record romantic and beautiful scenes
The art of Engineering
BearPi-HM_ Nano development board "flower protector" case
ASEMI整流桥DB207的导通时间与参数选择
FMT开源自驾仪 | FMT中间件:一种高实时的分布式日志模块Mlog
Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
How to use scroll bars to dynamically adjust parameters in opencv
EasyCVR授权到期页面无法登录,该如何解决?