当前位置:网站首页>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 .
边栏推荐
- 信息安全实验三 :PGP邮件加密软件的使用
- Schema-validation: wrong column type encountered in column XXX in table XXX
- Unity shader (basic concept)
- Sublime Text4 download the view in bower and set the shortcut key
- Postman setting environment variables
- Register address name mapping
- Information Security Experiment 3: the use of PGP email encryption software
- 5A summary: seven stages of PMP learning
- 12、 Sort
- Netease Cloud Wechat applet
猜你喜欢
Postman interface debugging method
The configuration and options of save actions are explained in detail, and you won't be confused after reading it
Jenkins automated email
网易云微信小程序
Nested (multi-level) childrn routes, query parameters, named routes, replace attribute, props configuration of routes, params parameters of routes
Difference between interface iterator and iteratable
4、 Fundamentals of machine learning
Unity shader (learn more about vertex fragment shaders)
Detailed learning notes of JVM memory structure (I)
Variable parameter of variable length function
随机推荐
CMD startup software passes in parameters with spaces
(3/8) method parameters of improper use of enumeration (2)
12、 Sort
JS inheritance prototype
Redis common commands
Register address name mapping
How long does the PMP usually need to prepare for the exam in advance?
Postman data driven
Jenkins task grouping
sqlplus乱码问题,求解答
What is MD5
shake数据库中怎么使用Mongo-shake实现MongoDB的双向同步啊?
Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
二叉树高频题型
Jenkins modifies the system time
Data association between two interfaces of postman
信息安全实验二 :使用X-SCANNER扫描工具
进程和线程的区别
Mysql database transaction learning notes
Over 100000 words_ Ultra detailed SSM integration practice_ Manually implement permission management