Process and thread notes-1

process

Process concept: The program we write is compiled to form a binary executable file. When we run this executable file, it will be loaded into the memory, and then the CPU will only execute each instruction in the program. This running program is the process.
Process concurrency and parallelism: Single-core switching execution process is concurrent, and multi-core execution is parallel.
The state of the process.
Running state: The process occupies the CPU.
Blocking state: The process is suspended because of an event and cannot be run.
Ready state: It can run, but other processes occupy the CPU
and enter the ready state after creation.
Process hangs Processes fall from the physical memory to the hard disk, and they hang if they do not actually occupy the physical memory. Therefore, the blocked process can be suspended to make better use of physical memory.

Guess you like

Origin blog.csdn.net/weixin_43891021/article/details/114240388