当前位置:网站首页>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 .
边栏推荐
- Why should Li Shufu personally take charge of building mobile phones?
- The NTFS format converter (convert.exe) is missing from the current system
- 微信小程序获取手机号
- How to use scroll bars to dynamically adjust parameters in opencv
- 酷雷曼多种AI数字人形象,打造科技感VR虚拟展厅
- 基本磁盘与动态磁盘 RAID磁盘冗余阵列区分
- Sqoop I have everything you want
- PyTorch 提取中间层特征?
- Xin'an Second Edition: Chapter 25 mobile application security requirements analysis and security protection engineering learning notes
- 视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
猜你喜欢

Pourquoi Li shufu a - t - il construit son téléphone portable?

BearPi-HM_ Nano development board "flower protector" case

Distinguish between basic disk and dynamic disk RAID disk redundant array

在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?

Spark accumulator and broadcast variables and beginners of sparksql

Grafana 9 正式发布,更易用,更酷炫了!

李书福为何要亲自挂帅造手机?

How to solve the error "press any to exit" when deploying multiple easycvr on one server?

FlutterWeb瀏覽器刷新後無法回退的解决方案

Smart street lamp based on stm32+ Huawei cloud IOT design
随机推荐
C语言通过指针交换两个数
Reppoints: advanced order of deformable convolution
李书福为何要亲自挂帅造手机?
BearPi-HM_ Nano development board "flower protector" case
Selected technical experts from China Mobile, ant, SF, and Xingsheng will show you the guarantee of architecture stability
Wechat applet obtains mobile number
【Elastic】Elastic缺少xpack无法创建模板 unknown setting index.lifecycle.name index.lifecycle.rollover_alias
Shell input a string of numbers to determine whether it is a mobile phone number
SAP UI5 框架的 manifest.json
The integrated real-time HTAP database stonedb, how to replace MySQL and achieve nearly a hundredfold performance improvement
8位MCU跑RTOS有没有意义?
Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
Establishment of graphical monitoring grafana
【Android】Kotlin代码编写规范化文档
kivy教程之在 Kivy 中支持中文以构建跨平台应用程序(教程含源码)
Chrome prompts the solution of "your company management" (the startup page is bound to the company's official website and cannot be modified)
78 岁华科教授逐梦 40 载,国产数据库达梦冲刺 IPO
How to submit data through post
Alertmanager sends the alarm email and specifies it as the Alibaba mailbox of the company
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?