Browse Prior Art Database

Method for Managing a Parent-Child Relationship between started Tasks in Separate Address Spaces

IP.com Disclosure Number: IPCOM000118630D
Original Publication Date: 1997-Apr-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 6 page(s) / 153K

Publishing Venue

IBM

Related People

Morgan, KG: AUTHOR

Abstract

Disclosed is a method to simulate a parent-child relationship when a started task (parent) needs to create a second started task (child) in a separate Multiple Virtual Storage (MVS) address space. No code has to be added or changed in the second started task. The parent-child relationship simulation includes: 1. The parent is assured that the child task has been successfully started and is returned the Process Identification (PID) of the child task. 2. The parent task receives a SIGCHLD signal if the child task terminates. 3. The child task terminates if the parent task terminates.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 45% of the total text.

Method for Managing a Parent-Child Relationship between started Tasks
in Separate Address Spaces

      Disclosed is a method to simulate a parent-child relationship
when a started task (parent) needs to create a second started task
(child) in a separate Multiple Virtual Storage (MVS) address space.
No code has to be added or changed in the second started task.  The
parent-child relationship simulation includes:
  1.  The parent is assured that the child task has been
       successfully started and is returned the Process
       Identification (PID) of the child task.
  2.  The parent task receives a SIGCHLD signal if the
       child task terminates.
  3.  The child task terminates if the parent task terminates.

      Started tasks are initialized via a Job Control Language (JCL)
procedure.  The MVS fork and spawn facilities do allow a parent
started task to create a second child address space and invoke a
program to run,  but they cannot initiate started tasks.

The method uses several MVS system facilities:

      ASCRE (Address Space Create) - an authorized assembler service
which creates a separate address space and invokes a JCL procedure
for a started task to run in it.  ASCRE also creates an asynchronous
exit in the caller address space.  This exit is invoked when the
created address space terminates.  An ASCRE option also ensures that
the created address space is terminated if the caller address space
terminates.  ASCRE is described in (1).

      IEANTCR and IEANTRT (Token Create/Retrieve) - authorized
assembler services which provide the interface to the MVS name/token
service.  This service provides limited communication between address
spaces.  A task in one address space uses IEANTCR to create a
system-level token containing up to 16 bytes of data.  A task in
another address space uses IEANTRT to retrieve the token and reads
the data.  IEANTCR and IEANTRT are described in (1).

      BPX1ATM - callable assembler service which creates a child
process within an address space and invokes a specified program to
run it.  BPX1ATM returns the PID of the child process.  BPX1ATM is
described in (2).

      BPX1MPI and BPX1MP (Mvspause) - callable assembler services
which allow a thread to suspend until an event is posted via an event
control block.  BPX1MPI initializes the wait information and BPX1MP
starts the wait.  BPX1MPI and BPX1MP are described in (2).

The method follows these steps:
  1.  The parent started task creates a signal handler thread
       that waits on a SIGCHLD.  The parent then invokes ASCRE
       to create the child address space and run the child
       started task JCL.  ASCRE also sets up the asynchronous
       exit that gets control when the child address space
       terminates.  The parent then waits a specified time,
       periodically invoking IEANTRT to retrieve the system-level
       name/toke...