You need some knowledge about the kernel and scheduling. SEE ALSO sched_setscheduler(2), sched_setaffinity(2), nice(2), nice(1), renice(3). The INSTALL file also lists all prerequisites and where you can get patches. May occur when using the -e switch.īe careful with SCHED_FIFO! You may lock out other processes from the CPU, including yourįor SCHED_BATCH you certainly need the a recent 2.6 kernel.Ī short overview is given in SCHED_DESIGN and the README contains thourough discussion. PID 0 means "current process", in our case, schedtool. If you used SCHED_BATCH in the -ck kernels this is what you want since 2.6.16 SCHED_IDLEPRIO SCHED_IDLEPRIO is similar to SCHED_BATCH, but wasĮxplicitly designed to consume only the time the CPU is idle. Good for gaming, videoĪt the limits of hardware, video capture etc." Timeslice within a reasonable latency while preventing starvation. To quote Con Kolivas: "This is a non-expiring scheduler policy designed to guarantee a SCHED_ISO SCHED_ISO was designed to give users a SCHED_RR-similar class. Processes in this class are selected last but may result in a considerable speed. It uses longer timeslices (to better exploit the cache), but canīe interrupted anytime by other processes in other classes to guaratee interaction of the SCHED_BATCH SCHED_BATCH was designed for non-interactive,ĬPU-bound applications. Usable for audio/videoĪpplications near peak rate of the system. Processes in this group are favoured over SCHED_NORMAL. In an round-robin fashion with a much smaller timeslice than with SCHED_NORMAL and SCHED_RR Round-Robin Scheduler, also used for real-time constraints. In this class are usually not preempted by others, they need to free themselves from theĬPU via sched_yield() and as such you need special designed applications. SCHED_FIFO First-In, First Out Scheduler, used only for real-time constraints. POLICY OVERVIEW SCHED_NORMAL / SCHED_OTHER This is the default policy and for the average program with The following runs on CPU0 and CPU1 (equivalent to 0x3): The default is to run a process on all CPUs, giving a mask ofĪlternatively a list mode is supported where you can specify the CPUs delimited by ",". Multi-target CPUs may be specified using bitwise OR of the values: CPU0 is denoted by the least-significantīit, CPU1 by the second least-significant and so on, thus giving: It consists ofĪ simple bitmask represented in hexadecimal. The affinity-argument determines on which CPUs a process is allowed to run. Using the list mode and affinty of CPU0 and CPU3:Ī combination of an affinity and a policy-argument is - of course - always possible. To set a process' affinity to only the first CPU (CPU0): To set all processes with the name 'cpu_hog' to SCHED_BATCH: To set current shell to SCHED_BATCH, which all programs the shell starts will inherit: #> schedtool -R -p 20 -e mplayer -quiet some_file.avi To execute mplayer in SCHED_RR with priority 20. r display min and max priority for each policy. Set the PID's nice level see nice(2), nice(1).Įxecute command with given scheduling parameters (overwrites schedtool's process Set the PID's affinity to this bitmask (hexadecimal) alternatively, a list mode is Specify static priority required for SCHED_FIFO and SCHED_RR. This option is mostly for kernel guys that want to test their new Schedtool now supports setting the CPU-affinity introduced in linux 2.5.8.įor manual/raw mode policy is the number of the scheduling policy (see above forĠ-4). Use the static priority-switch -p to designate inter-process-hierarchies. Less system-time is wasted by computing the next runnable process and the caches stayĪudio/video or other near-realtime applications may run with less skipping if set to Long-running, non-interactive tasks may benefit from SCHED_BATCH as timeslices are longer, ĭESCRIPTION schedtool can set all CPU scheduling parameters Linux is capable of or display information NAME schedtool - query and set CPU scheduling parameters
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |