Click here to Skip to main content
15,881,831 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When should i create multithread for my process and when should i split my program into multi process ?

tnx for answer and comment's
but i am searching for short answer
Posted
Updated 13-Jan-15 0:01am
v2
Comments
Thanks7872 13-Jan-15 4:44am    
https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=multithreading+vs+multiprocessing

I don't think after reading any of these,you will be having any doubts.
AminMhmdi 13-Jan-15 5:34am    
i can search google and i do it before but not found my answer!

The question you asked has dozens of answers and all of them are right or almost right answers. This is very basic question and the best way for you is to read some books and articles to understand difference between process and thread. I advice to read Richter's books about it, they seems to me the best in this area.

Also a lot of things when deciding between thread and process depend on your project requirement. Interpocess communication requires additional implementation so mostly people use threads and decide to go to another process if application is huge or has very different content that can be run in separate processes.
 
Share this answer
 
Comments
AminMhmdi 18-Feb-15 2:04am    
Except Jeffrey Richter CLR via C# is there any book for multi-threading and multi process ?
We will opt for multi-threaded application if requirement is to serve multiple requests from different sources in real time. For example if We are writing a host for ATM Channel which would serve multiple ATM transaction request, is a best choice of multi threaded application.

Similarly, lets say you have a web application that provides CRM capabilities like Forms management and scheduling of forms, scheduling is a complex and critical activity and is performance hungry. At peak times the whole scheduling might be on hold because of heavy usage. A process optimization approach towards this is to extract the scheduling process from this web application and make it as a separate process, why? because this will improve web application performance and at peak times scheduling (which is a complex activity) will not be affected at all since its a separate process. There will be other advantages as well apart from stated earlier

Hopes the examples gives you a better understanding.
 
Share this answer
 
Comments
AminMhmdi 13-Jan-15 6:02am    
tnx!this is answer that i searching for!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900