Browse Prior Art Database

Loading of User Exits Across Multiple Processes

IP.com Disclosure Number: IPCOM000114138D
Original Publication Date: 1994-Nov-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 99K

Publishing Venue

IBM

Related People

Johnson, A: AUTHOR

Abstract

Computer programs such as CICS OS/2* can have their behaviour modified by the end user supplying 'user exit' sub-programs. These user exits are optional, and do not have to be supplied if the user does not want to modify the default behaviour of CICS OS/2.

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

Loading of User Exits Across Multiple Processes

      Computer programs such as CICS OS/2* can have their behaviour
modified by the end user supplying 'user exit' sub-programs.   These
user exits are optional, and do not have to be supplied if the user
does not want to modify the default behaviour of CICS OS/2.

      CICS OS/2 is made up of several processes, each of which must
call the operating system to load a user exit before the user exit
can be called.

      However loading or attempting to load a user exit can be a slow
process, because the operating system may have to search directories
on several disks, some of which may be on a LAN.

      This means that the CICS OS/2 start up time is increased,
because on each start up each process calls the operating system to
attempt to load each user exit.

      For example, with 10 possible user exits, and perhaps 25
processes starting on a system, there are 250 calls to load user
exits, when none may be present.

      The problem can be minimized by adding a global, system wide
flag for each user exit, which indicates that a user exit was not
found by one process on start up, so no other process need attempt to
load the user exit.   This helps when each process is started
consecutively, as all the flags have been set by the first process,
so the second process can just check the status of the flags.  For
two process starting in parallel, this solution does not help,
because both process will attempt to load each user exit at the same
time.  While this is valid, this is not very efficient, because if
the user exit is not present, both processes will have attempted to
load the user exit, so both will have wasted time in the attempt,
rather than just one.

      An enhancement is to enclose the loading of the user exits into
a loop, loading user exits which have already been successfully
loaded by another process, or user exits which no process has
attempted to load.  User exits which have failed to be loaded by
another process can be skipped.   User exits which another process is
attempting to load can be left for another iteration of the loop.
There is a chance that by the next iteration, the other process will
have already discovered that the user is not present, so this process
need not load it.  If the user exit is present, then this process
will load it on a subsequent iteration.  Consideration needs to be
given to ensure that the process will terminate in a determinate
time, for example by implementing the following algorithm:
 Algorithm for user exit loading
 1.  Has the user exit not been searched for by any process yet?
     a.  Set a per user exit global flag to say this user exit is
          being loaded.
     b.  Call operating system to load the user exit.
     c.  If successful, set the global flag to say loading of this
          user exit was successful, and other processes sh...