当前位置:网站首页>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 .
边栏推荐
- 華為HCIP-DATACOM-Core_03day
- ComputeShader
- Network request process
- Pick up the premise idea of programming
- Kubernetes cluster capacity expansion to add node nodes
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
- C language pointer (special article)
- C language pointer (exercises)
- C language pointer (Part 2)
- 进程间的通信方式
猜你喜欢
华为HCIP-DATACOM-Core_03day
Information Security Experiment 1: implementation of DES encryption algorithm
正则匹配以XXX开头的,XXX结束的
四、机器学习基础
Locust performance test 4 (custom load Policy)
MySql数据库-事务-学习笔记
STM32 and motor development (from stand-alone version to Networking)
Difference between interface iterator and iteratable
Dynamics 365Online ApplicationUser创建方式变更
Error: selenium common. exceptions. WebDriverException: Messag‘geckodriver‘ execute
随机推荐
Entity of cesium data visualization (Part 1)
十二、排序
嵌套(多级)childrn路由,query参数,命名路由,replace属性,路由的props配置,路由的params参数
How does the project manager write the weekly summary and weekly plan?
Final keyword
Cesium does not support 4490 problem solution and cesium modified source code packaging scheme
LeetCode每日一题(2316. Count Unreachable Pairs of Nodes in an Undirected Graph)
Nested (multi-level) childrn routes, query parameters, named routes, replace attribute, props configuration of routes, params parameters of routes
[cloud native] Devops (I): introduction to Devops and use of code tool
4、 Fundamentals of machine learning
Regularly modify the system time of the computer
5A summary: seven stages of PMP learning
Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
Unity shader (pass user data to shader)
liunx命令
Over 100000 words_ Ultra detailed SSM integration practice_ Manually implement permission management
CMD startup software passes in parameters with spaces
MySql数据库-事务-学习笔记
JMeter JDBC batch references data as input parameters (the simplest method for the whole website)
答案在哪里?action config/Interceptor/class/servlet