View Full Version : How to set a process as a real time process

27th July 2006, 06:17 AM
It looks like kernel 2.6 supports real time process schedule, so my question is, how to set a process as a real time process?

27th July 2006, 10:01 AM
Use the sched_setscheduler() (http://www.opengroup.org/onlinepubs/009695399/functions/sched_setscheduler.html) system call to set the scheduling policy of the process to SCHED_FIFO or SCHED_RR.

27th July 2006, 11:13 AM
Thanks markkuk! This is really helpful to me! But do we have any other ways to ajust the process's priority in shell command line like nice or renice?

27th July 2006, 12:33 PM
No. A real-time process must be designed and programmed taking into account the real-time requirements. Giving some random regular program real-time privileges could have disastrous results.