retagged by
721 views
0 votes
0 votes
In the text, we described a multithreaded Web server, showing why it is better than a single-threaded server and a finite-state machine server. Are there any circumstances in which a single-threaded server might be better? Give an example.
retagged by

1 Answer

0 votes
0 votes

Answer:

Yes.

If the server is completely CPU bounded, then it is not required to have many threads because it unnecessarily increases the overall complexity. 

Example:

  • Think of a telephone directory, (like 555-1212) for the area which consists of 1 million people. Suppose each record consist of 64 characters, then the entire database takes $64$ MBs and that can be easily maintained in the memory of the server for faster lookup.
  • Having many threads decreases the operational speed.
  • No support for Kernel threads.

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
0 answers
3
admin asked Oct 24, 2019
351 views
In the text it was stated that the model of Fig. $2-11(a)$ was not suited to a file server using a cache in memory. Why not? Could each process have its own cache?