Process:

Processes are the basic unit of system resource allocation and independent operation.

Process creation, scheduling, running and destruction are controlled by the operating system, the operating system will be responsible for the process of the state switch, and this is the process management.

A process creates a process, which is called a parent process and a child process. Child processes can also create processes, forming a process tree. The diagram below:

Before a process is created, a process control block (PCB) is created. The PROCESS control block is responsible for storing basic information about the process (such as the process ID, current status, and relationship with other processes and resources). It is the unique identification of the process and is the same as the process.

Thread:

Thread is the basic unit of system scheduling. Multiple threads can be created in the same process, and all threads can share the resources allocated by the process.

The difference between a process and a thread

Process can be said to be a program, is a macro performance; A thread is a small step in the running process of a process, which is a microscopic manifestation. The result of the process’s final run is the sum of the threads’ execution.