Skip to main content
<FrontBackGeek/>

Difference between Multithread and single thread or event driven model

FrontBackGeek 3 years ago

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.

© FrontBackGeek.com 2021 All Rights Reserved. DMCA.com Protection Status