ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 .
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.