CBS version 1.0 --------------- CBS is a Loadable Kernel Module that can be inserted on a Linux platform to distribute the CPU time to the system tasks. Before using this feature, the following steps are needed: - Patching the Linux kernel with the 'Generic Scheduler Patch' - Compiling the CBS module - Installing the CBS module Patching the kernel ------------------- Locate the directory of the kernel on your Linux system (usually /usr/src/linux). Be sure that the release of the kernel used on your system is 2.4.18 (to verify the kernel release run the command 'uname -r'). If there isn't any kernel directory on the system, or if the kernel release is wrong, download the kernel from http://www.kernel.org, and extract the content of the file on a directory of your choice. Copy the 'Generic Scheduler Patch' on the kernel directory, and type 'patch -p1 < generic_scheduler.patch'. Now the kernel is patched. To continue, it's necessary to compile and install the patched kernel. Compile the kernel using the following commands: make dep make bzImage make modules make modules_install Restart your system. Compiling the CBS module ------------------------ If the kernel directory isn't '/usr/src/linux', set the environment variable KERNEL_DIR typing the command 'export KERNEL_DIR=your_kernel_directory'. Go in the directory containing the CBS code (usually qres/src). This directory should contain a file called Makefile. There are many options settable during the compilation. The easiest way to compile the module is to type 'make'. This will create a module with the basic features. Anyway, it's possible to specify the following options (which should be appended to the 'make' command): DEBUG=1 The module prints some warnings during the execution. To read the warnings printed, type 'dmesg' MULTI=1 Gives a bandwidth of 10% to Linux tasks. In this way these tasks can execute during the execution of the tasks scheduled by CBS scheduler. In addiction this option lets assign an amount of bandwidth to a set of tasks. HRT=1 Use this option if you patched the kernel with 'High Resolution Timers' patch. This gives to the system a better precision (below 10msec). PRECISE_ALLOC=1 Any task scheduled by CBS scheduler executes exactly as specified by its bandwidth (even if there is only one CBS task on the system). This let outrange some known problems associated with the CBS algorithm. LOG=... During debugging often happens that the kernel is unable to correctly log all the warning messages printed by the module. This option specifies the directory of the logger to use, and is usually set when the option DEBUG is set too. GRUB=1 The module uses the algorithm GRUB instead of CBS (GRUB is capable of reclaiming the unused bandwidth). GRUB_DEBUG=1 Works like the option 'DEBUG', and should be used when the option 'GRUB' is set. GRUB_EXTRA_BANDWIDTH=1 When a task blocks, its remaining budget is given to next running task. GRUB_PWR=1 Adds the feature of power saving to GRUB scheduler, and must be used only when the option 'GRUB' is set. By now is possible to use this feature only on Intel PXA250 processors (see the option 'PXA250'). ARM=1 Enables a cross compiling for ARM processors. It requires the 'arm-linux' utilities (i.e. arm-linux-gcc). PXA250=1 Enables a cross compiling for Intel PXA250 processor. PROC=1 Enables the /proc FileSystem support for CBS scheduler. Installing the CBS module --------------------- To install the module in the system, type 'make load' (it's equivalent to the command 'insmod'). To remove the module from the system, type 'make unload' (it's equivalent to the command 'rmmod').