Answer and Explanation:
• 1 thread awaits the incoming request
• 1 thread responds to the request
• 1 thread reads the hard disk
A multithreaded file server is better than a single-threaded server and a finite-state machine server because it provides better response compared to the rest and can make use of the shared Web data.
Yes, there are circumstances in which a single-threaded server might be better. If it is designed such that:
- the server is completely CPU bound, such that multiple threads isn't needed. But it would account for some complexity that aren't needed.
An example is, the assistance number of a telephone directory (e.g 7771414) for an community of say, one million people. Consider that each name and telephone number record is sixty-four characters, the whole database takes 64 MB, and can be easily stored in the server's memory in order to provide quick lookup.
NOTE:
Multiple threads lead to operation slow down and no support for Kernel threads.