当前位置:网站首页>多线程-并发并行-线程进程
多线程-并发并行-线程进程
2022-06-28 09:21:00 【用户9857551】
多线程
并发:两个或多个事件在同一个时间段发生。 并行:两个或多个事件在同一时刻发生(同时发生)。
进程:一个正在运行的应用程序就是一个进程。 线程:是进程的一个执行单元。一个进程至少有一个线程,可以有多个线程,这样的就叫多线程程序。
进程图示:
线程图示:
线程调度:
1.分时调度:所有线程轮流使用CPU的使用权,平均分配每个线程占用CPU的时间。 2.抢占式调度:优先让优先级高的线程使用CPU,如果优先级相同,那么随机选择一个(线程随机性),Java使用的就是抢占式调度。
边栏推荐
- Redis5.0 slot migration, free play (single machine migration cluster)
- 1. Kimball dimension modeling of data warehouse: what is a fact table?
- Static page of pinyougou mall
- Import and export of a single collection in postman
- Discussion on the practice of fire emergency lighting system in the field of building electrical design
- STL - inverter
- 理解IO模型
- 104. maximum depth of binary tree
- From knowledge to wisdom: how far will the knowledge map go?
- Screen settings in the source code of OBS Live Room
猜你喜欢
随机推荐
Apache Doris 成为 Apache 顶级项目
怎样在手机上开户?现在网上开户安全么?
APICloud携手三六零天御,助力企业守好App安全“第一关”
Automatic conversion - interview questions
MATLAB小技巧(20)矩阵分析--主成分回归
虛擬機14安裝win7(圖教程)
Fastjason filter field
Is it safe to open an account for online stock speculation?
Deployment of MySQL database in Linux Environment
Divide and rule classic Hanoi
DBeaver安装与使用教程(超详细安装与使用教程)
RMAN backup message ora-19809 ora-19804
File operations in QT
The concept of "tree structure" perfectly interprets the primary and secondary of things
Interpretation of new products: realm launched GT neo2 Dragon Ball customized version
RESTful风格
如何实现基于 RADIUS 协议的双因子认证 MFA?
The private attribute of this class can be used directly? New() in use!!!
Summary of PMP learning experience
JVM系列(2)——垃圾回收