The processing flow for Web requests is as follows:
1, the customer initiates the request to the server network card;
2, the server network card received after the request to the kernel processing;
3, the kernel according to the request corresponding socket, the request to work in the user space of the Web server process
4, the Web server process according to the user request, to the kernel system calls, request to obtain the appropriate resources (such as index.html)
5. The kernel discovers that the Web server process is requesting a resource that resides on the hard disk, so the driver connects to the disk
6. Kernel dispatch disk, get the required resources
7. The kernel stores the resources in its own buffer and notifies the Web server process
8. The Web server process obtains resources through system calls and copies them into the buffer of its own process
9, the Web server process to form a response, through the system call to the kernel to respond to user requests
10. The kernel sends the response to the network card
11, the network card sends the response to the user
With such a complex process, a single request is completed. Simply put: The user requests--to the user space--the system calls--the kernel space--and the
kernel-to-disk read page resource--returns to user space--response to the user . The above simple explanation of the client to the Web service request process, in this process, there are two I/O process, one is the client requested network I/O, and the other is the Web server request page disk I/O. The example diagram is as follows:
Processing flow of Web requests