Separating work unit priority and accountability from address spaces5740437Abstract Work units are identified, managed and reported on as a group or enclave. The dispatching priorities of the work units are separated from the address spaces executing the work units. Instead, the dispatching priorities are tied to the priority of the enclave allowing work units to be executed within an address space at a priority independent from the address space. Additionally, resources used by the work units are accumulated and allocated to the requestor of the work. Claims What is claimed is: Description TECHNICAL FIELD
______________________________________
?IWMCLSFY ›TRXNAME({xtrxname.vertline.NO.sub.-- TRXNAME})!
›USERID({xuserid.vertline.NO.sub.-- USERID})!
›TRXCLASS({xtrxclass.vertline.
NO.sub.-- TRXCLASS})!
›ACCTINFO({xacctinfo.vertline.
NO.sub.-- ACCTINFO})
ACCTINFL(xacctinfl)!
›SOURCELU({xsourcelu.vertline.
NO.sub.-- SOURCELU})!
›NETID({xnetid.vertline.NO.sub.-- NETID})!
›LUNAME({xluname.vertline.NO.sub.-- LUNAME})!
›SUBSYSPM({xsubsyspm.vertline.
NO.sub.-- SUBSYSPM})
SSPMLEN(xsspmlen)!
›COLLECTION({xcollection.vertline.
NO.sub.-- COLLECTION})
COLLECTION.sub.-- LEN(xcollection.sub.--
len)!
›PLAN({xplan.vertline.NO.sub.-- PLAN})!
›PACKAGE({xpackage.vertline.NO.sub.-- PACKAGE})!
›CONNECTION({xconnection.vertline.
NO.sub.-- CONNECTION})!
›CORRELATION({xcorrelation.vertline.
NO.sub.-- CORRELATION})
CORR.sub.-- LEN(xcorr.sub.-- len)!
CONNTKN(xconntkn)
SERVCLS(xservcls)
›SRVCLSNM(xsrvclsnm)
›RPTCLSNM(xrptclsnm)!
›RETCODE(xretcode)!
›RSNCODE(xrsncode)!
______________________________________
Where: ›TRXNAME({xtrxname.vertline.NO.sub.-- TRXNAME})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the transaction name for the work request, as known by the work manager. For environments where the transaction name is available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- TRXNAME. DEFAULT: NO.sub.-- TRXNAME indicates that no transaction name is passed. ›USERID({xuserid.vertline.NO.sub.-- USERID})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the userid associated with the work request. For environments where the user id is available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- USERID. DEFAULT: NO.sub.-- USERID indicates that no userid is passed. ›TRXCLASS({xtrxclass.vertline.NO.sub.-- TRXCLASS})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains a class name within the subsystem. This can be any meaningful value that the installation can recognize and specify to match the value presented by the work manager. For environments where the transaction class is available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- TRXCLASS. DEFAULT: NO.sub.-- TRXCLASS indicates that no transaction class was passed. ›ACCTINFO({xacctinfo.vertline.NO.sub.-- ACCTINFO}) is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional character input which contains the accounting information. For environments where accounting information is available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- ACCTINFO. DEFAULT: NO.sub.-- ACCTINFO indicates that no accounting information was passed. ACCTINFL(xacctinfl)! is the name (RS-type) (or address in register (2)-(12) ASM only) of a required fullword input which contains the length of the accounting information field. The maximum value supported, in one embodiment, is 143. ›SOURCELU({xsourcelu.vertline.NO.sub.-- SOURCELU})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional character input which contains the logical unit (LU) name associated with the requestor. This may be the fully qualified NETID.LUNAME, e.g. network name (1-8 bytes), followed by the logical unit (LU) name for the requestor (1-7 bytes). It may also be the 1-8 byte local LU name, with no network qualifier. The SOURCELU field may be from, for example, 1-17 characters. SOURCELU is mutually exclusive with NETID/LUNAME. DEFAULT: NO.sub.-- SOURCELU indicates that no source LU name was passed. ›NETID({xnetid.vertline.NO.sub.-- NETID})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the network identifier associated with the requestor. For environments where the network identifier may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- NETID. SOURCELU is mutually exclusive with NETID. DEFAULT: NO.sub.-- NETID indicates that no network identifier is passed. ›LUNAME({xluname.vertline.NO.sub.-- LUNAME})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the local LU name associated with the requestor. For environments where the local LU name may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- LUNAME. SOURCELU is mutually exclusive with LUNAME. DEFAULT: NO.sub.-- LUNAME indicates that no local LU name is passed. ›SUBSYSPM({xsubsyspm.vertline.NO.sub.-- SUBSYSpM}) is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional character input which contains character data related to the work request which is passed by the work manager for use in classification. The nature of the contents of this data must be documented for customer use. For environments where the subsystem parameter is available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- SUBSYSPM. DEFAULT: NO.sub.-- SUBSYSPM indicates that no parameter was passed. SSPMLEN(xsspmlen)! is the name (RS-type) (or address in register (2)-(12) ASM only) of a required fullword input which contains the length of the data passed by the work manager. There is no restriction on the length of data passed, but all storage between the start and end must be allocated (e.g., getmained). ›COLLECTION({xcollection.vertline.NO.sub.-- COLLECTION}) is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional character input which contains the customer defined name for a group of associated packages. For environments where the collection name may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- COLLECTION. DEFAULT: NO.sub.-- COLLECTION indicates that no COLLECTION name is passed. COLLECTION.sub.-- LEN(xcollection.sub.-- len) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required fullword input which contains the length of the collection name. There is no restriction on the length of data passed, but all storage between the start and end must be allocated (e.g., getmained). ›PLAN({xplan.vertline.NO.sub.-- PLAN})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the access plan name for a set of associated SQL statements. For environments where the plan name may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- PLAN. DEFAULT: NO.sub.-- PLAN indicates that no PLAN name is passed. ›PACKAGE({xpackage.vertline.NO.sub.-- PACKAGE})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the package name for a set of associated SQL statements. Products using this attribute must chose a specific package name to be associated with the work request, e.g., the first package name used in the unit of work. Individual product documentation will describe how this choice is made to allow the installation to use the work load manager (WLM) administrative application. For environments where the package name may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- PACKAGE. DEFAULT: NO.sub.-- PACKAGE indicates that no PACKAGE name is passed. ›CONNECTION({xconnection.vertline.NO.sub.-- CONNECTION})! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character input which contains the name associated with the environment creating the work request, which may reside anywhere within the network. For environments where the connection name may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- CONNECTION. DEFAULT: NO.sub.-- CONNECTION indicates that no CONNECTION name is passed. ›CORRELATION({xcorrelation.vertline.NO.sub.-- CORRELATION}) is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional character input which contains the name associated with the user/program creating the work request, which may reside anywhere within the network. For environments where the correlation name may be available on some, but not all flows, provision of a data area initialized to all blanks is equivalent to specification of NO.sub.-- CORRELATION. DEFAULT: NO.sub.-- CORRELATION indicates that no CORRELATION name is passed. CORR.sub.-- LEN(xcorr.sub.-- len) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required fullword input which contains the length of the correlation identifier. There is no restriction on the length of data passed, but all storage between the start and end must be allocated (e.g., getmained). CONNTKN(xconntkn) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 32 bit input which indicates who is doing the classification. SERVCLS(xservcls) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 32 bit output which is to receive the output token which represents the service and report class for the work request. ›SRVCLSNM(xsrvclsnm)! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character output which is to receive the output service class name. ›RPTCLSNM(xrptclsnm)! is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 character output which is to receive the output report class name. ›RETCODE(xretcode)! is the name (RS-type) (or register (2)-(12) ASM only) of an optional fullword output variable into which the return code is to be copied from GPR 15. ›RSNCODE(xrsncode)! is the name (RS-type) (or register (2)-(12) ASM only) of an optional fullword output variable into which the reason code is to be copied from GPR 0. Subsequent to initializing the parameter area with classification parameters to be used in the create routine, IWMECREA is called in order to create an enclave. One embodiment of the syntax of IWMECREA is described below. (In this embodiment, some of the fields are listed as required and others are listed as optional. This is only one example and it may be different for other embodiments.):
______________________________________
?IWMECREA CLSFY(xclsfy)
ARRIVALTIME(xarrivaltime)
FUNCTION.sub.-- NAME(xfunction.sub.-- name)
ETOKEN(xetoken)
›RETCODE(xretcode)!
›RSNCODE(xrsncode)!
______________________________________
Where: CLSFY(Xclsfy) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required character input which contains the classification information in the format of the parameter list for IWMCLSFY. Note that this name is the data area name, not its pointer. As described previously, IWMCLSFY is invoked by the transaction manager and processed by the operating system in a modified form prior to invocation of IWMECREA in order to initialize this data area with the needed classification information. The variable length fields associated with the classify parameter list given by the CLSFY keyword have the following limitations in addition to those documented in IWMCLSFY: SUBSYSPM is limited to 255 bytes COLLECTION is limited to 18 bytes CORRELATION is limited to 12 bytes ARRIVALTIME(xarrivaltime) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 64 bit input which contains the work arrival time in store clock (STCK) format. This is the time at which a business work request is considered to have arrived and from which point the system evaluates elapsed time for the work request. FUNCTION.sub.-- NAME(xfunction.sub.-- name) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 8 character input which contains a descriptive name for the function for which the enclave was created. ETOKEN(xetoken) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 8 character output which will receive the enclave token (EncbToken) after the enclave token is attached to the enclave vector table. ›RETCODE(xretcode)! is the name (RS-type) (or register (2)-(12) ASM only) of an optional fullword output variable into which the return code is to be copied from general purpose register (GPR) 15. ›RSNCODE(xrsncode)! is the name (RS-type) (or register (2)-(12) ASM only) of an optional fullword output variable into which the reason code is to be copied from GPR 0. The address space that creates an enclave is the owner of that enclave. The CPU time accrued by all of the work units in an enclave is accumulated, for example, in the owner's address space (i.e., the one for whom work is performed). One example of the logic associated with IWMECREA is described below with reference to FIGS. 5a and 5b. (This is only one example. It is possible in other examples for the steps described below to be performed in a different order or to be combined with other steps.) When the transaction manager invokes IWMECREA, the operating system (e.g., MVS) receives the input that is listed in the enclave control block, STEP 100 "RECEIVE INPUT." Specifically, the classification information needed to perform classification for the enclave (CLSFY), the arrival time of the work request (ARRIVALTIME), and the name of the function for which the enclave was created (FUNCTION.sub.-- NAME) are provided to the operating system. Thereafter, a determination is made as to whether the input is valid, INQUIRY 102 "IS INPUT VALID?" This determination is made based on the installation policy for the data processing system. If the input is invalid, then processing of the enclave create is terminated, STEP 104 "END." However, if the input is valid, then the operating system allocates storage for the enclave control block (ENCB), STEP 106 "ALLOCATE STORAGE FOR ENCB." Subsequent to allocating the storage, the input classification attributes of CLSFY are placed into the enclave control block in the appropriate fields. In particular, EncbWlmClsfyConnTkn, EncbWlmClsfyTrxName, EncbWlmClsfyUserid, EncbClsfyTrxClass, EncbWlmClsfySourceLu, EncbWlmClsfyNetid, EncbWlmClsfyLuName, EncbWlmClsfyPlan, EncbWlmClsfyPackage, WncbWlmClsfyConnection, EncbWlmClsfySourceLuLen, EncbWlmClsfySspmPtr, EncbWlmClEncbWlmCen, EncbWlmClsfyAcctPtr, EncbWlmClsfyAcctLen, EncbWlmClsfyCollection, EncbWlmClsfyCollectionlen, EncbWlmClsfyCorrelation, EncbWlmClsfyCorrelationlen of the enclave control block are filled in with the information located in CLSFY, STEP 108 "PLACE INPUT CLASSIFICATION ATTRIBUTES INTO STORAGE FOR ENCB." Subsequent to filling in the control block with the classification parameters, classification is invoked to determine the name of the service class for the work request, STEP 110 "INVOKE CLASSIFICATION." Classification procedures are known in the art, however, in accordance with the principles of the present invention, these procedures are applied to enclaves. The procedure for classification of enclaves is similar to the procedure for address spaces. One example of classification is described in detail in MVS/ESA PLANNING: WORKLOAD MANAGEMENT (IBM Publication Number: GC28-1493) (Second edition, June 1994), which is incorporated herein by reference in its entirety. After the service class name is determined, it is placed in the enclave control block in a field called EncbWlmServiceClassName. Thereafter, the operating system locates the service class block which corresponds to the service class name, STEP 112 "LOCATE SERVICE CLASS BLOCK," and the address of the service class block is placed in the enclave control block in EncbScte, STEP 114. Subsequently, an enclave priority (also referred to as a major priority) is determined for the enclave. For this invention, the particular value of the enclave priority is not important. What is important is that an enclave is created and the enclave has a priority, which will be used in dispatching and executing the work units. However, one example of determining a priority value is described in detail in co-pending U.S. patent application, Ser. No. 08/222,752, entitled "APPARATUS AND METHOD FOR MANAGING A SERVER WORKLOAD ACCORDING TO CLIENT PERFORMANCE GOALS IN A CLIENT/SERVER DATA PROCESSING SYSTEM", filed on Apr. 04, 1994 and assigned to International Business Machines Corporation, which is incorporated herein by reference in its entirety. Once the enclave priority is determined, it is placed within the EncbDP and EncbNdp fields of the enclave control block, STEP 116 "PLACE VALUE FOR ENCLAVE PRIORITY INTO ENCB." Thereafter, the enclave control block is attached to the enclave vector table. Initially, a determination is made as to whether the enclave vector table is full, INQUIRY 118 "IS ENVT FULL?" Should the table be full, a larger enclave vector table is allocated and the current enclave vector table is copied into the new, larger enclave vector table, STEP 120 "ALLOCATE LARGER ENVT." The larger enclave vector table is the one used from this point forward. After allocating a larger enclave vector table or if the enclave vector table is not full, a further determination is made as to whether the sequence number in the enclave vector table (i.e., EnvtNextAvailSeqNum) is zero, INQUIRY 122. If the sequence number is zero, then it is set to one, STEP 124 "SET SEQ. NO.=1." Thereafter, or if the sequence number is not equal to zero, the sequence number is placed in the enclave control block. In particular, the value in EnvtNextAvailSeqNum is placed in EncbTokenSeq# of the EncbToken. Further, the sequence number in the enclave vector table (i.e., EnvtNextAvailSeqNum) is incremented by one, STEP 126 "PLACE SEQ. NO. INTO ENCB; INCREMENT SEQ. NO." Furthermore, the offset of the next available enclave vector table entry is placed in the enclave control block, such that the enclave control block points to the enclave vector table, STEP 128 (FIG. 5b) "SET EncbEnvt.sub.-- offset." In particular, a field referred to as EncbEnvt.sub.-- offset in the enclave control block is set equal to EnvtFreeEntryPtr of the enclave vector table. Additionally, EncbPseudoId is set equal to (EnvtFreeEntryPtr-Addr(Envt)-EnvtHeaderLength)/EnvteSize+1, STEP 130 "SET EncbPseudoID, and EnvtFreeEntryPtr is set equal to Envte.sub.-- next.sub.-- Free.sub.-- Ptr(EncbPseudoId), STEP 132 "PLACE ADDRESS OF NEXT FREE ENTRY IN ENVT." In one embodiment, the EnvtHeaderLength is a decimal field indicating the length of the header of the enclave vector table and EnvteSize is a constant representing the size of one entry in the enclave vector table. In one example, EnvtHeaderLength may be included in the structure of the enclave vector table. In addition to the above, the address of the enclave control block is placed into the enclave vector table entry so that the table entry points to the ENCB (i.e., Envte.sub.-- EncbPtr(EncbPseudoId)), STEP 134. Additionally, the EncbPseudoIDBit0, which is a high order bit in EncbPseudoID of the enclave control block, is set, STEP 136. Further, the number of vector table entries in use is incremented by one (i.e., EnvtEntriesInUse=EnvtEntriesInUse+1), STEP 138 "INCREMENT NUMBER OF ENTRIES IN USE." Subsequent to setting the appropriate fields, the enclave control block is placed on a queue of inuse enclave control blocks, STEP 140. In particular, the pointers, EncbNext and EncbPrev, are appropriately set. Further, the enclave control block is placed on a queue of owned enclave control blocks for the owning address, STEP 142. Specifically, the pointers, EncbOwnerOucbPtr, EncbOwnerNextEncb and EncbOwnerPrevEncb are appropriately set. Subsequently, the enclave token (EncbToken), which includes the EncbEnvt.sub.-- offset and EncbTokenSeq#, is passed to the invoker of the IWMECREA (i.e., the owner of the enclave, which is the transaction manager in this embodiment) via the field ETOKEN, STEP 144 "RETURN ETOKEN," and processing of enclave create is complete, STEP 146 "END." Upon receiving the ETOKEN, the transaction manager may begin scheduling work units. In one embodiment, a work unit is scheduled via IEAMSCHD. One example of the syntax associated with IEAMSCHD is described below. (In this embodiment, some of the fields are listed as required and others are listed as optional. This is only one example and it may be different for other embodiments.):
______________________________________
?IEAMSCHD EPADDR(xepaddr)
PRIORITY(ENCLAVE)
ENCLAVETOKEN
(xenclavetoken)
MINORPRIORITY
({xminorpriority.vertline.ZERO})
______________________________________
Where: EPADDR(xepaddr) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required pointer input that contains the address of the code (e.g., an SRB routine) to be executed under the work unit to be scheduled for asynchronous execution. PRIORITY(ENCLAVE) specifies that the work unit is to be scheduled into an enclave. A work unit that is scheduled with PRIORITY=ENCLAVE is preemptable. The work unit will inherit its minor priority from the enclave and any CPU time used will be accumulated in the enclave. (In one embodiment, this attribute is designated along with the address space in which the work unit is to receive control. Typical address spaces include, for instance, a home address space and a primary address space.) ENCLAVETOKEN(xenclavetoken) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 8 character input which contains the enclave token which represents the group of work units whose resources are to be managed by the System Resource Manager (SRM) of the operating system. The enclave token must be obtained prior to scheduling the work unit and may be obtained via ETOKEN of the IWMECREA macro. MINORPRIORITY({xminorpriority.vertline.ZERO}) is the name (RS-type) (or address in register (2)-(12) ASM only) of an optional 8 bit input received from a user containing a minor priority that a work unit is to be assigned. Work units with a higher minor priority are dispatched before work units or tasks with a lower minor priority in the enclave. As an example, a minor priority of X'00' is the lowest and X'FF' is the highest. DEFAULT: Zero. The minor priority is X'00'. One example of the logic associated with scheduling a work unit, in accordance with the principles of the present invention, is described in detail below with reference to FIG. 6. (This is only one example. It is possible in other examples for the steps described below to be performed in a different order or be combined with other steps.) Initially, in order to invoke IEAMSCHD, the ETOKEN from the create macro and the minor priority from the user is received and stored in ENCLAVETOKEN and MINORPRIORITY, respectively, of the IEAMSCHD macro, STEP 170 "RECEIVE INPUT." After the input is received, a determination is made as to whether the input is valid, INQUIRY 172 "IS INPUT VALID?" If the input is invalid, processing of IEAMSCHD terminates, STEP 190 "END." However, if the input is valid, then the operating system obtains storage for the work unit, in any known manner, STEP 174 "OBTAIN STORAGE FOR WORK UNIT." Subsequent to obtaining the storage, the ENCLAVETOKEN is used to locate the enclave, STEP 176 "LOCATE ENCLAVE." In particular, EncbEnvt.sub.-- offset of the ENCLAVETOKEN supplies the offset into the enclave vector table, which indicates where the enclave control block has been registered. After locating the enclave control block, the storage previously obtained for the work unit is initialized with the values of ENCLAVETOKEN, MINORPRIORITY, the pseudo id (EncbPseudoID) of the control block, and the address of the enclave control block, STEP 178 "INITIALIZE STORAGE". After the storage is initialized, the enclave control block is serialized so that no additions or deletions can be made to the enclave, except for those associated with the work unit being scheduled, STEP 180 "SERIALIZE ENCLAVE." After serialization, the work unit is queued to the enclave, STEP 182 "QUEUE STORAGE TO ENCLAVE." In particular, EncbFirstWEBAddr is set to point to the first work unit and the work unit is set to point to the enclave control block. Thereafter, serialization is released, in any known manner, STEP 184 "UNSERIALIZE ENCLAVE." Next, the enclave priority is obtained from EncbDP of the enclave control block, STEP 186 "OBTAIN ENCLAVE PRIORITY," and the work unit is queued to the dispatching queue using, in accordance with the principles of the present invention, the retrieved enclave priority, STEP 188 "QUEUE STORAGE TO DISPATCHING QUEUE." The dispatching queue is in priority order. In one embodiment, the retrieved enclave priority is considered the major priority for each work unit of the enclave. Each work unit may also have a minor priority, which indicates its dispatching priority relative to the other work units in the enclave. Subsequent to placing the work unit on the dispatching queue, scheduling of the work unit is complete, STEP 190 "END." At some later time, the scheduled work unit is dispatched by the operating system and executed by the transaction manager. This processing occurs for each work unit of the work request. When all of the work units have been processed or when no new work units are to be added to an enclave, the enclave may be deleted. In order to delete an enclave, such that no work units exist within the enclave and no new work units may be scheduled into the enclave, IWMEDELE is used. One example of the syntax of IWMEDELE is described below. (In this embodiment, some of the fields are listed as required and others are listed as optional. This is only one example and it may be different for other embodiments.):
______________________________________
?IWMEDELE ETOKEN(xetonken)
›RETCODE(xretcode)!
›RSNCODE(xrsncode)!
______________________________________
Where: ETOKEN(xetoken) is the name (RS-type) (or address in register (2)-(12) ASM only) of a required 8 character input which contains the enclave token to be returned. ›RETCODE(xretcode) is the name (RS-type) (or register (2)-(12) ASM only) of an optional fullword output variable into which the return code is to be copied from GPR 15. ›RSNCODE(xrsncode) is the name (RS-type) (or register (2)-(12) ASM only) of an optional fullword output variable into which the reason code is to be copied from GPR 0. One example of the logic associated with deleting an enclave, in accordance with the principles of the present invention, is described in detail below with reference to FIG. 7. (This is only one example. It is possible in other examples for the steps described below to be performed in a different order or be combined with other steps.) Referring to FIG. 7, when IWMEDELE is invoked by, for instance, the transaction manager, the enclave token (ETOKEN) of the enclave to be deleted is passed to the operating system, STEP 210 "RECEIVE INPUT." After the input is received, the enclave is serialized in any known manner such that no information may be added to or deleted from the enclave, STEP 212 "SERIALIZE ENCLAVE." Subsequent to serialization, the enclave sequence number (EncbTokenSeq#) is saved in storage, STEP 214 and then, the sequence number is cleared by setting EncbTokenSeq# to zero, STEP 216. This makes the enclave token invalid. Thereafter, each work unit queued to the enclave is dequeued, STEP 218 "DEQUEUE WORK UNITS." In particular, the operating system locates the first work unit by referring to EncbFirstWEBAddr in the enclave control block. When the first work unit is located, it is changed from an enclave work unit to a standard work unit by disassociating the work unit from the enclave. For a standard work unit, the priority of the work unit is derived from its home address space, instead of the enclave. After changing the enclave work unit to a standard work unit, the enclave sequence number previously saved in storage is placed into the work unit. The above is repeated for each of the work units queued in the enclave. Subsequent to dequeuing the work units, the enclave is unserialized, STEP 220, and a determination is made as to whether there were any work units queued to the enclave, INQUIRY 222 "WERE ANY WORK UNITS QUEUED TO ENCLAVE?" If there were work units queued to the enclave, each central processing unit running a dequeued work unit, as indicated by the saved enclave sequence number in the work units, is signaled to interrupt the work unit, STEP 224 "INTERRUPT WORK UNIT." The work unit loses control of the processor and gets placed on the dispatching queue with the priority of its home address space. Thereafter, or if there were no work units queued to the enclave, the enclave vector table entry for the deleted enclave is made available, STEP 226 "MAKE ENVTE AVAILABLE." Specifically, Envt.sub.-- Next.sub.-- Free.sub.-- Ptr is set equal to EnvtFreeEntryPtr, the high order bit (Ente.sub.-- Available) of the Envte.sub.-- Next.sub.-- Free.sub.-- Ptr is set on, EnvtFreeEntryPtr is set equal to addr(Envte), and EnvtEntriesInUse is decremented by 1. Thereafter, the enclave is removed from the queue of in-use enclave control blocks by appropriately adjusting the EncbNext and EncbPrev pointers, STEP 228 "REMOVE ENCLAVE FROM QUEUE OF IN-USE ENCBS." Additionally, the enclave is removed from the queue of owned enclave control blocks in the owning address space by appropriately adjusting the EncbOwnerPrevEncb and EncbOwnerNextEncb pointers, STEP 230 "REMOVE ENCLAVE FROM QUEUE OF OWNED ENCBS." Subsequent to removing the enclave from the queues, the storage for the enclave is deallocated, STEP 232 "DEALLOCATE STORAGE," and processing of the delete service is complete, STEP 234 "END." Described above in detail is a procedure for separating priority of a work unit from the address space which owns or executes the work unit. In accordance with the principles of the present invention, the priority of a work unit is derived from the priority of the enclave. Thus, the priority of the enclave and the work unit is independent from any address space priority. The work unit will execute in an address space at a priority based on the enclave priority and not the address space priority. The address space priority is overridden. In addition to separating the priority from the address space, accounting is also separated from the address space, in accordance with the principles of the present invention. In particular, while the work unit is executing, any resources consumed by the work unit are accumulated by the operating system. These resources are accrued to the initiator of the work units. That is, for example, the resources are accrued to the requestor of the work or to the owner of the enclave, i.e., the address space that invoked the enclave create service. In one example, the CPU time accumulated for the enclave is stored in the enclave control block in a field identified as EncbTotalCpuTime. Thereafter, reports may be issued to the initiator reporting on the accrued resources or in another example, the initiator (e.g., the enclave owner) may query the enclave control block to determine the amount of resources used by the work units associated with the enclave. Additionally, in one embodiment, when the enclave terminates, the total resources used by the work units of the enclave is stored in the owning address space's control block for future reference and/or reporting. In a further embodiment of the invention, it is possible to modify the enclave priority when it is determined that performance objectives associated with the enclave are not being met. In order to modify the enclave priority, the new priority value is stored in EncbNdp of the enclave control block, and then, at the appropriate time the value in EncbNdp is copied to EncbDP. Thereafter, the enclave executes at the new priority value. The manner in which a particular priority value is determined is not important for this invention. What is important is the fact that the priority is associated with an enclave and that the enclave priority may be adjusted to meet the performance objectives of the data processing system. However, one example of a technique for determining a particular priority value is discussed in detail in co-pending U.S. patent application, Ser. No. 08/222,752, entitled "APPARATUS AND METHOD FOR MANAGING A SERVER WORKLOAD ACCORDING TO CLIENT PERFORMANCE GOALS IN A CLIENT/SERVER DATA PROCESSING SYSTEM", filed on Apr. 04, 1994 and assigned to International Business Machines Corporation, which is incorporated herein by reference in its entirety. Described in detail above is a technique for separating work unit priority and accounting from address spaces. A summary of the interaction between, for example, a transaction manager and an operating system in performing the technique of the present invention is depicted in FIG. 8. Each of the steps shown in FIG. 8 has been described in detail above. FIG. 8 is just one example. It will be apparent to those skilled in the relevant art that variations to the above-described processing are possible, and these are considered within the scope of the invention, as claimed. For example, certain steps may be altered, performed in a different sequence or deleted. Further, the interaction may be between different systems, different operating systems or different transaction managers. Although a preferred embodiment has been depicted and described in detail herein, it will be apparent to those skilled in the relevant art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims.
|
Same subclass Same class Consider this |
||||||||||
