This package contains:

   run(1)
      A multiprocessor control command line tool.

   mpadvise(3)
      A multiprocessor control library interface.

Briefly, run works like this:

   # run -b 0 foobar
   (runs foobar biased to cpu 0)

   # run --negate --bias 0 foobar
   (runs foobar anywhere but cpu 0)

Run can also combine MP and scheduler parameters easily too:

   # run --bias 0-2,5 --policy rr --priority 50 autopilot

Here is the full help output from run:

   # run --help
   Usage: run [OPTIONS] { COMMAND [ARGS] | PROCESS_SPECIFIER }
   Set scheduling parameters and CPU bias for a new process or a list
   of existing processes.

   OPTIONS can be one or more of the following options:

      -b, --bias=LIST        Set the CPU bias to the LIST of CPUs;
                             CPUs are numbered starting from 0
      -s, --policy=POLICY    Set the scheduling policy to POLICY
                             (SCHED_OTHER, SCHED_RR or SCHED_FIFO)
      -P, --priority=LEVEL   Set the scheduling priority to LEVEL;
                             SCHED_FIFO and SCHED_RR range: 1 to 99
                             SCHED_OTHER: only priority 0 is valid
      -q, --quantum=QUANTUM  Set the SCHED_RR quantum to QUANTUM;
                             use --quantum=list for valid settings
      -N, --negate           Negate the CPU bias list; all CPUs
                             except those listed will be selected
      -f, --fork             Fork COMMAND and return immediately
      -c, --copies=COUNT     Run COUNT identical copies of COMMAND
      -i, --info             Output process environment information
      -V, --version          Output version information and exit
      -v, --verbose          Output information before each action
      -h, --help             Display this help and exit

   PROCESS_SPECIFIER is exactly one of the following options:

      -p, --pid=LIST         Specify LIST of existing PIDs to modify
      -g, --group=LIST       Specify LIST of process groups to modify; all
                             existing processes in the groups will be modified
      -u, --user=LIST        Specify LIST of users to modify; all existing
                             processes owned by the users will be modified
      -n, --name=LIST        Specify LIST of existing process names to modify

   Multiple comma separated values can be specified for all LISTs and ranges
   are allowed where appropriate (e.g. "run -b 0,2-5 autopilot").

   See the run(1) man page for more information.

These services require kernel support for the sched_getaffinity and
sched_setaffinity system calls.  Alternately, you can define
USE_PROC_PID_AFFINITY and use Robert Love's CPU Affinity patch.

To build the code, simply unpack it and type "make".  To install type "make
install" as root.  The code has been tested on both 2.4 and 2.5 kernels,
though it is still fairly new and almost certainly contains bugs.

An attempt was made to abstract the "cpuset" representation of the current
system in order to have binaries that in theory could work on systems with
more than 32 cpus.  For this to work, the run(1) command would need to be
linked against the shared mpadvise(3) library (by default it links against
the static version of the library).

This code is being released in the hopes that it will become the basis for the
Linux multiprocessor control standard interfaces.  I am very interested in
getting feedback on this package, so please contact me via email if you have
any.

This source code is licensed under the GNU GPL Version 2.
Copyright (C) 2003  Concurrent Computer Corporation

--
Jason Baietto
jason.baietto@ccur.com
http://www.ccur.com/realtime/oss
