Learn Python in one month (11): Python processes and threads

process and thread

The computers we use today have already entered the era of multi-CPU or multi-core, and the operating systems we use all support "multi-tasking" operating systems, which allows us to run multiple programs at the same time, or decompose a program into several relative tasks. Independent subtasks allow multiple subtasks to execute concurrently, thereby shortening the execution time of the program and allowing users to obtain a better experience. Therefore, no matter what programming language is used for development at the moment, it should be one of the necessary skills for programmers to realize that the program can perform multiple tasks at the same time, which is often called "concurrent programming". To this end, we need to discuss two concepts first, one is called process and the other is called thread.



concept

A process is a program executed in the operating system. The operating system allocates storage space in units of processes. Each process has its own address space, data stack, and other auxiliary data used to track the execution of the process. The operating system manages

Guess you like

Origin blog.csdn.net/ml202187/article/details/131625251