From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Tue, 3 Mar 2009 12:52:14 +0100 Message-ID: <138575260903030352s623807d7p5a3075b1f7a591f6@mail.gmail.com> From: hugo rivera To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [9fans] threads vs forks Topicbox-Message-UUID: ac0dfffa-ead4-11e9-9d60-3106f5b1d025 Hi, this is not really a plan 9 question, but since you are the wisest guys I know I am hoping that you can help me. You see, I have to launch many tasks running in parallel (~5000) in a cluster running linux. Each of the task performs some astronomical calculations and I am not pretty sure if using fork is the best answer here. First of all, all the programming is done in python and c, and since we are using os.fork() python facility I think that it is somehow related to the underlying c fork (well, I really do not know much of forks in linux, the few things I do know about forks and threads I got them from Francisco Ballesteros' "Introduction to operating system abstractions"). The point here is if I should use forks or threads to deal with the job at hand? I heard that there are some problems if you fork too many processes (I am not sure how many are too many) so I am thinking to use threads. I know some basic differences between threads and forks, but I am not aware of the details of the implementation (probably I will never be). Finally, if this is a question that does not belong to the plan 9 mailing list, please let me know and I'll shut up. Saludos -- Hugo