How CGI Applications Operate

CGI applications are compiled as stand-alone executables. When these executables run, Windows NT creates a new, separate process for every client request handled by the application, even if a single client submits more than one request. At any given time, the server is supporting a separate process for every ongoing request. When a request is complete, the server must perform a series of steps to delete the process.

CGI was created for a UNIX environment where processes are the basic unit of operation and have less overhead than processes in Windows NT. In Windows NT, where threads are the basic unit of operation, processes have substantial overhead. Each process receives a private physical memory allocation, is granted space in the paged and nonpaged memory pools, and is protected by the features of the Windows NT security model. In fact, every attribute that makes processes in Windows NT robust also makes them costly. Because CGI requests each executable to run in a separate process, CGI applications have much higher overhead than the alternative, ISAPI extensions.