Kernel-mode and User-mode Web Servers
A web server can be either implemented into the OS kernel, or in user space (like other regular applications).
An in-kernel web server (like TUX on GNU/Linux or Microsoft IIS on Windows) will usually work faster, because, as part of the system, it can directly use all the hardware resources it needs, such as non-paged memory, CPU time-slices, network adapters, or buffers.
Web servers that run in user-mode have to ask the system for permission to use more memory or more CPU resources. Not only do these requests to the kernel take time, but they are not always satisfied because the system reserves resources for its own usage and has the responsibility to share hardware resources with all the other running applications.
Also, applications cannot access the system's internal buffers, which causes useless buffer copies that create another handicap for user-mode web servers. As a consequence, the only way for a user-mode web server to match kernel-mode performance is to raise the quality of its code to much higher standards, similar to that of the code used in web servers that run in the kernel. This is a significant issue under Windows, where the user-mode overhead is about six times greater than that under Linux.
Read more about this topic: Web Server
Famous quotes containing the word web:
“For us necessity is not as of old an image without us, with whom we can do warfare; it is a magic web woven through and through us, like that magnetic system of which modern science speaks, penetrating us with a network subtler than our subtlest nerves, yet bearing in it the central forces of the world.”
—Walter Pater (18391894)