Python3 Asynchronous programming processes and threads-1
First, understanding inter-process communication
Two, multi-threading and multi-process usage
Third, the benefits and usage of the co-process
Co-process
Yield
Yield from
Iv. inter-process Communication-IPC 01
Related definitions:
Pipeline:
Named pipes:
Message Queuing:
Signal Volume:
Shared Memory:
Motoko Operation:
V. Characteristics of the process
Dynamic nature
Concurrency of
Independence
of Asynchrony
Vi. Status of the process
Running running takes up CPU is running
Ready to wait for CPU
Blocking blocked temporarily does not have operating conditions, even if the CPU is idle
Related definitions:
Process Control BLOCK:
several Process Control operations in UNIX systems:
Thread:
Sharing between Threads:
Thread-Independent Information:
Creation of Threads:
Vii. understanding Inter-process Communication 02
I/O model
Block type
Non-blocking
I/O multiplexing
Signal-driven
asynchronous I/O
Related definitions:
Two phases of the I/O operation:
Blocking I/O:
Non-blocking I/O:
I/O multiplexing:
Signal-driven:
asynchronous I/O:
Concurrency and parallelism:
Asynchronous and synchronous:
Asynchronous implementations:
To handle multitasking operations:
multithreaded, multi-process implementation mode: Master worker mode
Master assigning tasks Multi-process disadvantage: Creating a process resource requires multiple Frok () function multithreading disadvantage: A thread problem, the entire hanging off
Python3 asynchronous programming processes and Threads-1