in reply to Re^12: Problem in Inter Process Communication
in thread Problem in Inter Process Communication
can't i use fork to fork multiple processes rather than threads?
Yes you can. But again, what benefits are you seeking to gain?
You could also use a single threaded, single process and non-blocking IO. I wouldn't recommend it especially as you have to discrete parts to your processing, with significantly different processing time requirements: 1 IO bound, 1 CPU bound; but you could do it that way.
If you had the time and interest, coding the same problem all 3 ways would be an interesting comparative exercise, but people rarely have the time or budget for such explorations.
The nice thing about the single-queue, worker-pool threaded solution is that it is really easy to get going--you've almost written it three times during these discussions--and once it working, it scales very easily and well.
It is a great way to prototype something that works and then use that to explorer where the limits and bottle necks are. Once you know whether, at the limits of your hardware, you are IO-bound, cpu-bound, or memory-bound, you can use that information to consider if one of the other solutions would allow you to transcend that boundary.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^14: Problem in Inter Process Communication
by libvenus (Sexton) on Aug 22, 2008 at 12:08 UTC | |
by BrowserUk (Patriarch) on Aug 22, 2008 at 12:39 UTC | |
by libvenus (Sexton) on Aug 22, 2008 at 13:57 UTC | |
by BrowserUk (Patriarch) on Aug 22, 2008 at 14:54 UTC | |
by libvenus (Sexton) on Aug 22, 2008 at 15:24 UTC | |
| |
by LesleyB (Friar) on Aug 26, 2008 at 11:40 UTC |