1. Concurrent programming
These two nouns are concepts in concurrent programming and are defined under the model of concurrent programming:
- Concurrency: It is on the same CPU at the same time (not really at the same time, but at the same time, because the CPU is switching between multiple programs) to run multiple programs.
- Parallel: is multiple or simultaneous one CPU, each CPU runs a program.
For example, concurrent, like a person (CPU) Feed 2 Children (program), rotate each person to feed a mouthful, on the surface of two children are eating.
In parallel, 2 people feed 2 children, and two children eat at the same time.
Parallelism and concurrency are not two mutually exclusive concepts.
2. Under the garbage collector
In the context of talking about garbage collectors, you can understand these two nouns:
1. Parallel parallel
Multiple garbage collection threads work in parallel, but the user thread is still waiting
2. Concurrent concurrent
means that the user thread executes concurrently with the garbage collection thread (but not necessarily in parallel, may be alternately executed), the user program continues to run, and the garbage collector runs on the other CPU
Reprint Address: http://www.cnblogs.com/xrq730/p/4839245.html
Java Virtual machine 6: Garbage collection (GC)-2 (differences in parallelism and concurrency)