Skip to contentSkip to conversation

2.4.2 - Linux Jobs

PATCH New Sam Watters 1 participant 1 message Mar 8, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.2 - Linux Jobs

Applies against the 2.4.2 kernel, supports i386 and ia64, and depends upon the Linux Process Aggregates (PAGG) patch (linux-2.4.2-pagg.patch). The PAGG patch was delivered in a previous post with the subject: "[PATCH] 2.4.2 - Process Aggregates". At the bottom of this description will be a web page reference that allows these patches and a command package to be downloaded.

This patch implements a process aggregate container -- a generic process group. Specifically, this patch implements process groups called jobs.

A job is a group of related processes, all descended from a point of entry (POE) process and identified by a unique job ID. A job can contain multiple process groups, session, and processes. The job acts as a process containment mechanism and a process is not allowed to escape from the job container. This allows resource limits to be extended from the process level to the job level. Additionally, the job allows accounting information to be accumulated for all processes that executed within the job container. This provides users and administrators with increased capabilities for system scheduling and planning for work loads.

The job, has the following characteristics:

- A job is an inescapable container. A process cannot leave the job container nor can a new process be created outside the job without explicit action, that is, a system call with root privilege.

- Each new process inherits the job ID and limits from its parent process.

- All point of entry processes (job initiators) create a new job and set the job limits appropriately.

- Users can raise and lower their own job limits within maximum values specified by the system administrator.

- The job initiator performs authentication and security checks.

- The process control initialization process (init(1M)) and start-up scripts called by init are not part of a job. Likewise, system daemons are usually not part of a job.

This work was done so that we could provide a job accounting package (called CSA).

For additional information about process aggregates & jobs, please go to the home page at:

http://oss.sgi.com/projects/pagg

At this site you can download these patches and the commands package (in RPM or tarball format). Also, there are additional patches for other 2.4.x kernels.

For additional information about CSA job accounting, please consult the home page at:

http://oss.sgicom/projects/csa

patch follows (linux-2.4.2-pagg-job.patch):
---------------------------------------------------------------
diff -Naur linux-2.4.2-pagg/Documentation/Configure.help linux-2.4.2-pagg-job/Documentation/Configure.help

Documentation/Configure.help +28 -0
@@ -14656,6 +14656,34 @@
   include the Linux Jobs module and the Linux Array Sessions module.
   If you will not be using such modules, say N.
 
+Process Aggregates Job support
+CONFIG_PAGG_JOB
+  The Job feature implements a type of process aggregate,
+  or grouping.  A job is the collection of all processes that
+  are descended from a point-of-entry process.  Examples of such
+  points-of-entry include telnet, rlogin, and console logins.
+  A job differs from a session and process group since the job
+  container (or group) is inescapable.  Only root level processes,
+  or those with the CAP_SYS_RESOURCE capability, can create new jobs
+  or escape from a job.
+
+  A job is identified by a unique job identifier (jid).  Currently,
+  that jid can be used to obtain status information about the job
+  and the processes it contians.  The jid can also be used to send
+  signals to all processes contained in the job.  In addition,
+  other processes can wait for the completion of a job - the event
+  where the last process contained in the job has exited.
+
+  In the future, resource limit features will be added to jobs.
+  Such limits would be enforced against the aggregate usage of
+  resources by all processes within the job.
+
+  If you want to compile support for jobs into the kernel, select
+  this entry using Y.  If you want the support for jobs provided as
+  a module, select this entry using M.  If you do not want support
+  for jobs, select this entry using N (this is the default setting).
+
+
 ISDN subsystem
 CONFIG_ISDN
   ISDN ("Integrated Services Digital Networks", called RNIS in France)

diff -Naur linux-2.4.2-pagg/Documentation/job.txt
linux-2.4.2-pagg-job/Documentation/job.txt

Documentation/job.txt +610 -0

610 lines not on this page · raw message

diff -Naur linux-2.4.2-pagg/arch/i386/config.in
linux-2.4.2-pagg-job/arch/i386/config.in

arch/i386/config.in +3 -0
@@ -219,6 +219,9 @@
 bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
 bool 'Sysctl support' CONFIG_SYSCTL
 bool 'Support for process aggregates (PAGGs)' CONFIG_PAGG
+if [ "$CONFIG_PAGG" = "y" ] ; then
+   tristate '    Process aggregate based jobs' CONFIG_PAGG_JOB
+fi
 if [ "$CONFIG_PROC_FS" = "y" ]; then
    choice 'Kernel core (/proc/kcore) format' \
 	"ELF		CONFIG_KCORE_ELF	\

diff -Naur linux-2.4.2-pagg/arch/ia64/config.in
linux-2.4.2-pagg-job/arch/ia64/config.in

arch/ia64/config.in +3 -0
@@ -94,6 +94,9 @@
 bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
 bool 'Sysctl support' CONFIG_SYSCTL
 bool 'Support for process aggregates (PAGGs)' CONFIG_PAGG
+if [ "$CONFIG_PAGG" = "y" ] ; then
+   tristate '    Process aggregate based jobs' CONFIG_PAGG_JOB
+fi
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 

diff -Naur linux-2.4.2-pagg/drivers/misc/Makefile
linux-2.4.2-pagg-job/drivers/misc/Makefile

drivers/misc/Makefile +4 -0
@@ -11,6 +11,10 @@
 
 O_TARGET := misc.o
 
+export-objs	:= job.o
+
+obj-$(CONFIG_PAGG_JOB) += job.o
+
 include $(TOPDIR)/Rules.make
 
 fastdep:

diff -Naur linux-2.4.2-pagg/drivers/misc/job.c
linux-2.4.2-pagg-job/drivers/misc/job.c

drivers/misc/job.c +1853 -0

1,853 lines not on this page · raw message

diff -Naur linux-2.4.2-pagg/include/linux/job.h
linux-2.4.2-pagg-job/include/linux/job.h

include/linux/job.h +125 -0

125 lines not on this page · raw message

diff -Naur linux-2.4.2-pagg/include/linux/paggctl.h linux-2.4.2-pagg-job/include/linux/paggctl.h

include/linux/paggctl.h +127 -0

133 lines not on this page · raw message