LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   A flag visible on both user-level thread and linux kernel (https://www.linuxquestions.org/questions/linux-kernel-70/a-flag-visible-on-both-user-level-thread-and-linux-kernel-4175490841/)

jeffwang66 01-10-2014 11:49 AM

A flag visible on both user-level thread and linux kernel
 
Hi,

What flag can be visible for both user-level thread and linux kernel scheduler? For example, if a user-level thread gives the flag a value, the OS scheduler (sched_other policy) can read the value of this flag before scheduling the thread.

Thanks,

Jeff

sundialsvcs 01-12-2014 08:51 PM

In my humble, this should be provided by some kernel interface ... a user-writeable /proc entry, for example. Userland should be able to contribute values to the kernel (maybe ...), but in such matters the kernel should always reign supreme. No timing holes, for example. The kernel does not dabble in the affairs of mortals -- does not rely upon flags etc. which they maintain in their mere-mortal world. The kernel might deign to make itself quite accessible to them (as described ...), but never deals directly in their terms in their world.


All times are GMT -5. The time now is 12:53 AM.