LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how to take advantage of openMOSIX ? (https://www.linuxquestions.org/questions/programming-9/how-to-take-advantage-of-openmosix-267025/)

qwijibow 12-16-2004 09:06 AM

how to take advantage of openMOSIX ?
 
Im confused about how to program a task that will properly utlise an openMOSIX Linux cluster.

i am writing an AI program to solve a rubix cube problem,
i have a cluster computer of 3 mchines,

if i spawn 3 pthreads, will they become migration condidates ? or does each migration candidate need to be fork()ed process ?

also, if 2 different proccessors / threads are migrated, will the usual inter process comunication still work ?

qwijibow 12-17-2004 12:10 PM

BUMP....
still looking for advice, thanX

qwijibow 12-20-2004 10:14 AM

yet anouther bump.....
anyone ?

btmiller 12-20-2004 11:48 PM

Hmmm, it's been awhile since I looked closely at Mosix, but I don't think it's pthreads aware, since pthreads have to share the same memory space, and thus cannot be easily moved between execution hosts. This may have been fixed in more recent versions, though. You could fork off the requisite number of processes. Another option is to learn the MPI library -- there's a nice OSS implementation called MPICH (google on it). MPI will give you something roughly approximating threads programming, but on multiple machines. I've been learning a bit of it recently, and it's really quite interesting to use. If you do use it, remember to tell MOSIX not to migrate any of the MPI processes, I think it wouldget quite confused if they started moving about :).

Good luck!

qwijibow 12-21-2004 06:46 AM

it seems the MPI and MPICH is for MOXIX (the origonal) not OpenMOSIX ?
anyways, thanks for the help.

I dont want to break compatability with other machines which do not have OpenMOSIX installed, so i guess that means i will have t stick with forking anyways.

thanks

browny_amiga 01-14-2005 04:39 AM

I just analyzed MOSIX and find it fascinating. To answer your question:
No, threads cannot be migrated, only whole processes (as much as I understand it, since I am not that much into programming).
Since threads share address space, they cannot be moved. I guess it is worth it to risk the overhead of a fork to utilize the power of migration to another node with MOSIX.

Fascinating subject!

Markus


All times are GMT -5. The time now is 10:57 PM.