Difference between Multithread and single thread or event driven model

Multi thread model

  1. Request with listener worker thread | lock application.
  2. Using incoming request model.
  3. Multi threaded server might block the request which might involve multiple events.
  4. Using context switching.
  5. Using multi thread environments where listener and workers threads are used  frequently to take an incoming request lock.

Single thread model

  1. Only one thread, which repeatedly fetches and events.
  2. Using queue and then process it.
  3.  Manually saves state and then goes on to process the next event.
  4. No connection and no context switches.
  5. Using asynchronous I/O facilities (callbacks, not poll, select or O_NONBLOCK) environments.

Related Posts

What is Single thread model used in node js and how its eliminates the limitation of multi thread model

Node Js is event driven, handing all the request asynchronously from single thread. Almost no function  in node directly performs I/O, so the process never blocks. So…

What is Multi thread model and what are the limitations ?

In a Multi thread model the server assign incoming requests to a new thread similar as a client server architecture, the user generate a request by interaction…

Leave a Reply

Your email address will not be published. Required fields are marked *