Simple understanding of parallelism and concurrency

Give some practical examples to facilitate understanding
 
Concurrency can be said to be a dual purpose, handling multiple things at the same time
For example: in class, while listening to the teacher's lectures, you read novels on your mobile phone, this is considered concurrent
 
In parallel, it can be said that one thing is decomposed into multiple small tasks, these small tasks are done at the same time, and the completion of these small tasks is to complete this thing
For example, the teacher needs 100 bows. The teacher is very smart. He asks 50 students in the class to help him, and each classmate gets 2 and hand them over to him. This is considered parallel, and 50 students do this in parallel.
 
But in general, parallelism and concurrency exist at the same time

<!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

For example, now the teacher needs 100 bows, and also needs to write a commendation letter, of which 100 bows are processed according to the above method, and the teacher writes the commendation letter by himself, so that there is both concurrent and parallel. 
 
Simple understanding, I hope to help you, if you have any questions, please post a discussion.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326685451&siteId=291194637