Prerequisites:
--------------
Kernel 2.4.18+ with Ingo Molnar's O(1)-sched-patch or 2.5.X.
[afaik http://www.kernel.org/pub/linux/kernel/people/mingo]
Other kernels don't know about SCHED_BATCH at all[0].

2.5.X kernels and the stock 2.6 don't seem to know about SCHED_BATCH.
Con Kolivas[1] maintains patches for 2.6.

For cpu-affinity you need 2.5.8+ and a reasonable recent glibc.
For example, RedHat does have the patches it in their 9 release.
The code tries to circumwent some glibc-quirks, though.


Installing:
-----------
If you want to build WITH CPU-affinity support, do
#> make
or
#> make affinity

If that gives you errors about "sched_setaffinity", you don't have your system
ready for affinity - likely you have a too old glibc without that support.

To build without affinity:
#> make no_affinity

To install, type:
#> make install

This puts schedtool to /usr/local/bin using 'install' and the manpage
into /usr/local/man/man8 - be happy, it's gzip'ed before.


You can define DEBUG_ME (either by adding -DDEBUG_ME to CFLAGS in the Makefile 
or specifying them to make) to get additional output.

- -- -
[0]: If you a curious, look into:

/usr/src/linux/include/linux/sched.h

and locate the following:

/*
 * Scheduling policies
 */
#define SCHED_OTHER             0
#define SCHED_FIFO              1
#define SCHED_RR                2

If there is SCHED_BATCH defined, it is likely your kernel supports
batch-scheduling.


[1]: You will find stuff at
http://ck.kolivas.org/patches/2.6

