[torquedev] Extending Torque
garrick at clusterresources.com
Mon Jul 31 11:40:55 MDT 2006
On Mon, Jul 31, 2006 at 11:33:52AM -0700, Diwaker Gupta alleged:
> Hi everyone,
> I'm fairly new to Torque, so any help is much appreciated. I'm trying
> to extend Torque as follows: the goal is to decouple the notion of a
> job and an execution environment. Currently, IIRC, Torque starts each
> job in a process. I want to be able to start a job, lets say, in a
> User Mode Linux instance (which gets destroyed after the job is done).
> I'm working with the source of Torque 2.1.1, and from what I've seen
> so far, it seems this should be possible. Are there any tight
> couplings where Torque assumes that jobs will be running in a POSIX
> process? I've seen a lot of 'pid' parameters being passed around, but
> I think they're opaque in that Torque doesn't associate any semantic
> meaning with the term pid -- it could be any identifier for a job.
> Comments and suggestions are most welcome.
Look in src/resmom/linux/ for stuff that does require the top-level pid to
be a process. Specifically, it is sent signals to kill it, and
functions like cput_sum() and mem_sum() crawl through /proc for each
task to get resource usage.
The pid of the top-level process (the user's shell) is task 0, which is
regularly checked to determine if the job is still running.
I wonder if it would make sense to define a new momarch,
More information about the torquedev