Hard disk expansion method, device, equipment and readable storage medium based on multithreading

By reserving the thread position during the expansion of the hard disk and running a new disk in the running process, the problem of system overhead caused by multiple processes has been solved, and the efficiency of the hard disk expansion is improved.

CN117632511BActive Publication Date: 2025-01-28CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311722932.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-01-28
Estimated Expiration
2043-12-13

AI Technical Summary

Technical Problem

When managing hard disk capacity expansion technology, multi-process programs need to allocate independent memory space and system resources to each process, resulting in large system overhead.

Method used

By reserving the maximum number of thread positions that the corresponding server can support before establishing the process, in response to the additional request of the new disk, the unused threads run the new disk based on the unused thread position in the running process to avoid the addition of the additional process.

Benefits of technology

Effectively avoid the increase in system overhead caused by establishing a new process during the expansion of the hard disk, which improves the efficiency of hard disk expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632511B_ABST
    Figure CN117632511B_ABST
Patent Text Reader

Abstract

A method, device, equipment and readable storage medium for hard disk expansion based on multithreading, the method for hard disk expansion based on multithreading comprising: obtaining the maximum number of threads supported by one or more servers; establishing a process corresponding to the server and reserving thread positions with the maximum number of threads; responding to a request to add a new disk, running the threads of the new disk based on the unused thread positions in the running process. By reserving the thread positions corresponding to the maximum number of threads that the server can support before establishing the process, when a new disk is subsequently added, the threads in the new disk can be run with the thread positions in the currently running process, thereby avoiding the establishment of additional processes, and effectively avoiding the problem of further increase in system overhead caused by establishing new processes when the hard disk is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer hard disk expansion, and in particular to a hard disk expansion method, device, equipment and readable storage medium based on multithreading. Background Art

[0002] At present, when the hard disk capacity is expanded in the computer, that is, when a new hard disk is added, one hard disk is often used to correspond to one process. In this way, each time a hard disk is added, a process will be started.

[0003] However, when managing the hard disk, multi-process programs need to allocate independent memory space and system resources for each process, and multi-process programs need to switch process contexts, which involves communication and synchronization between processes and results in high system overhead. Therefore, the method of implementing hard disk expansion for the solution of adding new processes still needs to be further improved. Summary of the invention

[0004] The present application provides a multi-threaded hard disk expansion method, device, equipment and readable storage medium, which can solve the technical problems existing in the above-mentioned prior art.

[0005] In a first aspect, an embodiment of the present application provides a hard disk capacity expansion method based on multithreading, which adopts the following technical solution:

[0006] A hard disk capacity expansion method based on multithreading, the hard disk capacity expansion method based on multithreading comprising:

[0007] Get the maximum number of threads supported by one or more servers;

[0008] Establishing a process corresponding to the server and reserving thread positions with the maximum number of threads;

[0009] In response to a request for adding a new disk, a thread of the new disk is run based on a thread position that is not used in an already running process.

[0010] In combination with the first aspect, in one implementation, responding to the request to add a new disk and running the thread of the new disk based on an unused thread position in an already running process includes the following steps:

[0011] Respond to the request to join the new disk and obtain the number of threads of the new disk;

[0012] The process to which the new disk thread belongs is determined according to the number of threads of the new disk and the unused thread positions in each process.

[0013] In combination with the first aspect, in one implementation, determining the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process includes:

[0014] It is determined that a process that satisfies the running of the new disk thread and has a small number of unused thread positions is the process to which the new disk thread belongs.

[0015] In combination with the first aspect, in one implementation, determining the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process includes:

[0016] If the number of unused thread positions in each process that satisfies the operation of the disk thread is the same, according to the affinity between the new disk and one or more servers, the process corresponding to the server with the strongest affinity to the new disk is determined as the process to which the new disk thread belongs.

[0017] In combination with the first aspect, in one implementation, after determining the process to which the new disk thread belongs according to the number of threads of the new disk and the unused thread positions in each process, the following steps are included:

[0018] Update the new disk to the pool map.

[0019] In combination with the first aspect, in one implementation, in response to the request to add the new disk, in the thread of running the new disk based on the thread position that is not used in the running process,

[0020] Threads belonging to the same new disk are run by the thread location of the same process.

[0021] In combination with the first aspect, in one implementation, in the step of obtaining the maximum number of threads supported by each of the one or more servers,

[0022] Obtaining the hard disk types supported by each hard disk interface on the server, and obtaining the maximum number of threads supported by each hard disk interface;

[0023] According to the maximum number of threads supported by each of the hard disk interfaces, the maximum number of threads supported by each of the one or more servers is obtained.

[0024] In a second aspect, the embodiment of the present application provides a hard disk expansion device based on multithreading, which adopts the following technical solution:

[0025] A hard disk capacity expansion device based on multithreading, the hard disk capacity expansion device based on multithreading comprising:

[0026] An acquisition module, configured to acquire a maximum number of threads supported by each of one or more servers;

[0027] A process establishment module, configured to establish a process corresponding to the server and having thread positions reserved with the maximum number of threads;

[0028] The expansion module is configured to respond to a request for adding a new disk and run the thread of the new disk based on the thread position that is not used in the running process.

[0029] In a third aspect, the embodiment of the present application provides a hard disk expansion device based on multithreading, which adopts the following technical solution:

[0030] A multi-threaded hard disk capacity expansion device, the multi-threaded hard disk capacity expansion device comprising a processor, a memory, and a multi-threaded hard disk capacity expansion program stored in the memory and executable by the processor, wherein when the multi-threaded hard disk capacity expansion program is executed by the processor, the steps of the multi-threaded hard disk capacity expansion method described above are implemented.

[0031] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which adopts the following technical solution:

[0032] A readable storage medium stores a multi-threaded hard disk capacity expansion program, wherein when the multi-threaded hard disk capacity expansion program is executed by a processor, the steps of the multi-threaded hard disk capacity expansion method described above are implemented.

[0033] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0034] By reserving thread positions for the maximum number of threads that the corresponding server can support before establishing a process, when a new disk is added later, the threads in the new disk can be run using the thread positions in the currently running process, thereby avoiding the establishment of additional processes and effectively avoiding the problem of further increase in system overhead caused by establishing new processes when the hard disk is expanded. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a flowchart of an embodiment of a hard disk capacity expansion method based on multithreading of the present application;

[0036] Figure 2 This is a functional module diagram of an embodiment of a hard disk expansion device based on multithreading of the present application;

[0037] Figure 3 This is a schematic diagram of the hardware structure of a multi-threaded hard disk expansion device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] First, some technical terms in the present application are explained to facilitate those skilled in the art to understand the present application.

[0040] Currently, when a hard disk is expanded in a computer, that is, a new hard disk is added, a process is often added to read and write the added new disk.

[0041] However, when managing the hard disk, multi-process programs need to allocate independent memory space and system resources for each process, and multi-process programs need to switch process contexts, which involves communication and synchronization between processes and results in high system overhead. Therefore, the method of implementing hard disk expansion for the solution of adding new processes still needs to be further improved.

[0042] Based on the above problems, the embodiments of the present application provide a hard disk expansion method, device, equipment and readable storage medium based on multi-threading. The key point of the invention is that by reserving the thread positions of the maximum number of threads that the corresponding server can support before establishing the process, when a new disk is added subsequently, the threads in the new disk can be run with the thread positions in the currently running process, thereby avoiding the establishment of additional processes and effectively avoiding the problem of further increase in system overhead due to the establishment of new processes when the hard disk is expanded.

[0043] In a first aspect, an embodiment of the present application provides a hard disk capacity expansion method based on multi-threading.

[0044] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the multi-threaded hard disk expansion method of this application. Figure 1 As shown, the hard disk capacity expansion method based on multi-threading includes:

[0045] S100, obtaining the maximum number of threads supported by each of one or more servers;

[0046] Specifically, the step S100, obtaining the maximum number of threads supported by one or more servers, includes the following steps:

[0047] S110, obtaining the hard disk type supported by each hard disk interface on the server, and obtaining the maximum number of threads supported by each hard disk interface;

[0048] S120. Obtain the maximum number of threads supported by each of the one or more servers according to the maximum number of threads supported by each of the hard disk interfaces.

[0049] With this setting, by identifying the types of one or more servers, the hard disk interfaces on them, that is, the maximum number of hard disks, and the types of hard disks that can be connected to each hard disk interface on them can be known. After the types of hard disks that can be connected are clearly identified, the maximum number of threads that can run on the server can be calculated.

[0050] S200, establishing a process corresponding to the server and reserving thread positions with the maximum number of threads;

[0051] Among them, since different types of threads are started in sequence when the engine is started and saved in an array, the specific sequence can be used to know what type of threads the members in the current array are. In order to enable the subsequent expansion of the hard disk to run, it is necessary to reserve the positions of threads that may be added later when the process is established and started.

[0052] Specifically, after the maximum number of threads in the server process is determined in step S100, a configuration file will be written during the process establishment process, and the configuration file will reserve a corresponding number of thread positions in the process according to the maximum number of threads.

[0053] S300 , responding to a request to add a new disk, and running a thread of the new disk based on an unused thread position in an already running process.

[0054] Specifically, after obtaining a request to join a new disk, it will be allocated to the thread position of the already running process according to the number of threads required by the new disk, so that it can be run based on the existing process later.

[0055] In this embodiment, by reserving thread positions for the maximum number of threads that the corresponding server can support before establishing a process, it is possible to run the threads in the new disk using the thread positions in the currently running process when a new disk is subsequently added, thereby avoiding the need to establish additional processes and effectively avoiding the problem of further increase in system overhead due to the establishment of new processes when the hard disk is expanded.

[0056] Further, in one embodiment, the step S300, responding to the joining request of the new disk and running the thread of the new disk based on the unused thread position in the running process, includes the following steps:

[0057] S310, responding to the joining request of the new disk, and obtaining the number of threads of the new disk;

[0058] S320: Determine the process to which the new disk thread belongs according to the number of threads of the new disk and the unused thread positions in each process.

[0059] For example, in the case of two CPUs, two processes will be established for the two CPUs. At this time, both processes may have unused thread positions that allow the new disk thread to run. At this time, the process to which the new disk thread belongs will be selected based on which process has fewer unused thread positions. In addition, in other embodiments, the selection of the belonging process can also be carried out based on other conditions, such as which process has more unused thread positions, or which process corresponds to a CPU with a stronger affinity for the new disk. After determining the belonging process, the process can read and write to the hard disk that can read and write, and run its internal threads.

[0060] Further, in one embodiment, preferably, in the step S320, according to the number of threads of the new disk and the unused thread positions in each process, determining the process to which the thread running the new disk belongs includes:

[0061] A process that satisfies the running of the disk thread and has a small number of unused thread positions is determined as the process to which the new disk thread belongs.

[0062] Further, in one embodiment, preferably, the step S320, determining the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process, includes:

[0063] If the number of unused thread positions in each process that satisfies the operation of the disk thread is the same, according to the affinity between the new disk and one or more servers, the process corresponding to the server with the strongest affinity to the new disk is determined as the process to which the new disk thread belongs.

[0064] With this configuration, when it is impossible to determine which process among multiple processes is the process to which the new disk thread belongs based on the number of unused thread positions, the affinity between the CPU and the new disk can be further used to determine it, thereby ensuring that subsequent new disks can read, write, and run programs more smoothly.

[0065] Further, in one embodiment, after the step S320, according to the number of threads of the new disk and the unused thread positions in each process, determines the process to which the thread of the new disk belongs, the following steps are included:

[0066] Update the new disk to the pool map.

[0067] Specifically, after responding to the request to join a new disk, the new disk will be initialized, and then the corresponding number of threads will be allocated to the new disk so that the new disk can run in the cluster. Then, when the new disk is added to the hard disk pool, a state machine is maintained to first set an expansion state for the thread of the new disk. The thread in this state cannot be accessed, and then the thread of the new disk is updated to the pool map. The expansion state of the new disk is not cancelled until the node pool map of the new disk is successfully updated. At this time, the new disk can be used by the cluster. This is because if the pool map is not updated successfully before it is used, it will cause request errors or assertions related to the pool service.

[0068] Further, in one embodiment, in step S300, in response to the request to add the new disk, the thread of the new disk is run based on the thread position that is not used in the running process,

[0069] Threads belonging to the same new disk are run by the thread location of the same process.

[0070] This setting ensures that the threads on the newly added hard disk can be run in the same process, thereby achieving smooth operation of the new disk thread.

[0071] In a second aspect, an embodiment of the present application also provides a hard disk capacity expansion device based on multi-threading.

[0072] In one embodiment, referring to Figure 2 , Figure 2 This is a functional module diagram of an embodiment of a hard disk expansion device based on multithreading of the present application. Figure 2 As shown, the hard disk capacity expansion device based on multi-threading includes:

[0073] An acquisition module, configured to acquire a maximum number of threads supported by each of one or more servers;

[0074] A process establishment module, configured to establish a process corresponding to the server and having thread positions reserved with the maximum number of threads;

[0075] The expansion module is configured to respond to a request for adding a new disk and run the thread of the new disk based on the thread position that is not used in the running process.

[0076] Further, in one embodiment, when the expansion module in the hard disk expansion device based on multithreading responds to a request to add a new disk and runs the thread of the new disk based on the thread position that is not used in the running process, the expansion module includes the following steps:

[0077] Respond to the request to join the new disk and obtain the number of threads of the new disk;

[0078] The process to which the new disk thread belongs is determined according to the number of threads of the new disk and the unused thread positions in each process.

[0079] Furthermore, in one embodiment, when the capacity expansion module in the hard disk capacity expansion device based on multithreading determines the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process, the expansion module comprises the following steps:

[0080] A process that satisfies the running of the disk thread and has a small number of unused thread positions is determined as the process to which the new disk thread belongs.

[0081] Furthermore, in one embodiment, when the expansion module in the multi-threaded hard disk expansion device determines the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process, the expansion module includes:

[0082] If the number of unused thread positions in each process that satisfies the operation of the disk thread is the same, according to the affinity between the new disk and one or more servers, the process corresponding to the server with the strongest affinity to the new disk is determined as the process to which the new disk thread belongs.

[0083] Furthermore, in one embodiment, the expansion module in the multi-threaded hard disk expansion device includes the following steps before determining the process to which the new disk thread belongs based on the number of threads of the new disk and the unused thread positions in each process:

[0084] Update the new disk to the pool map.

[0085] Furthermore, in one embodiment, when the acquisition module in the multi-threaded hard disk expansion device acquires the maximum number of threads supported by each of one or more servers, the acquisition module comprises the following steps:

[0086] Among them, the functional implementation of each module in the above-mentioned multi-threaded hard disk expansion device corresponds to the steps in the above-mentioned multi-threaded hard disk expansion method embodiment, and its functions and implementation processes are no longer repeated here.

[0087] In a third aspect, an embodiment of the present application provides a hard disk capacity expansion device based on multi-threading. The hard disk capacity expansion device based on multi-threading can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0088] Reference Figure 3 , Figure 3The hardware structure diagram of the multi-threaded hard disk expansion device involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the multi-threaded hard disk expansion device may include a processor, a memory, a communication interface, and a communication bus.

[0089] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0090] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the multi-threaded hard disk expansion device, and the interface used to realize the interconnection between the multi-threaded hard disk expansion device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display (Display), a keyboard (Keyboard), etc.

[0091] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0092] The processor may be a general-purpose processor, which may call a multi-threaded hard disk expansion program stored in a memory and execute the multi-threaded hard disk expansion method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the multi-threaded hard disk expansion program is called includes the following steps:

[0093] Get the maximum number of threads supported by one or more servers;

[0094] Establishing a process corresponding to the server and reserving thread positions with the maximum number of threads;

[0095] In response to a request for adding a new disk, a thread of the new disk is run based on a thread position that is not used in an already running process.

[0096] Further, in some embodiments, in response to a request to add a new disk, running the thread of the new disk based on an unused thread position in an already running process includes the following steps:

[0097] Respond to the request to join the new disk and obtain the number of threads of the new disk;

[0098] The process to which the new disk thread belongs is determined according to the number of threads of the new disk and the unused thread positions in each process.

[0099] Further, in some embodiments, determining the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process includes:

[0100] A process that satisfies the running of the disk thread and has a small number of unused thread positions is determined as the process to which the new disk thread belongs.

[0101] Further, in some embodiments, determining the process to which the thread running the new disk belongs according to the number of threads of the new disk and the unused thread positions in each process includes:

[0102] If the number of unused thread positions in each process that satisfies the operation of the disk thread is the same, according to the affinity between the new disk and one or more servers, the process corresponding to the server with the strongest affinity to the new disk is determined as the process to which the new disk thread belongs.

[0103] Further, in some embodiments, before determining the process to which the new disk thread belongs based on the number of threads of the new disk and the unused thread positions in each process, the following steps are included:

[0104] Update the new disk to the pool map.

[0105] Further, in some embodiments, in response to a request to add a new disk, in a thread of running the new disk based on the unused thread position in the running process,

[0106] Threads belonging to the same new disk are run by the thread location of the same process.

[0107] Further, in some embodiments, obtaining the maximum number of threads supported by each of the one or more servers includes the following steps:

[0108] Obtaining the hard disk types supported by each hard disk interface on the server, and obtaining the maximum number of threads supported by each hard disk interface;

[0109] According to the maximum number of threads supported by each of the hard disk interfaces, the maximum number of threads supported by each of the one or more servers is obtained.

[0110] Those skilled in the art will understand that Figure 3 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0111] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.

[0112] The readable storage medium of the present application stores a multi-threaded hard disk capacity expansion program, wherein when the multi-threaded hard disk capacity expansion program is executed by a processor, the steps of the multi-threaded hard disk capacity expansion method described above are implemented.

[0113] Among them, the method implemented when the multi-threaded hard disk capacity expansion program is executed can refer to the various embodiments of the multi-threaded hard disk capacity expansion method of the present application, and will not be repeated here.

[0114] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0115] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0116] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0117] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0118] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0120] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A hard disk expansion method based on multithreading, characterized in that: The multi-threaded hard disk expansion method includes: Get the maximum number of threads supported by one or more servers; Establishing a process corresponding to the server and reserving thread positions with the maximum number of threads; In response to a request to add a new disk, running a thread of the new disk based on an unused thread position in an already running process; The step of responding to the request for adding a new disk and running the thread of the new disk based on the unused thread position in the running process includes the following steps: Respond to the request to join the new disk and obtain the number of threads of the new disk; Determine the process to which the thread of the new disk belongs according to the number of threads of the new disk and the positions of the threads that are not used in each process; The step of obtaining the maximum number of threads supported by each of the one or more servers comprises the following steps: Obtaining the hard disk types supported by each hard disk interface on the server, and obtaining the maximum number of threads supported by each hard disk interface; According to the maximum number of threads supported by each of the hard disk interfaces, the maximum number of threads supported by each of the one or more servers is obtained.

2. The multi-threaded hard disk expansion method according to claim 1, characterized in that: The determining, according to the number of threads of the new disk and the unused thread positions in each process, the process to which the thread running the new disk belongs includes: It is determined that a process that satisfies the running of the new disk thread and has a small number of unused thread positions is the process to which the new disk thread belongs.

3. The multi-threaded hard disk expansion method according to claim 2, characterized in that: The determining, according to the number of threads of the new disk and the unused thread positions in each process, the process to which the thread running the new disk belongs includes: If the number of unused thread positions in each process that meets the requirements for running the new disk thread is the same, based on the affinity between the new disk and one or more servers, determine that the process corresponding to the server with the strongest affinity to the new disk is the process to which the new disk thread belongs.

4. The multi-threaded hard disk expansion method according to claim 1, characterized in that: After determining the process to which the thread of the new disk belongs according to the number of threads of the new disk and the positions of the threads that are not used in each process, the following steps are included: Update the new disk to the pool map.

5. The multi-threaded hard disk expansion method according to claim 1, characterized in that: In response to the request to add the new disk, the thread of the new disk is run based on the thread position that is not used in the running process, Threads belonging to the same new disk are run by the thread location of the same process.

6. A multi-threaded hard disk capacity expansion device for implementing the multi-threaded hard disk capacity expansion method according to claim 1, characterized in that: The multi-threaded hard disk expansion device includes: An acquisition module, configured to acquire a maximum number of threads supported by each of one or more servers; A process establishment module, configured to establish a process corresponding to the server and having thread positions reserved with the maximum number of threads; The expansion module is configured to respond to a request for adding a new disk and run the thread of the new disk based on the thread position that is not used in the running process.

7. A hard disk expansion device based on multithreading, characterized in that: The multi-threaded hard disk expansion device includes a processor, a memory, and a multi-threaded hard disk expansion program stored in the memory and executable by the processor. When the multi-threaded hard disk expansion program is executed by the processor, the steps of the multi-threaded hard disk expansion method as described in any one of claims 1 to 5 are implemented.

8. A readable storage medium, characterized in that: The readable storage medium stores a multi-threaded hard disk capacity expansion program, wherein when the multi-threaded hard disk capacity expansion program is executed by a processor, the steps of the multi-threaded hard disk capacity expansion method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and device for controlling thread quantity in thread pool

    CN107220033A

  • High-concurrency data asynchronous processing method and device

    CN116595099A