Posix.1b Scheduler Tools for Linux
Version: 1
Bradford Snow
bradford@wpi.edu
4-2-1998

Available on sunsite. 

Included are two programs that I wrote over the summer to set and get
static priorities of processes.  By adjusting priorities and schedulers
you can increase the performance of programs.  

To learn more the Posix.1b standard the functionality it provides please
read the included document Markus Kuhn.  It does a good job of breaking up
the standard and explaining the different aspects. 


Usage: (setpriority must be run as root) 
setpriority pid sched ["other" "fifo" "rr"] static_priority
getpriority pid


The schedulers available are:
SCHED_OTHER	- Normal time sharing scheduler, uses nice priorities,
		  All process on this scheduler have a static priority of
		  0.  Therefore all processes on the realtime schedulers
		  preempt processes on the normal scheduler. 
SCHED_FIFO	- First come first serve realtime scheduler.
		  Priority range:  1-99

SCHED_RR	- Round robin realtime scheduler. 
		  Priority range:  1-99


To find out more read the included linux-posix.1b document.


Purpose of Posix.1b Tools for Linux
Did you know that Linux has supported (soft) real-time scheduling since
version 2.0.x.  The goal of my package is to provide a standard and easy
way to take advantage of the schedulers without having to write code.
I have not found any other programs that provide this functionality, if
any exist please let me know.


What does setpriority do?
Setpriority lets you put processes on either a fifo or roundrobin (soft)
real-time scheduler, as defined by the Posix.1b standard.  Doing so can
increase the performance of the process.  Prime examples are X servers,
video-game emulators (snes9x), and CD-ROM burning programs (cdwrite,
cdrecord).  

What does getpriority do?
Displays what the scheduler and static priority of a process.

Example:
For example, the sound for snes9x often skips.
However after changing the scheduler the skipping stops and the graphics
move faster. Example using SVGALib snes9x.

ssnes9x <rom-image>&            - put in background so that we can change
			          priority
setpriority `pidof ssnes9x` f 99
			        - Put snes9x on fifo schedule with
				  priority of 99.
fg				- Put snes9x in foreground



Thats it.
If you use the package please mail me and let me know. bradford@wpi.edu
The program is distributed under GNU Public License.  
Thanks for trying out setpriority and getpriority! 	 
  


