Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Hi, does anyone know if gang scheduling is implemented in Linux? And if so, can you recommend any books/articles/site where I can learn more about it? I am trying to implement it on FreeBSD, so if anyone has any information about that, it would be very helpful
Stefan, I don't mean to be a naysayer, but is gang scheduling even implemented at the kernel level?
It was an interesting question, I'd like to thank you for pointing out the concept of "gang scheduling" in distributed computing to me and the rest of the readers but a short review of some documentation (mostly the Wikipedia page) suggests to me that the local kernel level scheduling is probably SCHED_BATCH and "gang" is something the cluster software is handling.
If I'm wrong, I apologize, but to the best of my knowledge, Linux doesn't give you that option (I only know of 5 sched modes SCHED_RR, SCHED_FIFO, SCHED_BATCH, SCHED_IDLE and SCHED_OTHER *other uses CFS or the Completely Fair Scheduler).
The general definition of gang scheduling is inefficient for a single processor, even in an SMP operation. It requires all processors to delay until they all reach a sync point- causing wasted CPU time waiting for the other processors.
You CAN do it in a SMP mode very easily - but you have to have a counting semaphore that all processes are waiting for, then the locking process can release the lock and all processes resume.
It is also inefficient in SMP as the various threads will have different page fault/IO activity that causes them to get out of sync - which reindroduces wasted CPU time.
In a distributed system/cluster, gang scheduling is handled by the job scheduler - but even then, it isn't rigid. All nodes are given work to do, and the results collected - and more work could be sent out. It works, but is a bit on the inefficient side as it requires a lot of message passing - which allows the nodes to get out of sync again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.