当前位置:网站首页>线程和进程
线程和进程
2022-06-28 09:19:00 【李王家的翠花】
一、定义
进程:进程是指在系统中正在运行的一个应用程序。每个进程之间是独立的,每个进程均运行在其专用的且受保护的内存中,进程是系统进行资源分配和调度的一个独立单位。
线程:线程是进程的基本执行单元,一个进程的所有任务都在线程中执行。是CPU调度和分派的基本单位。程序启动会默认开启一条线程,这条线程被称为主线程或 UI 线程。
二、联系
进程要想执行任务,必须得有线程。同一进程的线程共享本进程的地址空间,同一进程内的线程共享本进程的资源。
三、区别
线程不能够独立执行,必须依存在应用程序中,由应用程序提供多个线程执行控制。多线程就是同一进程中有多个执行部分可以同时执行,来实现进程的调度和管理以及资源分配。
注:更新完JVM系列后会从内存的角度详细介绍两者区别。
边栏推荐
- Data mining modeling practice
- Illustration of MySQL binlog, redo log and undo log
- SQL injection file read / write
- 图解MySQL的binlog、redo log和undo log
- Prototype chain JS
- 如何实现基于 RADIUS 协议的双因子认证 MFA?
- 1. Kimball dimension modeling of data warehouse: what is a fact table?
- Dbeaver连接人大金仓KingbaseES V8(超详细图文教程)
- Edit the live broadcast source code with me. How to write the live broadcast app code
- 全链路业务追踪落地实践方案
猜你喜欢

SQL 优化经历:从 30248秒到 0.001秒的经历

1. Kimball dimension modeling of data warehouse: what is a fact table?

Ingersoll Rand面板维修IR英格索兰微电脑控制器维修XE-145M

The Cassandra cluster reinstalls and starts from the node. An error is reported. There is an existing solution

Rich text - Test Case

数据挖掘建模实战

Fire fighting work and measures in Higher Vocational Colleges

104. maximum depth of binary tree

DEJA_ Vu3d - 051 of cesium function set - perfect realization of terrain excavation

为什么SELECT * 会导致查询效率低?
随机推荐
Full link service tracking implementation scheme
Calculation of stock purchase and sale expenses
Find the total number of 1 appearing in the integer 1-N and the number of 1 in the binary of the integer
全链路业务追踪落地实践方案
Implementation of single sign on
Rich text - Test Case
网上炒股开户安不安全?
STL - inverter
Characteristics and prevention of electrical fire
SQL optimization experience: from 30248 seconds to 0.001 seconds
1180: fractional line delimitation /p1068 [noip2009 popularization group] fractional line delimitation
01 distributed system overview
Machine virtuelle 14 installer win7 (tutoriel)
new URL(“www.jjj.com“)
从知识到智慧:知识图谱还要走多远?
Chrome devtools
MATLAB小技巧(20)矩阵分析--主成分回归
Edit the live broadcast source code with me. How to write the live broadcast app code
[share OpenGL tutorial]
手机炒股开户安不安全?