ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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 .
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.