Re: why threads?

From: Abhijit Pawar (abhijitcpawar_at_gmail.com)
Date: 07/07/05


Date: 6 Jul 2005 23:08:40 -0700

Also other that spawning threads , they are easy to handle when
creating the message passing systems in the process with the Message
Port or Message queues. They share the same address space for the
process and in it they are independant , one bad thread can not take
the process down if error handling is proper.
Threads share the same pointer throughout the process. Using the IPC
for process is very tedious , where you have to constantly check for
the broken pipes and the buffer overflow in the pipe , shared memory
corruption and context switches.
Threads save the overhead of context switches.

--
Abhijit.


Relevant Pages

  • Re: why threads?
    ... Port or Message queues. ... the broken pipes and the buffer overflow in the pipe, ... Threads save the overhead of context switches. ...
    (comp.unix.programmer)
  • Re: Network Stack Locking
    ... > The other concern I have is whether the message queues get deep or not: ... > coallescing of context switches to process multiple packets. ... We used thread context passing with an API that ... reset the stack pointer, and go". ...
    (freebsd-arch)