Hko is saying there are two system calls nice() and setpriority()
I have no idea how to figure out the size of quanta (time slices) or how many have elapsed for a process without getting into the kernel.
Plus, if you want to use nice to make priority lower, you have to run privileged.
Unless you are in a realtime system, you are better off letting the scheduler figure it out for you. If you do something dumb in code and have the priority set, you can make the system unusable.
|