Puzzle 2: process thread, parallel concurrency, synchronous and asynchronous, blocking fee, blocking
•
Java
1、 Serial, parallel, concurrent
1. Name explanation
Concurrency and parallelism focus on whether programs are executed at the same time
2. For example
In addition:
2、 Process and thread
1. Name explanation
Resources between processes are not shared, but resources between threads are shared (so locks are introduced to deal with resource allocation)
2. For example
3、 Synchronous and asynchronous
1. Name explanation
Synchronous and asynchronous focus on message communication mechanisms
2. For example
4、 Blocking and non blocking
1. Explanation of terms
Blocking and non blocking focus on the state of the program while waiting for the call result (message, return value)
2. For example
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码