Abstract:
Mounting volumes (tape reels or disks) to data processing system is managed for reducing the number of mounting operations. A data accumulation algorithm generates mounting criteria.

Description:
FIELD OF THE INVENTION 
     The present invention relates to data processing, particularly to the management of peripheral devices and associated mountable record media in a data processing environment. 
     DISCUSSION OF THE PRIOR ART 
     Data storage in data processing environments typically is viewed as a hierarchy of storage levels. The first or fastest level is the level that communicates directly with the host processors in the data processing environment. The lower levels of the hierarchy which may be up to six, seven or eight levels, add increasingly larger data storage capacities but have increasingly longer accesss times. The lower levels of the storage hierarchy are often characterized by a plurality of individually addressable data storage devices. It is desired to utilize these various addressable data storage devices in an optimum manner for enhancing the overall operation of the data processing environment and particularly the data storage hierarchy. 
     Depending on how a data storage hierarchy is defined, the various levels can include the following types of devices and apparatus. The highest level may be a caches directly connected to the hot processor electronic circuits. The next level can be the so-called &#34;main memory&#34; which, in a large processor, can be several megabytes of data storage. Just below the main memory can be relatively fast access disk storage devices, also referred to as direct access storage devices (DASD) or an electronic memory designed to emulate a magnetic data storage drum, DASD and the like. The fourth level can consist of slower DASDs than that used in the third level. Below the slower DASDs can be magnetic tape, optical disks, etc. Yet below that level can be tape or disk data libraries which are for archival storage and the like. It is to be understood that the various levels can be defined in differing manners and be constituted by various and diverse devices. A lowest level, for example, can include a communication for transferring data from a data processing environment to an archival environment remotely located from the data processing environment. Another device within a data storage form of hierarchy is a so-called &#34;cached DASD&#34; wherein a electronic memory is logically interposed between the main memory of a host processor and the relatively high performance DASD. 
     In any data storage hierarchy it is desired to move data as quickly as possible from a higher level to a lower level such that the higher levels have available data storage capacity for storing data that will be next used by the host processor or for providing data storage space for data generated by the host processor. This type of control can take many forms. In a cached DASD for example, a least recently used (LRU) algorithm is used for moving data from the electronic cache to the DASD. An example of such an arrangement is shown by the Hartung et al., U.S. Pat. No. 4,636,946. Hartung et al. teach that in addition to the usual LRU listing (as shown in FIG. 4 of this reference) two thresholds are provided for more efficiently demoting or migrating data from the electronic memory cache to the DASD. The lower threshold is an availability threshold &#34;AT&#34; under which the processor in a control unit controlling the cache and DASD scans the LRU for candidates to be demoted from the cache to the DASD. When a data candidate is found, then the scan of the LRU list proceeds to a second threshold, a so-called &#34;grouping threshold&#34; (GT). The second scan looks for those data stored in cache that are in the same addressable module of DASD as that candidates found in the first scan. In DASD, the group is termed a &#34;cylinder&#34; which typically can have up to seventeen tracks of data. The minimum demotable unit is a track; up to seventeen tracks can be grouped together for a single access to DASD. By limiting the number of accesses to DASD, a migration from cache to DASD tends to be optimized. 
     In a magnetic tape environment, a single volume is mountable and demountable from a magnetic tape recorder. Where a manual library is involved, time required to manually mount and demount a tape volume (one reel of tape) can be exceedingly long when measured with respect to data processing speeds. Even in an automatic tape library, the access time to tape volume is measured in seconds rather than in microseconds or milliseconds, hence, it is relatively long with respect to the time base of a data processing environment. Accordingly, it is desired to minimize the number of such mounts for making data transfers into and from tape volumes more efficient. The same device applies to data libraries employing data storing disks. This arrangement is similar to the Hartung et al. philosophy of grouping together a set of spatially related data sets or tracks which are storable within a single group of data storage area, such as a cylinder, tape volume and the like. 
     The Hartung et al. patent teches control for migration or demotion of data through a lower level of the data storage hierarchy wherein the data storage area is relatively accessible for storage and retrieval. When demountable media are involved, including demountable optical disks, magnetic disks and magnetic tape, such a luxury disappears. This means that a more effective management of the data storage hierarchy, with respect to volume mounting, is desired. An IBM program product called data facility/hierarchical storage manager (DFHSM) provides for migration and backup of data storage from a primary level of peripheral devices, typically DASD, to a secondary level. The secondary level can be magnetic tape, tape libraries or slower DASDs. This program product sends messages to an operator console, or tape library for mounting and demounting tape volumes. The mounting of tape volumes for migration is not optimized for filling each mounted tape volume with data for minimizing the number of tape volume mounts. It is desired to increase the efficiency of media volume mounting for operating the data storage hierarchy, hence, the data processing environment. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a management of data storage volume mounting in a data storage hierarchy which enhances the overall operation of the hierarchy in providing for optimal storage of data. 
     In accordance with the invention, a record medium volume is mounted for being accessed by a host processor for receiving data to be stored in accordance with predetermined criteria. In a first one of such predetermined criteria, whenever the amount of data that has been accumulated in the data processing environment which at least equals the data storage capacity of a volume to be mounted actuates the system to mount a record volume. An additional requirement for record medium mounting can include a minimum elapsed time has occurred, or a minimum number of data sets have been identified, then a volume candidate is mounted on a typical recorded for receiving data to be destaged or migrated to that volume. In second ones of predetermined criteria, a record medium volume is mounted whenever a maximum elapsed time has occurred since the last migration release stage, a maximum number of data sets (also called requests) have been identified and accumulated in the data processing environment or an explicit request for a volume mount for one reason or another has been generated in the data processing environment. 
     The foregoing and other objects, features, and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a simplified block diagram of a data processing environment which includes a data storage hierarchy. 
     FIG. 2 is a simplified logic diagram illustrating the logic of operations of the FIG. 1 illustrated host processor control for the mounting of data storage volumes in a data storage hierarchy for the destaging or migration of data into a mounted volume. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now more particularly to the drawing, like numbers indicate like parts and structural features in the drawing. A data processing environment includes one or more host processors 10 having a set of peripheral subsystems 11, many of which can be data storage subsystems. Such of the data storage subsystems includes a plurality of control units, as is well known. Attached to some of the control units are DASD collectively and diagrammatically designated by numeral 14. Such DASD may constitute a primary peripheral data storage level of the data storage hierarchy. Associated with such DASDs 14 may be a set of caches (not shown) within the respective control units. The combination of a DASD 14 and a cache in the control unit provides for enhanced peripheral subsystem operation for enhancing host processor 10 computation. Another of the peripheral subsystems includes a set of recorders/reproducers 12 which are adapted to receive removable media. Such recorders/reproducers include magnetic tape devices, magnetic disk devices with removable media, and optical disks with removable media. Associated with a set of the recorders/reproducers 12 is a media library 13 which can be manually controlled, such as is commonly practiced with magnetic tape libraries, or may be an automatic library of known design. Such an automatic library can include the IBM 3850 Mass Storage System (MSS) which has tape cartridges mountable on recorders/reproducers for providing data communication between the volumes of data and a host processor. 
     Each host processor 10 includes complex electronic circuits and computer programs for computation and data processing system control. Such programs can include DFHSM, supra. As a portion of DFHSM are other programs which manage data storage hierarchies. Program modules are included as shown in FIG. 1 for incorporating the practice of the present invention in such a data processing environment. A command module 16 is a program task which receives software commands from other programs (such as DFHSM) in the host processor 10. Such commands are decoded and transferred to control task 17. Control task 17 implements the logic of the present invention for determining when a volume to receive data is to be mounted in one of the recorders/reproducers 12. In order to implement the logic, a software timer task 18 is software attached to control task 17. The timer task 18 indicates a calculated time of day. From this calculated time of day, various elasped times are calculated by control 17 in a usual manner. Such elasped times include task execution times, since a record medium volume was last mounted, etc. Processor task (process) 19 is software attached to control task 17 and processes the results of the logic determination made by the control task. Results of that processing by task 19 results in messages being sent through another software attachment to I/O control program 20, which sets up channel programs and provides generally for input/output operation control between host processor 10 and the various peripheral subsystems. In IBM host processors the I/O control is called &#34;IOS&#34; (input/output system). Of course, the I/O control 20 receives other I/O commands and messages from various programs within the host processor 10, all as diagrammatically illustrated by arrow 21. 
     The logic of operations of control task 17 for implementing the present invention is shown in FIG. 2. Software logic OR circuit 25 passes any one of four software conditions for initiating a destage or migrate operation; for example, mounting a data record medium for receiving and storing data signals. Any one of the four software determined conditions of host 10, and explicit request by an application program, the number of requests for migration or destage has reached a predetermined maximum number of such requests, a maximum elasped time since the last data record medium was mounted has been reached or data accumulated within host 10 for destage or migration is sufficient to fill one data record volume. It may be desired to limit the data record volume mountings more severely than set forth above. In such a situation, logic AND function 26 is logically interposed between the data &gt; volume capacity software input and logic OR function 27. Logic OR function enables the AND function 26 each time either of two additional software determined conditions are established. A first of the additional conditions is that a minimum time has elasped since the previous data record volume was mounted; i.e., the frequency of volume mounts is to be limited. A second of the additional conditions is that a minimum number of requests for destage or migration have been accumulated in control 17 before a data record volume(s) is to be mounted. Such frequency limitation on mounting or accessing a record medium can be applied to any or all of the stated conditions which are inputs to logic OR 25. It is to be appreciated that the accumulation of the software input conditions is established using current software techniques of measuring elapsed time, counting requests and summing the amount of data to be transferred. Since such software activities are well known and understood, they are not separately described herein. 
     The flowcharts for the command processing is listed below. The flowchart consists of three modules, one the STOP command, which stops the system and hence the optimize mounting processing, a BACKUP command and a SETSYS command which supplies control parameters to the optimize mounting. 
     
         ______________________________________STOP COMMANDThe control task for Optimized Mounting will be posted toflush all its queued output, mount tape volumes as neededand shut down whenever a system STOP command is processed.END STOP COMMANDBACKUP COMMANDThe BACKUP command is one of many that can create data to behandled by Optimized Mounting. A START --OUTPUT optionmay be specified on these commands if they are not waiting forthe request to be processed.The START --OUTPUT option causes the Optimized Mountingcontrol task to be posted to begin processing immediately.END BACKUP COMMANDSETSYS COMMANDThe SETSYS command has an OPTIMIZED --MOUNTparameter with optional subparameters as followsSTART --OUTPUTcauses Optimized Mount processing to be posted to beginprocessing immediatelyMAX --DELAY, MAX --# --Q&#39;ed, % --FULL, UNITNAME,MINIMUM --TIME, MINIMUM --# --REQUESTScauses Optimized Mount processing to be posted to changethe control parameter setting to the specified value(UNITNAME is capable of being mapped to a cartridgecapacity)END SETSYS COMMANDCONTROL TASKThe control task includes two portions; an initializationportion and a loop portion. The loop is performed substan-tially continuously when the host processor 10 through itsdispatcher or other program control mechanism allows thevolume optimizing task to perform its program functions.InitializationSet up ECB list of 5 entriesSet default control parms(max --delay, unitname, % --full,max --# --Q&#39;ed)Calculate amount --thrshld from unitname &amp; % --fullAttach TIMER taskLoop - DO FOREVERSELECT(ECB)CASE(Request received)Calculate amount of data in new request &amp; add toamount --Q&#39;ed.Increment by one the # --of --requests queued.Append request to Req-Q (double threaded chain with head&amp; tail ptr)Get current time of day (TOD) &amp; put in request entry asTOD queued.IF (amount --Q&#39;ed =&gt; amount --thrshld AND minimum time haselapsed AND minimum --# --requests are queued) :/* Threshold checks */# --of --requests =&gt; max --# --Q&#39;ed THENIF Process  --flag = NOT --ACTIVE THENPOST PROCESSELSE;ELSE /* Thresholdsnot exceeded */IF exactly 1 entry &amp; Process --flag = NOT --ACTIVE THENPOST TIMER task (IN:SET, time --Q&#39;ed +Max --delay --value)CASE(Max delay timer expired)IF Process --flag = NOT --ACTIVE THENPOST PROCESSCASE(Explicit request to start)IF request also supplied THENappend request to Req-QIF no requests Q&#39;ed THENsend nothing --Q&#39;ed messageELSEIF Process --flag = NOT --ACTIVE THENPOST PROCESSCASE(Shutdown request)IF Process --flag = NOT --ACTIVE THENdetach TIMER taskRETURN to systemCASE(Parm updates)IF unitname : % --full specified THENupdate amount --thrshld valueIF minimum --time specified THENupdate minimum --timeIF minimum --# --requests specified THENupdate minimum --# --requestsIF max --# --Q&#39;ed specified THENupdate max --#  --Q&#39;ed valueIF unitname : % --full : max --# --Q&#39;ed specified THENIF (amount --Q&#39;ed = &gt; amount --thrshld AND minimum --timehas elapsed AND minimum --# --requests are queued) :# --of --requests = &gt; max --# --Q&#39;ed THENIF Process --flag = NOT --ACTIVE THENPOST PROCESSIF max --delay specified THENupdate max --delay value &amp; POST TIMER(IN:RESET)IF Req --Q = NOT --EMPTY THENget current timeIF current time &gt; (TOD 1st Req + max --delay) THENIF Process --flag = NOT --ACTIVE THENPOST PROCESSELSE;ELSEPOST TIMER(IN:SET, (TOD 1st Req + max --delay))END SELECT(ECB)END DO FOREVER Loop of CONTROL TASKEND CONTROL TASK______________________________________ 
    
     The above charts&#39; term ECB means &#34;event control block&#34;, a software data unit. The UNITNAME identifies the address of the recorder/reproducer 12. Host processor 10 maintains a list within its I/O control 20, as is well known, of the data storage capacity of the volumes usable with UNITNAME. The % --  FULL means what percentage of volume is defined as a full volume, i.e. when does identified data within host processor 10 equal the volume contents. As one example, a percent of a volume can be defined as a full volume. The term Q&#39;ed means queued. MAX means maximum. &#34;:&#34; means OR. &#34;#&#34; means number. 
     The process task 19 is not detailed since it takes the information from the control task 17 and generates a socalled CCW chain, as is well known in IBM host processors. The constructed CCW chain is then supplied by process task 19 to the I/O control 20, as is done in the IBM computers. 
     
         ______________________________________TIMER TASK (IN:action, tod)action - can have values of SET or RESET.tod - is the time of day to set the timer to.InitializationSet up ECB list of 2 entriesLoop - DO FOREVERWAIT on ECB listSELECT (ECB)CASE(SET)Issue STIMER for TOD, NOTIFY = @ --of --WAKEUPCASE(RESET)Issue TTIMER to remove wakeup timerEND SELECTEND DO FOREVER Loop of TIMER TASKWAKEUP: asynchronously entered when timer expiresPOST control task that max --delay timer expiredRETURN to systemEND TIMER TASKPROCESS TASKset PROCESS --FLAG = ACTIVELoop through Q&#39;ed request chain till all processedReinitialize Q controlsChain head &amp; tail ptrs = 0Amount --of data = 0# --of --requests = 0set PROCESS --FLAG = NOT --ACTIVEEND PROCESS TASK______________________________________ 
    
     While the invention has been particularly shown and described with reference to its preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.