Thursday, March 15, 2007

Unix Threading

Unix Threading is one of core enhancement features includes in Apache 2.0 new features.Multi-threading is a software term that means that the program does several things at once. In a traditional program, execution continues from one statement to the next in a linear and predictable fashion. In a multi-threaded program, one, two, or more parts of the same program can be executing at the same time. In Apache this means that a single copy of the server can handle multiple requests concurrently.

The current version of Apache does something like this already: it can handle multiple requests by running several copies of the server. However this is not multi-threading because the running programs are different copies, each of which is a different process. In a multi-threaded sever, a single process could be handling a number of requests at the same time. The advantage this gives is two-fold. Firstly, the operating system does not need to keep swapping between different processes, which is slow. Secondly, any static information shared between all the requests (such as the server configuration) can be shared between all the threads running at the same time, instead of being repeated in each process


References:
1.Multi Threading
http://www.apacheweek.com/issues/97-11-28

No comments: