当前位置:网站首页>多线程-并发并行-线程进程
多线程-并发并行-线程进程
2022-06-28 09:21:00 【用户9857551】
多线程
并发:两个或多个事件在同一个时间段发生。 并行:两个或多个事件在同一时刻发生(同时发生)。
进程:一个正在运行的应用程序就是一个进程。 线程:是进程的一个执行单元。一个进程至少有一个线程,可以有多个线程,这样的就叫多线程程序。
进程图示:
线程图示:
线程调度:
1.分时调度:所有线程轮流使用CPU的使用权,平均分配每个线程占用CPU的时间。 2.抢占式调度:优先让优先级高的线程使用CPU,如果优先级相同,那么随机选择一个(线程随机性),Java使用的就是抢占式调度。
边栏推荐
- JMeter -- interface test 1
- Apache Doris 成为 Apache 顶级项目
- Deployment of MySQL database in Linux Environment
- 1181:整数奇偶排序
- APICloud携手三六零天御,助力企业守好App安全“第一关”
- 104. maximum depth of binary tree
- Quickly understand JVM structure and working principle
- The Cassandra cluster reinstalls and starts from the node. An error is reported. There is an existing solution
- A classic JVM class loaded interview question class singleton{static singleton instance = new singleton(); private singleton() {}
- 全局异常处理器与统一返回结果
猜你喜欢

全链路业务追踪落地实践方案

Apache Doris 成为 Apache 顶级项目

Apache Doris becomes the top project of Apache

Stock suspension

P2394 yyy loves Chemistry I

Use of Jasper soft studio report tool and solution of thorny problems

基于宽表的数据建模

Prototype chain JS

SQL injection file read / write

Redis5.0 slot migration, free play (single machine migration cluster)
随机推荐
1. Kimball dimension modeling of data warehouse: what is a fact table?
Automatic conversion - interview questions
Which occupational groups are suitable for the examination
Boundary value analysis method for learning basic content of software testing (2)
Use of Jasper soft studio report tool and solution of thorny problems
Importerror: no module named image [duplicate] - importerror: no module named image [duplicate]
Test cases for learning the basic content of software testing (II)
1181:整数奇偶排序
图解MySQL的binlog、redo log和undo log
Interpretation of new products: realm launched GT neo2 Dragon Ball customized version
Is it safe for CICC fortune to open an account? How much do you charge?
Do static code blocks always execute first? The pattern is smaller!!!
redis5.0的槽点迁移,随意玩(单机迁移集群)
Assertions used in the interface automation platform
Basic content learning of software testing (I)
学习阿里如何进行数据指标体系的治理
分而治之之经典Hanoi
Installation of containerd1.5.5
Scenario method and error recommendation method for learning basic content of software testing (2)
Data modeling based on wide table