Threads, Processes and Programs + Parallelism and Concurrency

Process vs Program

Program: A piece of code, an ordered set of instructions.

Process: A dynamic running of the program, the process is uniquely identified by the process control block.

Process: dynamic, resourceful, uniquely identified, and concurrent;

Program: static, no resources, no unique identification, no concurrency.

 

Thread: The basic unit of CPU scheduling. It is an independent running unit smaller than a process, and multiple threads can execute concurrently in the same process.

Process: The basic unit of CPU allocation resources.

 

Parallel: Two or more events that occur at the same time.

Concurrency: Two or more events that occur at the same time interval.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324468579&siteId=291194637