Drive task management method and device for tape library system, and storage medium

By setting up a drive task management module in the tape library system and actively adjusting drive task scheduling, the problem of excessively long response time for readback task requests under high dump load was solved, and fast response for high-priority tasks was achieved.

WO2026137588A1PCT designated stage Publication Date: 2026-07-02SHENZHEN JIETENG TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHENZHEN JIETENG TECHNOLOGY CO LTD
Filing Date
2025-02-27
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

When the tape library system is under high dump load, the dump task does not actively release the tape, resulting in an excessively long response time for the read-back task request.

Method used

A drive task management module is set up in the data storage subsystem of the tape library system. By scanning the drive message queue, resetting the drive status, matching task priorities and resources, and actively adjusting the drive task scheduling, the module can preempt and interrupt low-priority tasks and prioritize high-priority tasks.

Benefits of technology

It improves the tape library system's response speed to high-priority tape requests and reduces the response wait time for high-priority tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025079607_02072026_PF_FP_ABST
    Figure CN2025079607_02072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a drive task management method and device for a tape library system, and a storage medium. The method comprises: after a drive task update is triggered, determining a tape task to be executed in a task queue to be executed; acquiring a drive state table, and, on the basis of the drive state table and the drive task update, selecting an execution drive of the tape task; and adding an execution command of the tape task to a command queue corresponding to the execution drive.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, devices, and storage media for drive task management in tape library systems

[0001] This application claims priority to Chinese patent application No. 202411944386.1, filed on December 27, 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of data processing technology, and in particular to a drive task management method, device and storage medium for a tape library system. Background Technology

[0003] Tape libraries use robotic arms to remove and load tapes, enabling automated data storage and retrieval. When data on a tape needs to be read or written, the tape library system directs the robotic arm to remove the tape from the tape slot and place it into the tape drive, allowing the drive to read and write data as needed.

[0004] In related technologies, tape library systems use tape priority scheduling to perform corresponding operations on the tapes via drives based on priority. Specifically, to avoid user waiting time, tape library storage systems typically increase the priority of tape read-back tasks to improve data retrieval response speed.

[0005] However, when the tape library system is under high dump load, all drive resources may be occupied by dump tasks. In this situation, because the tape library system does not support preemption of tape requests that have not been actively released, the continuous dumping without actively releasing tape by the dump task will cause the tape resources requested by the read-back task to be blocked indefinitely.

[0006] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Technical issues

[0007] The main purpose of this application is to provide a drive task management method, device and storage medium for a tape library system, which aims to solve the technical problem that when the tape library system is under high dump load, the continuous dumping without actively releasing the tape will cause the response waiting time for read-back task requests to be too long. Technical solutions

[0008] To achieve the above objectives, this application provides a drive task management method for a tape library system, applied to a drive task management module, wherein the drive management module is deployed in the data storage subsystem of the tape library system, and the method includes the following steps:

[0009] After triggering a driver task update, identify the tape tasks to be executed in the task queue;

[0010] Obtain the driver status table, and select the execution driver for the tape task to be executed based on the driver status table and the driver task update;

[0011] The execution command for the tape task to be executed is added to the command queue corresponding to the execution driver.

[0012] In one embodiment, before the step of determining the tape tasks to be executed in the task queue after triggering the driver task update, the method further includes:

[0013] Scan the driver message queue and retrieve the driver messages in the message queue based on the scan results;

[0014] Determine the message source driver of the driver message;

[0015] In the driver status table, the driver task status of the message source driver is reset to idle;

[0016] If the queue of tasks to be executed is not empty, determine whether to trigger the driver task update.

[0017] In one embodiment, after the step of determining to trigger the driver task update when the queue of tasks to be executed is not empty, the method further includes:

[0018] When there are non-write tape tasks in the queue of tasks to be executed, the non-write tape tasks are matched with the processing tape of the message source driver;

[0019] Based on the matching results and / or the priority of the non-write tape tasks, select the tape task to be executed from the non-write tape tasks;

[0020] Alternatively, if the non-write tape task is not present in the tasks to be executed, the task to be executed is selected from the tape tasks based on the matching result between the tape tasks in the task queue and the processing tape, and / or the priority of the tape task.

[0021] In one embodiment, before the step of determining the tape tasks to be executed in the task queue after triggering the driver task update, the method further includes:

[0022] Obtain the priority of the tape tasks in the task queue to be executed, and determine the priority task to be executed among the tape tasks based on the priority;

[0023] The priority task is designated as the tape task to be executed.

[0024] Based on the tape task to be executed, the driver task update is triggered.

[0025] In one embodiment, before the step of triggering the drive task update based on the tape task to be executed, the method further includes:

[0026] Get the preset maximum number of non-write tasks and the number of available drives;

[0027] The minimum value between the maximum number of non-write tasks and the number of available drives is used as the threshold for the number of non-write tasks.

[0028] When the priority task is a non-tape writing task, the non-tape writing tasks are sorted based on the non-tape writing task priority and the task submission time.

[0029] Based on the sorting results, the non-write tape tasks are scanned sequentially. The non-write tape tasks that are ranked before the threshold number of non-write tasks are set as pending scheduling, and the non-write tape tasks that are ranked after the threshold number of non-write tasks are set as non-pending scheduling.

[0030] In one embodiment, the step of triggering the drive task update based on the tape task to be executed further includes:

[0031] Add the non-write tape tasks to be scheduled to a temporary processing queue;

[0032] The non-write tape task is matched with the drive task status of the scheduled drive, and the target drive is determined in the scheduled drive based on the matching result.

[0033] Send a task interrupt command to the target drive so that the drive task module interrupts the tape task currently being executed by the target drive based on the interrupt command;

[0034] The target drive is set to be preempted in the drive status table, and the driver task update of the target drive is triggered. The driver task module controls the drive to execute the tape task on the target tape after the target tape is loaded into the target drive, based on the updated tape task.

[0035] Remove the non-write tape task from the temporary processing queue.

[0036] In one embodiment, before the step of determining the tape tasks to be executed in the task queue after triggering the driver task update, the method further includes:

[0037] Obtain driver information and initialize the driver status table and driver message queue in the driver task management module;

[0038] Based on the driver information, a command queue is generated for each driver, and a driver task is started for that driver;

[0039] Associate the driver task with the driver task status in the driver task management module.

[0040] In one embodiment, after the step of adding the execution command of the tape task to be executed to the command queue corresponding to the execution driver, the method further includes:

[0041] In the driver task module of the execution driver, the target tape task currently being executed by the execution driver is determined;

[0042] Determine the tape information for the target tape task;

[0043] In the queue of tasks to be executed, determine the tape task to be executed corresponding to the tape information;

[0044] The command to execute the tape task to be executed is added to the command queue of the execution driver.

[0045] In addition, to achieve the above objectives, this application also provides a drive task management device for a tape library system, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the drive task management method for the tape library system as described above.

[0046] In addition, to achieve the above objectives, this application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the drive task management method of the tape library system as described above. Beneficial effects

[0047] One or more technical solutions proposed in this application have at least the following technical effects:

[0048] This application improves the tape library system's ability to schedule drives by setting up a drive task management module in the data storage subsystem of the tape library system. This module can schedule drive tasks when high-priority read / write tasks occur or after a drive completes its task. It can proactively adjust the way drives process tasks, improve the response speed of drives to high-priority tape requests, and reduce the response waiting time for high-priority tape requests. Attached Figure Description

[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 is a flowchart illustrating the first embodiment of the driver task management method for the tape library system of this application.

[0052] Figure 2 is a schematic diagram of the tape library system architecture involved in the first embodiment of the tape library system driver task management method of this application;

[0053] Figure 3 is a flowchart illustrating the second embodiment of the driver task management method for the tape library system of this application.

[0054] Figure 4 is a flowchart illustrating the third embodiment of the driver task management method for the tape library system of this application.

[0055] Figure 5 is a flowchart illustrating the fourth embodiment of the driver task management method for the tape library system of this application;

[0056] Figure 6 is a schematic diagram of the drive task management device of the tape library system in the hardware operating environment involved in the embodiment of this application.

[0057] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Embodiments of the present invention

[0058] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0059] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0060] The main solution of this application embodiment is: after triggering the driver task update, determine the tape task to be executed in the task queue; obtain the driver status table, and select the execution driver of the tape task to be executed according to the driver status table and the driver task update; add the execution command of the tape task to be executed to the command queue corresponding to the execution driver.

[0061] In existing technologies, tape library systems schedule tapes based on priority, performing corresponding operations on the tapes via drives. To minimize user wait time, tape library storage systems typically prioritize tape readback tasks to improve data retrieval response speed. However, when the tape library system is under high dump load, all drive resources may be occupied by dump tasks. In this situation, because the tape library system does not support preemption of requests for unreleased tapes, the continuous dumping without actively releasing tapes will cause readback task requests to be continuously blocked from accessing the required tape resources.

[0062] This application sets up a drive task management module in the data storage subsystem of the tape library system. This module can schedule drive tasks when high-priority read / write tasks occur or after the drive completes its task. This proactively adjusts the way the drive processes tasks, thereby improving the drive's response speed to high-priority tape requests and reducing the response waiting time for high-priority tape requests.

[0063] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0064] It should be noted that the execution entity in this embodiment can be a driver task management module, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or a driver task management device of a tape library system capable of the above functions. This embodiment does not specifically limit it. The following uses a driver task management module as an example to describe this embodiment and the following embodiments.

[0065] Based on this, the present application provides a driver task management method for a tape library system. Referring to Figure 1, Figure 1 is a flowchart of the first embodiment of the driver task management method for the tape library system of the present application.

[0066] In this embodiment, the drive task management method of the tape library system includes steps S10 to S30:

[0067] Step S10: After triggering the driver task update, determine the tape tasks to be executed in the task queue;

[0068] In this embodiment, the tape library system can be deployed on a server. This server can be a cloud server or a terminal device such as a computer. The tape library system can access the tape library's drives and robotic arms to access and move the disks within the tape library. The tape library includes drive slots, storage slots, and import / export slots. Drive slots are where the drives are located, storage slots are used to store tapes, and import / export slots are used to retrieve tapes from or add tapes to the tape library.

[0069] Furthermore, the tape library system includes a resource management subsystem and a data storage subsystem. The resource management subsystem is responsible for managing and scheduling tape library resources. It can schedule tape tasks based on the priority of client tape requests and mount the target tapes corresponding to the tape requests. The data storage subsystem can access target tapes based on their mount paths and determine the tape tasks to be executed based on the tape requests. Specifically, based on the number of drives and the number of files to be processed in a tape request, the data storage subsystem can determine one or more tape tasks to be executed based on a single tape request.

[0070] It should be noted that during the tape library system's execution of tape tasks via drives, because the data storage subsystem is unaware of drive availability, under high dump load conditions, the data storage subsystem cannot access the drives occupied by dump tasks. This causes tape tasks other than dump tasks—i.e., non-write tape tasks—to remain blocked for extended periods. For example, since tape read-back tasks need to return read data to the client, while dump tasks can be processed asynchronously in the background by the tape library system, the tape library system needs to prioritize read-back tasks. However, due to the inability to release drives, high-priority read-back tasks experience prolonged waiting times.

[0071] Specifically, as shown in Figure 2, which is a schematic diagram of the tape library system architecture involved in this application embodiment, the data storage subsystem includes a driver task management module and a driver task module. The driver task management module is responsible for scheduling driver tasks. Specifically, for each driver configured in the data storage subsystem, a driver task is started. For each driver task, a command queue is constructed for the driver, which is used by the driver management module to send commands to that driver. For the driver task management module, a message queue is constructed for the driver tasks to send messages to the driver task management module.

[0072] In one embodiment, the data storage subsystem is further configured with a tape library management agent module, which is responsible for making remote procedure calls to the resource management subsystem. The main remote procedure calls used by the data storage subsystem to the resource management subsystem are to allocate tapes, release tapes, and load tapes.

[0073] In one alternative implementation of triggering a driver task update, step S10 may include steps S11 to S14:

[0074] Step S11: Scan the driver message queue and obtain the driver messages in the message queue based on the scan results;

[0075] Step S12: Determine the message source driver of the driver message;

[0076] Step S13: In the driver status table, reset the driver task status of the message source driver to idle;

[0077] Step S14: When the queue of tasks to be executed is not empty, determine whether to trigger the driver task update.

[0078] In this embodiment, the driver task management module periodically checks the driver message queue for driver messages sent from the driver, based on a preset time in the system. Each driver message contains the message type, the name of the source driver, and the status of the source driver. If a driver message exists, the driver task management module marks the source driver as idle, records the current tape information of the source driver, and modifies the tape information in the driver status to empty. If the driver preemption flag is true, the driver preemption flag is reset to false.

[0079] For example, when the driver message type is a driver task completion message, if the source driver status is readback, it indicates that the driver has finished reading back. The system checks if the file list in the tape readback task is empty based on the recorded current tape of the source driver. If it is empty, the tape readback task is deleted; otherwise, a readback command is sent to the driver again. If the tape library where the source driver resides has a tape readback task that needs to be scheduled, the tape library management submodule is requested to load the readback tape to the source driver. After the driver completes tape loading, a readback command is sent to the driver command queue, the driver task is recorded as reading back in progress, processing is complete, and the tape readback task is marked as scheduled. Otherwise, the system further checks if the dump file list is empty. If it is not empty, an available writable tape is requested, and then the available writable tape is requested to be scheduled to the driver. The driver task is recorded as dumping in progress, and then a dump command is sent to the driver.

[0080] Specifically, when there are non-write tape tasks in the task queue, the driver task management module matches the non-write tape tasks with the processing tapes of the message source driver, and selects a tape task to be executed from the non-write tape tasks based on the matching result and / or the priority of the non-write tape tasks. Alternatively, when there are no non-write tape tasks in the task queue, the driver task management module also selects a tape task to be executed from the tape tasks based on the matching result of tape tasks and processing tapes in the task queue, and / or the priority of the tape tasks.

[0081] For example, if there are non-dump tasks to be scheduled, the first matching non-write tape task is selected, the task tape is loaded into the drive, the specific task execution command is sent to the message source drive, and the drive status table is updated. During the matching process between the non-write tape task and the processing tape of the message source drive, the drive task management module first attempts to match the non-write tape task corresponding to the tape last used by the drive, i.e., the processing tape, to minimize tape movement in the tape library. Furthermore, the task tape added to the drive cannot be a tape currently in a dump state.

[0082] Otherwise, the drive task management module attempts to schedule the drive task as a dump task. First, it checks if there are any writable tapes that haven't been scheduled; otherwise, it allocates a new tape. Once a writable tape is acquired, it is loaded into the drive, the drive is notified to perform a dump, and the drive task status table is updated.

[0083] In one embodiment, the driver message type may also be a driver failure message or a driver dirty message. When the driver message type is a driver failure message, the driver failure status is recorded as true in the driver status table, and no further tasks will be scheduled to that failed driver. When the driver message type is a driver dirty message, a clean tape is requested to be loaded onto the driver through the tape library management agent module. After the clean tape is loaded, the driver status is recorded as "cleaning in progress," and a clean command is sent to the message source driver.

[0084] In another feasible implementation, step S10 may include steps S15 to S17:

[0085] Step S15: Obtain the priority of the tape tasks in the task queue to be executed, and determine the priority task to be executed among the tape tasks according to the priority;

[0086] Step S16: Select the priority execution task as the tape task to be executed;

[0087] Step S17: Based on the tape task to be executed, trigger the drive task update.

[0088] In this embodiment, the tape library system sets different task priorities based on different types of tape tasks to be executed. For example, since the execution of tape readback tasks usually occurs while the user is waiting, to avoid excessively long waiting times, the task priority for tape readback tasks can be set to the highest. Tape dump tasks, tape garbage collection tasks, and tape initialization tasks, on the other hand, will have lower priorities. These priorities will be adjusted over time by the tape library system based on task waiting times or other factors. When the drive task management system determines that there is a tape task in the queue with a priority higher than the priority threshold, it will treat that tape task as a priority task, preempt drive resources for that priority task, and trigger the drive task management system to update the drive tasks.

[0089] In one embodiment, when the drive task management system receives multiple tape tasks to be executed concurrently, it can sort the execution order of the tape tasks based on their priority.

[0090] In one embodiment, before performing driver task updates, the driver task management module also updates the number of non-write tasks based on the non-write tape tasks. By obtaining a preset maximum number of non-write tasks and the number of available drives, the minimum of the maximum number of non-write tasks and the number of available drives can be used as a non-write task number threshold. When the number of non-write tasks is greater than or equal to the non-write task number threshold, the driver task update for non-write tape tasks is terminated. Here, non-write tape tasks refer to tape tasks other than dump tasks, and the number of non-write tasks is the number of tape tasks other than dump tasks.

[0091] In one embodiment, when the priority task to be executed is a non-write tape task, the driver task management module can sort the non-write tape tasks based on their priority and submission time. The higher the priority and the earlier the submission time of a non-write tape task, the higher it is ranked. The driver task management module scans the non-write tape tasks sequentially according to the ranking results. Non-write tape tasks ranked before a certain threshold are set to be scheduled, while those ranked after the threshold are set to not be scheduled.

[0092] It should be noted that, to prevent the dump task from being in a continuous waiting state due to preemption by high-priority tasks such as tape readback tasks, the drive task management module has a maximum number of readback tasks. Specifically, the drive task management module counts the number of non-write tasks to be scheduled. When the number of readback tasks to be scheduled is greater than or equal to the maximum number of non-write tasks or the number of available drives, the drive preemption operation is stopped to prevent the dump task from stalling. During drive task scheduling, the drive task management module increments the current accumulated number of non-write tasks by one each time a non-write tape task to be scheduled is identified. The non-write task count represents the number of non-write tape tasks that require drive preemption, and the non-write task count represents the tape tasks that require drive preemption.

[0093] In one embodiment, when no drive status table has a drive task status of "idle," the drive task management module selects a target drive from the drives whose task status is "dump task" and sends a task interrupt command to the target drive. This target drive is one that can be preempted for non-write tape tasks. The drive task management module can update the target drive's task status to "preemptible" in the drive status table.

[0094] Specifically, the drive task management module adds the non-write tape task to be scheduled to a temporary processing queue and matches the non-write tape task with the drive task status of the scheduled drives. Based on the matching result, it determines the target drive among the scheduled drives. By sending a task interrupt command to the target drive, the drive task module interrupts the tape task currently being executed on the target drive based on the interrupt command. At the same time, the drive task management module sets the target drive to be preemptible in the drive status table, triggers the update of the target drive's drive task, and removes the non-write tape task from the temporary processing queue. Based on the updated tape task, after the target tape is loaded into the target drive, the drive task module controls the drive to execute the tape task on the target tape.

[0095] In one example, the driver task management module adds all scheduled non-write tasks to a temporary processing queue. If a scheduled non-write task's tape is already occupied by a dump task, and data is being read from a tape currently being written, the dump task is interrupted, and the non-write task is removed from the temporary processing queue. For non-write tape tasks that are not yet scheduled but are already scheduled, specifically, the corresponding driver for the task is found in the driver task status table, and an interrupt command is sent to that driver. For each scheduled but not yet scheduled non-write task preempted, if the non-write task temporary queue is not empty, the non-write tape task is removed from the temporary processing queue. If the non-write task temporary processing queue is still not empty, it checks if any driver is in an idle state and sends a notification that it is idle to that idle driver, allowing it to send an idle message back to the scheduling module for subsequent scheduling. Each time a notification that it is idle is sent, an element is removed from the temporary processing queue. If the non-write task temporary processing queue is still not empty, it further checks if any driver in a dump task state is not currently interrupted, i.e., in a preemptible state. If it exists, the dump task is interrupted and the element is removed from the temporary processing queue.

[0096] In another example, the driver task management module first checks if there is a tape in a dump task for the tape readback task. If so, it sends an interrupt command to the driver corresponding to that tape, adjusts the driver's state to preemptible, and marks the tape readback task as needing scheduling. Further, the driver task management module checks if there are any drives in an idle or clean state. If a drive in an idle or clean state exists, and the tape bank containing that drive has a tape readback task marked as needing scheduling (false), then the tape readback task is marked as needing scheduling (true). Additionally, the driver task management module notifies itself to send an idle command to any idle drives. Further still, the driver task management module checks drives in a dump state. For each dump drive found, where the dump drive's preemptible flag is false, and the tape bank containing that drive has a tape readback task marked as needing scheduling (false), the tape readback task is marked as needing scheduling (true), and a task interrupt command is sent to the driver.

[0097] In one embodiment, if the file dump list is not empty and a drive is in an idle state, the recently checked no-dump load is set to zero, and an idle command is sent to the drive. If the file dump list is empty and the recently checked no-dump load is zero, the recently checked no-dump load is set to the current time. Otherwise, the most recent current time is subtracted from the recently checked no-dump load to determine how long there has been no dump load. When a configured threshold is reached, indicating that the data storage system has reached a certain period of no dump load, a task interrupt command is sent to all drives currently in a dump state to reduce the power consumption of idle drives.

[0098] Step S20: Obtain the driver status table, and select the execution driver for the tape task to be executed based on the driver status table and the driver task update;

[0099] In this embodiment, the drive task management module includes a drive status table that records the drive task status, tape information, and fault information of the drives. The drive task management module can match the drive task status in the drive status table with drive task update actions or pending tape tasks, and select the drive to execute based on the matching result.

[0100] Specifically, driver task updates include read-back task updates, which is the driver preemption process of updating the currently executing task of the driver to a tape read-back task. It also includes idle driver updates, which is the process of allocating tasks to idle drivers after determining in the driver message queue that the driver has completed its task execution and its status has been updated to idle.

[0101] As an optional implementation, when a driver task is updated to a read-back task update, the driver task management module can select the driver to execute from among the drivers whose driver task status is pending preemption and / or idle.

[0102] As another optional implementation, when the driver task update is an idle driver update, the driver task management module can select the driver whose driver task status is idle as the execution driver.

[0103] Step S30: Add the execution command of the tape task to be executed to the command queue corresponding to the execution driver.

[0104] In this embodiment, the driver task management module controls the driver and schedules tasks through a command queue. Specifically, the driver task management module can terminate the currently executing task of the driver using a task termination command.

[0105] As an optional implementation, when the tape task to be executed is a file dumping task, the drive task management module triggers a dump operation based on the file to be dumped received from the server and adds the file to the dump file list. Specifically, if the drive task management module checks that the dump file list is not empty, it sends an idle notification command to the drive task. Upon receiving the idle notification command, the drive task sends a task completion message to the message queue. After receiving the drive task completion message, the drive task management module schedules the tape to the drive and sends a dump command to the drive. Upon receiving the dump command, the drive task switches to the drive dump task, retrieves the file information to be dumped from the dump file list, dumps it to the tape, and records the file dump information.

[0106] Specifically, upon receiving a dump command, the driver task module switches to a dump task, retrieves the drive tape information, loads the tape onto the drive, and enables the drive to perform read and write operations on the tape. It then checks if the tape is in an initialized state; if so, it formats the tape and switches it to a writable state. The driver task module periodically receives messages from the message queue. If it receives messages indicating task interruption, disk space falling below a set threshold, drive failure, drive dirtiness, or tape failure, it marks the tape as unwritable and exits the loop. Based on the reason for the loop exit, it sends a message to the message queue and switches the drive back to an idle state.

[0107] As an alternative implementation, when the tape task to be executed is a file read-back task, the driver first checks the system cache data to see if the file to be read exists. If it does not exist, the driver retrieves the tape containing the dump based on the dump information of the file to be read and inserts that tape into the read-back task. At this time, the scheduling requirement for this tape read task is marked as false. The tape library system inserts the tape file information to be read back as a file entry to be read back into the read-back file list of this tape read-back task, waiting for the read-back file to be processed.

[0108] Specifically, when there is no workload in the data storage submodule, the driver task management module detects a tape readback task that needs scheduling marked as false and an idle drive. It then sets the tape readback task scheduling requirement to true and sends an idle command to the drive. Upon receiving this idle command, the drive task sends a task completion message to the driver task management module. Conversely, when there is a dump load in the data storage submodule, the driver task management module detects a tape readback task that needs scheduling marked as false and a drive currently dumping. It sets the tape readback task scheduling requirement to true and sends a task interrupt command to the dump drive. Upon receiving the interrupt command, the dump drive task exits the dump task and sends a task completion message to the driver task management module.

[0109] Furthermore, upon receiving a task completion message and recognizing a read task marked as "true" that needs to be scheduled, the driver task management module requests the tape library resource management subsystem to load the tape onto the driver, marks the tape read task as scheduled, sets the tape information in the driver status table to the read-back tape, and sets the driver status to read-back. A read-back command is then sent to the driver. Upon receiving the read-back command, the driver task retrieves the tape information from the driver status table, locates the tape read task, and processes the file entry within the tape read task, reading the file from the tape back to the cache and waking up the file read-back waiting process. Once the waiting process is activated, the read-back file entry is deleted, and the file content is read back from the cache.

[0110] In one embodiment, upon receiving a read-back command, the driver task module switches to a read-back task, acquires the driver tape information, and loads the tape onto the driver, enabling the driver to perform read and write operations on the tape. The driver task module receives messages from the message queue in a loop, similar to the dump mode, and sends the exit reason to the driver message queue upon exiting the loop.

[0111] This application embodiment sets up a drive task management module in the data storage subsystem of the tape library system. This module can schedule drive tasks when high-priority read / write tasks occur or after the drive completes its task. This proactively adjusts the way the drive processes tasks, thereby improving the drive's response speed to high-priority tape requests and reducing the response waiting time for high-priority tape requests.

[0112] Based on the same inventive concept, this application also provides a second embodiment. Referring to FIG3, FIG3 is a flowchart illustrating the second embodiment of the drive task management method of the tape library system of this application.

[0113] In this embodiment, the drive task management of the tape library system includes steps S21 to S24:

[0114] Step S21: Obtain the driver status table and determine the driver task status of the driver in the driver status table;

[0115] Step S22: When the driver task is updated to read-back task update, select the execution driver from the drivers whose driver task status is pending preemption and / or idle;

[0116] Step S23: Alternatively, when the driver task is updated to an idle driver update, the driver whose driver task status is idle is selected as the execution driver;

[0117] Step S24: Based on the tape task to be executed, update the driver task status of the execution driver in the driver status table.

[0118] In this embodiment, the drive task management module can determine the drive task status corresponding to all loaded drives in the tape library system based on the drive status table. Based on the drive task status, drives can be updated for read-back tasks or idle drives, allowing for more rational drive allocation.

[0119] Furthermore, after the allocation of the execution drive is completed and the driver task update is finished, the driver task management module will update the driver task status of the execution drive in the driver status table to be consistent with the driver task status of the tape task to be executed.

[0120] Since the system described in Embodiment 2 of this application is a system used to implement the method of Embodiment 1 of this application, those skilled in the art can understand the specific structure and variations of the system based on the method described in Embodiment 1 of this application, and therefore will not be described again here. All systems used in the method of Embodiment 1 of this application fall within the scope of protection of this application.

[0121] Based on the same inventive concept, this application also provides a third embodiment. Referring to FIG4, FIG4 is a flowchart illustrating the third embodiment of the drive task management method of the tape library system of this application.

[0122] In this embodiment, the drive task management of the tape library system includes steps S01 to S03:

[0123] Step S01: Obtain driver information and initialize the driver status table and driver message queue in the driver task management module;

[0124] Step S02: Based on the driver information, generate a command queue for each driver and start a driver task for the driver;

[0125] Step S03: Associate the driver task with the driver task status in the driver task management module.

[0126] In this embodiment, the driver task management module needs to perform an initialization operation before scheduling driver tasks.

[0127] Specifically, the driver task module initializes a memory-based driver status table to represent the status of each driver. This table includes the driver's current task status, the current tape information on the driver, and whether the driver is faulty. During initialization, each driver task is in an idle state with empty tape information. If the parameters configured in the data storage subsystem specify a faulty state for the driver, the driver is marked as faulty in the driver status table; otherwise, it is marked as normal.

[0128] Furthermore, the driver task management module initializes an empty message queue, a command queue, and starts a driver task for each configured driver. The message queue is used for driver tasks to send messages to the driver task management module, and the command queue is used for the driver task management module to send commands to other driver task modules. After initialization, the driver task management module enters the runtime state.

[0129] Since the system described in Embodiment 3 of this application is a system used to implement the method of Embodiment 1 of this application, those skilled in the art can understand the specific structure and variations of the system based on the method described in Embodiment 1 of this application, and therefore will not be described again here. All systems used in the method of Embodiment 1 of this application fall within the scope of protection of this application.

[0130] Based on the same inventive concept, this application also provides a fourth embodiment. Referring to FIG5, FIG5 is a flowchart illustrating the fourth embodiment of the drive task management method of the tape library system of this application.

[0131] In this embodiment, the drive task management of the tape library system includes steps S41 to S44:

[0132] Step S41: In the driver task module of the execution driver, determine the target tape task currently being executed by the execution driver;

[0133] Step S42: Determine the tape information for the target tape task;

[0134] Step S43: In the queue of tasks to be executed, determine the tape task to be executed corresponding to the tape information;

[0135] Step S44: Add the execution command for the tape task to be executed to the command queue of the execution driver.

[0136] In this embodiment, to avoid wasting resources because subsequent tasks still need to schedule the tape after the driver completes tape file operations and unloads the tape, the driver task module can control the tape to complete all tasks before unloading it, based on the tape task to be executed.

[0137] For example, suppose an application sends out read requests for files a1 from tape A, b1 from tape B, and a2 from tape A within a certain time period. Assume the maximum number of read-back tasks is set to 1. Because the read-back task for tape A arrives first, the driver task management module schedules a drive to load tape A for processing. Due to drive resource limitations, the read-back task for tape B, although submitted, cannot be scheduled until tape A is completed. The driver read-back task processes files a1 and a2 on tape A sequentially. After processing, all file entries in the tape A read-back task are deleted, and the driver read-back task ends. The driver management module receives a message indicating the driver processing task is complete. Since the message source task status is read-back, it further checks that the read-back file list on the drive is empty and deletes the tape A read-back task. At this point, the number of read scheduled tasks is 0. Since the current number of read scheduled tasks is less than the maximum read-back task count of 1, and a read task exists for tape B, a subsequent tape B read task is scheduled. In this way, the driver's task scheduling can avoid the problem that tape A is unloaded after reading a1, but still needs to read a2 from tape A after reading b1 from tape B.

[0138] This application improves the efficiency of tape request processing by rationally allocating tape processing resources through the drive task management module, thereby avoiding resource waste.

[0139] Since the system described in Embodiment 4 of this application is a system used to implement the method of Embodiment 1 of this application, those skilled in the art can understand the specific structure and variations of the system based on the method described in Embodiment 1 of this application, and therefore will not be described again here. All systems used in the method of Embodiment 1 of this application fall within the scope of protection of this application.

[0140] This application provides a drive task management device for a tape library system. The device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the drive task management method for the tape library system described in Embodiment 1 above.

[0141] Referring now to Figure 6, a schematic diagram of a drive task management device suitable for implementing the tape library system of the embodiments of this application is shown. The drive task management device for the tape library system in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The drive task management device for the tape library system shown in Figure 6 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0142] As shown in Figure 6, the drive task management device of the tape library system may include a processing unit 1001 (e.g., a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the drive task management device of the tape library system. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the drive task management device of the tape library system to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a drive task management device for a tape library system with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented alternatively.

[0143] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0144] The tape library system drive task management device provided in this application, employing the tape library system drive task management method in the above embodiments, can solve the technical problem that continuous dumping without actively releasing the tape during high dump load conditions in the tape library system leads to excessively long response waiting times for readback task requests. Compared with the prior art, the beneficial effects of the tape library system drive task management device provided in this application are the same as those of the tape library system drive task management method provided in the above embodiments, and other technical features in this tape library system drive task management device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0145] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0146] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0147] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the drive task management method of the tape library system in the above embodiments.

[0148] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0149] The aforementioned computer-readable storage medium may be included in the drive task management device of the tape library system; or it may exist independently and not be mounted in the drive task management device of the tape library system.

[0150] The aforementioned computer-readable storage medium carries one or more programs. When the one or more programs are executed by the drive task management device of the tape library system, the drive task management device of the tape library system: after triggering a drive task update, determines the tape tasks to be executed in the task queue; obtains a drive status table, and selects the execution drive for the tape task to be executed according to the drive status table and the drive task update; and adds the execution command of the tape task to be executed to the command queue corresponding to the execution drive.

[0151] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0153] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0154] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the drive task management method of the tape library system described above. This solves the technical problem that continuous dumping without actively releasing the tape during a high dump load in the tape library system leads to excessively long response times for readback task requests. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the drive task management method of the tape library system provided in the above embodiments, and will not be repeated here.

[0155] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method of managing a drive task of a magnetic tape library system, wherein, The method, applied to a drive task management module deployed in the data storage subsystem of the tape library system, includes the following steps: After triggering a driver task update, identify the tape tasks to be executed in the task queue; Obtain the driver status table, and select the execution driver for the tape task to be executed based on the driver status table and the driver task update; The execution command for the tape task to be executed is added to the command queue corresponding to the execution driver.

2. The method of claim 1, wherein, Before the step of determining the tape tasks to be executed in the task queue after triggering the driver task update, the method further includes: Scan the driver message queue and retrieve the driver messages in the message queue based on the scan results; Determine the message source driver of the driver message; In the driver status table, the driver task status of the message source driver is reset to idle; If the queue of tasks to be executed is not empty, determine whether to trigger the driver task update.

3. The method of claim 2, wherein, After determining whether to trigger the driver task update when the queue of tasks to be executed is not empty, the method further includes: When there are non-write tape tasks in the queue of tasks to be executed, the non-write tape tasks are matched with the processing tape of the message source driver; Based on the matching results and / or the priority of the non-write tape tasks, select the tape task to be executed from the non-write tape tasks; Alternatively, if the non-write tape task is not present in the tasks to be executed, the task to be executed is selected from the tape tasks based on the matching result between the tape tasks in the task queue and the processed tape, and / or the priority of the tape task.

4. The method of claim 1, wherein, Before the step of determining the tape tasks to be executed in the task queue after triggering the driver task update, the method further includes: Obtain the priority of the tape tasks in the task queue to be executed, and determine the priority task to be executed among the tape tasks based on the priority; The priority task is designated as the tape task to be executed. Based on the tape task to be executed, the driver task update is triggered.

5. The method of claim 4, wherein, Before the step of triggering the drive task update based on the tape task to be executed, the method further includes: Get the preset maximum number of non-write tasks and the number of available drives; The minimum value between the maximum number of non-write tasks and the number of available drives is used as the threshold for the number of non-write tasks. When the priority task is a non-tape writing task, the non-tape writing tasks are sorted based on the non-tape writing task priority and the task submission time. Based on the sorting results, the non-write tape tasks are scanned sequentially. The non-write tape tasks that are ranked before the threshold number of non-write tasks are set to be scheduled, and the non-write tape tasks that are ranked after the threshold number of non-write tasks are set to not be scheduled.

6. The method of claim 5, wherein, The step of triggering the drive task update based on the tape task to be executed further includes: Add the non-write tape tasks to be scheduled to a temporary processing queue; The non-write tape task is matched with the drive task status of the scheduled drive, and the target drive is determined in the scheduled drive based on the matching result. Send a task interrupt command to the target drive so that the drive task module interrupts the tape task currently being executed by the target drive based on the interrupt command; The target drive is set to be preempted in the drive status table, and the driver task update of the target drive is triggered. The driver task module controls the drive to execute the tape task on the target tape after the target tape is loaded into the target drive, based on the updated tape task. Remove the non-write tape task from the temporary processing queue.

7. The method of claim 1, wherein, Before the step of determining the tape tasks to be executed in the task queue after the trigger driver task update, the method further includes: Obtain driver information and initialize the driver status table and driver message queue in the driver task management module; Based on the driver information, a command queue is generated for each driver, and a driver task is started for that driver; Associate the driver task with the driver task status in the driver task management module.

8. The method of claim 1, wherein, After the step of adding the execution command of the tape task to be executed to the command queue corresponding to the execution driver, the method further includes: In the driver task module of the execution driver, the target tape task currently being executed by the execution driver is determined; Determine the tape information for the target tape task; In the queue of tasks to be executed, determine the tape task to be executed corresponding to the tape information; The command to execute the tape task to be executed is added to the command queue of the execution driver.

9. A drive task management apparatus of a magnetic tape library system, wherein, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the drive task management method for the tape library system as described in any one of claims 1 to 8.

10. A storage medium, wherein, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the drive task management method of the tape library system as described in any one of claims 1 to 8.