- Blocking IO Model
The user space calls the Recvfrom command until the packet arrives and is copied to the buffer of the application process or when an error occurs, and the process or thread waits for a blocking state.
2. Non-blocking IO model
After the user space calls the kernel instruction recvfrom, if the kernel space buffer does not have data session Ewouldblock the process repeats (polls) call the Recvfrom command call to see if there are packets ready in the buffer
3.IO multiplexed Linux provides the select/poll process to block a select operation by passing one or more FD to a Select or poll system call so select can help us detect if multiple FD are in a consistent state.
4. The signal driver first turns on the socket signal driver I/O function by calling the system sigaction to execute a signal handler function (when the system call returns immediately the process continues to work without blocking) when the data is ready to generate a sigio signal, through the signal
Callback notification application calls Recvfrom to read data and notifies the main loop function to process the data
5. Asynchronous IO tells the kernel to initiate an operation and let the kernel notify us when the entire operation is complete, including copying data from the kernel to the user's own buffer zone
Linux v IO model