当前位置:网站首页>Difference between process and thread
Difference between process and thread
2022-07-07 09:27:00 【wrdoct】
Difference between process and thread
process :
An application that runs in memory .
Each process has its own independent memory space , A process can have multiple threads .
Threads :
An execution task in the process ( control unit ), Responsible for the execution of programs in the current process .
A process has at least one thread , A process can run multiple threads , Multiple threads can share data .
Fundamental difference : Processes are performed by the operating system Resource allocation The basic unit of , Thread is Independent scheduling The basic unit of .
address space : Process includes Independent address space , Threads do not have their own independent address space , it Share the space of the owning process .
resources : When the system is running Allocate resources for each process , Instead of allocating resources to threads , The resource used by a thread comes from the resource of the process it belongs to .
expenses : Between processes Switching costs a lot , Switching between threads The cost is relatively small ; Creating a thread costs less than a process .
signal communication : Interthread communication Communication between processes More convenient .
Inclusion relation : Thread is A lightweight process , It's part of the process .
Influence relationships : One After the process crashes , In protected mode No impact on other processes , however One thread crashes and the whole process dies . So multiprocessing is more robust than multithreading .
边栏推荐
- Unity shader (basic concept)
- 信息安全实验四:Ip包监视程序实现
- Unity shader (to achieve a simple material effect with adjustable color attributes only)
- Variable parameter of variable length function
- Where is the answer? action config/Interceptor/class/servlet
- Jenkins modifies the system time
- Entity of cesium data visualization (Part 1)
- Unity shader (data type in cghlsl)
- Jemter operation
- Interface test API case, data and interface separation
猜你喜欢
Where is the answer? action config/Interceptor/class/servlet
JVM garbage collection detailed learning notes (II)
Summary of PMP learning materials
網易雲微信小程序
VSCode+mingw64+cmake
其实特简单,教你轻松实现酷炫的数据可视化大屏
Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
如何使用clipboard.js库实现复制剪切功能
十二、排序
Selenium mouse sliding operation event
随机推荐
[SVN] what is SVN? How do you use it?
The configuration and options of save actions are explained in detail, and you won't be confused after reading it
信息安全实验三 :PGP邮件加密软件的使用
Loxodonframework quick start
消费互联网的产业链其实是很短的,它仅仅承接平台上下游的对接和撮合的角色
Unity shader (to achieve a simple material effect with adjustable color attributes only)
4、 Fundamentals of machine learning
四、机器学习基础
Yapi test plug-in -- cross request
C language pointer (Part 2)
Entity of cesium data visualization (Part 1)
Confitest of fixture py
SiteMesh getting started example
MySql数据库-索引-学习笔记
浏览器中如何让视频倍速播放
C language pointer (Part 1)
Systick tick timer
Serializer & modelserializer of DRF serialization and deserialization
What is the rating of Huishang futures company? Is it safe to open an account? I want to open an account, OK?
Some pit avoidance guidelines for using Huawei ECS