当前位置:网站首页>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 .
边栏推荐
- 8位MCU跑RTOS有没有意义?
- [elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
- Scratch epidemic isolation and nucleic acid detection Analog Electronics Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
- Unity小技巧 - 绘制瞄准准心
- Solution qui ne peut pas être retournée après la mise à jour du navigateur Web flutter
- Pytest learning ----- detailed explanation of the request for interface automation test
- VR全景婚礼,帮助新人记录浪漫且美好的场景
- 分布式不来点网关都说不过去
- Wechat applet obtains mobile number
- 中移动、蚂蚁、顺丰、兴盛优选技术专家,带你了解架构稳定性保障
猜你喜欢
编译原理——预测表C语言实现
Summary of Android interview questions of Dachang in 2022 (II) (including answers)
PyTorch 提取中间层特征?
面试突击63:MySQL 中如何去重?
JMeter interface test response data garbled
Interview shock 62: what are the precautions for group by?
偷窃他人漏洞报告变卖成副业,漏洞赏金平台出“内鬼”
Zen integration nails, bugs, needs, etc. are reminded by nails
Easy introduction to SQL (1): addition, deletion, modification and simple query
Alibaba brand data bank: introduction to the most complete data bank
随机推荐
RB157-ASEMI整流桥RB157
Kali2021 installation and basic configuration
The integrated real-time HTAP database stonedb, how to replace MySQL and achieve nearly a hundredfold performance improvement
Establishment of graphical monitoring grafana
分布式(一致性协议)之领导人选举( DotNext.Net.Cluster 实现Raft 选举 )
Example of batch update statement combining update and inner join in SQL Server
Basic configuration and use of spark
Video fusion cloud platform easycvr adds multi-level grouping, which can flexibly manage access devices
MySQL error reporting solution
Reppoints: advanced order of deformable convolution
Hongmeng introduction and development environment construction
开源与安全的“冰与火之歌”
[getting started with MySQL] fourth, explore operators in MySQL with Kiko
微信小程序中给event对象传递数据
Pyspark operator processing spatial data full parsing (4): let's talk about spatial operations first
Kivy tutorial: support Chinese in Kivy to build cross platform applications (tutorial includes source code)
Mysqlimport imports data files into the database
酷雷曼多种AI数字人形象,打造科技感VR虚拟展厅
李书福为何要亲自挂帅造手机?
Essai de pénétration du Code à distance - essai du module b