So I need some help understanding this: Lets say I have a C program on Linux that creates 3 threads of equal priority. At some point during execution, one of the threads A needs to execute a special function without getting interrupted by B or C (critical section within A). How can this be done? Can scheduling of A, B and C (I assume it is round robin) be disabled from within A? Or is is better to increase A's priority? I am guessing disabling interrupts does not make sense on Linux. Please, any help,
Question on task scheduling in Linux
Apr 21, 2009
3 Replies
Mutex
-Michael
I am not sure if a mutex is sufficient or efficient enough in all cases.. I want to create the same effect as if interrupts were disabled (which would disable scheduling)
If system calls like "Mutex" are not fast enough (regarding guaranteed latency) for you, you will not get along with a Linux user land program anyway. Linux is not realtime !
-Michael
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required