next up previous contents Back to Operating Systems Home Page
Next: Single threadmultiple clients Up: Threading models Previous: Threading models

Single thread, single client

It's the simplest of all threading models. A server sits in a single infinite loop listening to a port, accepts a connection with a forthcoming client, and then services it immediately in the same thread. Further clients must wait until the request is completely serviced.

This model is easy to implement and has low resource requirement: it uses only one thread and two units of network connection services (i.e. two sockets in UNIX: the listening socket and the connected one). However it can handle only one client at a time, hence it's inappropriate for all but the most basic services

Franco Callari