当前位置:网站首页>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 .
边栏推荐
- Schema-validation: wrong column type encountered in column XXX in table XXX
- Jmeters use
- The configuration and options of save actions are explained in detail, and you won't be confused after reading it
- Redis common commands
- Where is the answer? action config/Interceptor/class/servlet
- Information Security Experiment 3: the use of PGP email encryption software
- Difference between interface iterator and iteratable
- Jenkins modifies the system time
- How to pass the PMP Exam in a short time?
- Final keyword
猜你喜欢
Netease Cloud Wechat applet
Binary tree high frequency question type
Mysql database index study notes
Difference between interface iterator and iteratable
C language pointer (special article)
【云原生】DevOps(一):DevOps介绍及Code工具使用
STM32 clock system
如何使用clipboard.js库实现复制剪切功能
Mysql数据库-锁-学习笔记
Entity of cesium data visualization (Part 1)
随机推荐
Netease Cloud Wechat applet
Regular matching starts with XXX and ends with XXX
(3/8) method parameters of improper use of enumeration (2)
超十万字_超详细SSM整合实践_手动实现权限管理
JWT certification used in DRF
Storage of data in memory
Colorbar of using vertexehelper to customize controls (II)
Information Security Experiment 3: the use of PGP email encryption software
Interface test API case, data and interface separation
shake数据库中怎么使用Mongo-shake实现MongoDB的双向同步啊?
Unity shader (pass user data to shader)
Leetcode daily questions (2316. count unreachable pairs of nodes in an undirected graph)
Selenium mouse sliding operation event
Unity3d interface is embedded in WPF interface (mouse and keyboard can respond normally)
Entity of cesium data visualization (Part 1)
Unity shader (basic concept)
Huawei hcip datacom core_ 03day
flex弹性布局
华为HCIP-DATACOM-Core_03day
Mysql database lock learning notes