By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

To use multiple processes or threads?

P: n/a
What are the advantages/disadvantages of using one process with multiple
threads or doing the same task with multiple processes, each having one
thread?

I see using multiple threads under one process as being a problem.
Potentially, one thread may crash and could bring down the whole process,
including all the other threads.

Using one process per thread seems more independent. This is similar to
what happens when you open multiple Notepads.

Thanks,
Brett
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Isnt spawning multiple processes under one appdomain is more costly than
spawning threads under a process ?

HTH
rawCoder
"Brett" <no@spam.com> wrote in message
news:OR**************@TK2MSFTNGP09.phx.gbl...
What are the advantages/disadvantages of using one process with multiple
threads or doing the same task with multiple processes, each having one
thread?

I see using multiple threads under one process as being a problem.
Potentially, one thread may crash and could bring down the whole process,
including all the other threads.

Using one process per thread seems more independent. This is similar to
what happens when you open multiple Notepads.

Thanks,
Brett

Nov 21 '05 #2

P: n/a
What you say is valid and you are able to do it that way if you so wish.

Prior to releasing your program, you will have, of course, taken all
reasonable steps to ensure that a given thread does not crash to the extent
that it brings the whole application down. But hey - shit happens - give it
a hose down and you're back in business.

I would argue that managing the flow of data between threads in a carefully
designed multi-threaded application is far easier and efficient than
managing the flow of data between seperate instances of an application.

The important thing to note is that it is critical to select and use the
appropriate methodology to meet your needs:

- if it is multi-threaded then make it multi-threaded

- if it is mulit-instanced then make it multi-instanced

It's up to you.
"Brett" <no@spam.com> wrote in message
news:OR**************@TK2MSFTNGP09.phx.gbl...
What are the advantages/disadvantages of using one process with multiple
threads or doing the same task with multiple processes, each having one
thread?

I see using multiple threads under one process as being a problem.
Potentially, one thread may crash and could bring down the whole process,
including all the other threads.

Using one process per thread seems more independent. This is similar to
what happens when you open multiple Notepads.

Thanks,
Brett

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.