The service handles requests by spawning another process that handles your request (forking). Its like, if you go to a bank, the security guard points you to a teller. The security guard would be the "main" program (the program on port 80), and the teller would be the forked program (the spawn of the main program on another port). Spawned processes are given some arbitrarily high-numbered port, so they don't interfere with other processes. So, if 5 people go to a website, the main program will fork 5 spawned processes to accommodate each person.
Note - If a webserver never spawned other processes, it would only have 1 port to send/recieve information from. This means it would only support 1 person on its webpage.
Feel free to email me if you have any further questions!




Reply With Quote