CN115328564A - Asynchronous input output thread processor resource allocation method and device - Google Patents

Asynchronous input output thread processor resource allocation method and device Download PDF

Info

Publication number
CN115328564A
CN115328564A CN202211264580.6A CN202211264580A CN115328564A CN 115328564 A CN115328564 A CN 115328564A CN 202211264580 A CN202211264580 A CN 202211264580A CN 115328564 A CN115328564 A CN 115328564A
Authority
CN
China
Prior art keywords
thread
input
output
state
controlling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211264580.6A
Other languages
Chinese (zh)
Other versions
CN115328564B (en
Inventor
李锐喆
赵彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Carpura Technology Co ltd
Original Assignee
Beijing Carpura Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Carpura Technology Co ltd filed Critical Beijing Carpura Technology Co ltd
Priority to CN202211264580.6A priority Critical patent/CN115328564B/en
Publication of CN115328564A publication Critical patent/CN115328564A/en
Application granted granted Critical
Publication of CN115328564B publication Critical patent/CN115328564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a resource allocation method and a device of an asynchronous input and output thread processor, which relate to the technical field of computers, and the method comprises the steps of judging whether an asynchronous input/output request to be processed exists at present, and controlling an input and output special thread to enter a first dormant state if the asynchronous input/output request to be processed does not exist at present; when the special input/output thread is in the first dormant state, if an asynchronous input/output request initiated by an application program is received, controlling the special input/output thread to be converted into an active state from the first dormant state. The resource allocation method of the asynchronous input and output thread processor can enable the input and output special thread to enter the first dormant state when the asynchronous input and output request to be processed does not exist, avoid invalid occupation of processor resources and improve the overall efficiency of application programs.

Description

Asynchronous input and output thread processor resource allocation method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for allocating resources of an asynchronous input/output thread processor.
Background
With the continuous enhancement of computer data processing capability and the continuous improvement of the requirements of various applications, the calculation amount of processing data by application programs is also increased, and correspondingly, the data amount Input or Output (I/O) from a file system is also increased. Since the I/O data transfer capabilities increase at a slower rate than the computing power, the data I/O speed becomes a performance bottleneck for the application running in many scenarios.
To reduce the impact of I/O overhead, parallel I/O techniques or asynchronous I/O techniques may be used. The parallel I/O technology can fully utilize the parallel storage capacity of a computer, the data of an application program is stored in a scattered mode on a plurality of processes, and the plurality of processes cooperate to read and write file data, so that the data reading and writing transmission speed is improved. For example, chinese patent CN114138381 discloses a processing system of numerical program, which is used to complete synchronous/asynchronous parallel read/write of multidimensional variables for distributed computation, but there is an overlap between the I/O process and the computation process in the parallel setting. The asynchronous I/O technology uses an I/O special process or thread except a computer process or thread to complete data read-in, write-out and transmission, so that an application program can execute other calculations without waiting for the completion of I/O operation, the two calculations can be performed simultaneously in an overlapping mode, and the whole time consumption is shortened. On the basis, the parallel asynchronous I/O method which combines the parallel I/O technology and the asynchronous I/O technology can further reduce the influence of the I/O overhead on the running speed of the application program.
The current asynchronous I/O technology mainly comprises two implementation approaches, namely using a special I/O process and using a special I/O thread. The I/O dedicated processes are independent processes other than the original computing process of the application program, and when the application program is started to run, additional independent computing resources need to be allocated to each I/O process. And each dedicated I/O thread is automatically created by the computing process of the application program according to the requirement, so that independent computing resources do not need to be allocated to the I/O dedicated thread when the application program is submitted. Although the dedicated thread approach does not require additional computing resources to be allocated compared to the dedicated process, the I/O dedicated thread will compete with the application computing thread for the use of processor resources, which brings new overhead to program execution.
Disclosure of Invention
In order to solve the problem that the existing asynchronous input and output thread data transmission mode occupies larger processor resources, the application provides an asynchronous input and output thread processor resource allocation method, so that the processor resource overhead of data reading and writing can be fully reduced.
In one aspect, an asynchronous input/output thread processor resource allocation method is provided, including:
judging whether an asynchronous input/output request to be processed exists currently or not, and controlling an input/output dedicated thread to enter a first dormant state if the asynchronous input/output request to be processed does not exist currently;
when the input and output dedicated thread is in the first dormant state, if an asynchronous input/output request initiated by an application program is received, controlling the input and output dedicated thread to be converted into an active state from the first dormant state.
In another aspect, an asynchronous input output thread processor resource allocation apparatus is provided, the apparatus comprising:
the first dormancy control module is used for judging whether the asynchronous input/output request to be processed exists currently or not, and controlling the input/output dedicated thread to enter a first dormancy state if the asynchronous input/output request to be processed does not exist currently;
and the first dormancy conversion module is used for controlling the input and output dedicated thread to be converted into an active state from the first dormancy state if an asynchronous input/output request initiated by an application program is received when the input and output dedicated thread is in the first dormancy state.
In another aspect, a computer device is provided, where the computer device includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the processor can load and execute the at least one instruction, the at least one program, the code set, or the set of instructions to implement the resource allocation method for the asynchronous input/output thread processor provided in the foregoing embodiments.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the processor can load and execute the at least one instruction, the at least one program, the code set, or the set of instructions to implement the asynchronous input output thread processor resource allocation method provided in the above embodiments.
In another aspect, a computer program product or computer program is provided, the computer program title or computer program comprising computer program instructions stored in a computer readable storage medium. The processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the computer device to execute the asynchronous input output thread processor resource allocation method according to the above-mentioned embodiment.
The beneficial effect that technical scheme that this application provided brought includes at least: the embodiment of the invention provides a resource allocation method for an asynchronous input and output thread processor, which comprises the steps of judging whether an asynchronous input/output request to be processed exists currently or not, and controlling an input and output dedicated thread to enter a first dormant state if the asynchronous input/output request to be processed does not exist currently; when the special input/output thread is in the first dormant state, if an asynchronous input/output request initiated by an application program is received, controlling the special input/output thread to be converted into an active state from the first dormant state. The method provided by the embodiment of the invention can enable the special input/output thread to enter the first dormant state when the asynchronous input/output request to be processed does not exist, thereby avoiding invalid occupation of processor resources and improving the overall efficiency of the application program.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart illustrating an implementation of a resource allocation method for an asynchronous input/output thread processor according to an exemplary embodiment of the present application;
FIG. 2 is a block diagram illustrating an asynchronous I/O thread processor assignment arrangement in accordance with an illustrative embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating a computer device corresponding to an asynchronous input/output threaded processor allocation method according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the following detailed description of the embodiments of the present application will be made with reference to the accompanying drawings.
Conventional use of dedicated I/O processes or dedicated I/O threads consumes significant processor resources. In a specific example, if an application program adopts 1024 processes/processor cores for parallel computing, using 16I/O processes requires applying 1040 processes/processor cores when submitting the application program, i.e. the sum of the original processes/processor cores and the I/O processes. If the application program uses 16I/O threads, 1024 processes/processor cores still need to be applied when the application program is submitted.
New overhead is incurred when an I/O-specific thread competes with an application compute thread for use of processor resources. For example, 64 compute threads are running on a compute node of 64 processor cores, and after an I/O dedicated thread is generated, the I/O dedicated thread will compete with the 64 compute threads for use of the 64 processor cores. When the I/O special thread and 64 computing threads run at full load, processor resources are not actively released, and an operating system can only share 64 processor cores in 65 thread time sharing modes through scheduling and thread context switching. In this case, I/O dedicated threads incur an overhead of approximately 1/64. And the data read-write operation which is responsible for the I/O special thread is finally completed by the special processes/threads of the operating system, and the special processes/threads of the operating system occupy the resources of the processor, thereby bringing about certain expenses.
The asynchronous input and output thread processor resource allocation method can reasonably allocate processor resources between the input and output special threads and the computing threads of the application program, and improve the overall efficiency of the application program.
The first embodiment,
Fig. 1 is a flow chart illustrating an implementation of a resource allocation method for an asynchronous input/output thread processor according to an exemplary embodiment.
Referring to fig. 1, a method provided by an embodiment of the present invention may include steps 101 to 102.
Step 101: judging whether the asynchronous input/output request to be processed exists currently, and controlling the input/output dedicated thread to enter a first dormant state if the asynchronous input/output request to be processed does not exist currently.
Specifically, in an asynchronous I/O system, unprocessed asynchronous I/O requests are stored in an asynchronous I/O request queue.
In some embodiments, the specific implementation process of step 101 may include:
and acquiring the unprocessed asynchronous I/O request corresponding to the I/O special thread, and enabling the I/O special thread to enter a first dormant state if the unprocessed asynchronous I/O request is not found.
It can be seen that the asynchronous I/O thread processor allocation method provided by the embodiment of the present invention can switch from the active state to the sleep state after the I/O dedicated thread attempts to acquire an unprocessed I/O request.
Step 102: when the input and output dedicated thread is in the first dormant state, if an asynchronous input/output request initiated by an application program is received, controlling the input and output dedicated thread to be converted into an active state from the first dormant state.
In some embodiments, the specific implementation of step 102 may include:
the I/O dedicated thread is restored to an active state in response to an asynchronous I/O request by an application while the I/O dedicated thread is in a first sleep state.
It can be seen that the asynchronous I/O thread processor allocation method provided by the embodiment of the present invention may cause the switching from the first sleep state to the active state when the application program initiates a new asynchronous I/O request.
In this embodiment, the sleep state is the state in which the thread enters a sleep state, or a blocking state, in which the thread yields processor resources. The active state is a state other than the sleep state, in which the thread occupies processor resources.
The asynchronous I/O thread processor allocation method provided by the embodiment of the invention can enable the I/O special thread to actively release the processor resource in a waiting state, and re-occupy the processor resource when the waiting is finished, thereby avoiding invalid occupation or waste of the processor resource and improving the overall efficiency of the application program.
In some embodiments, said controlling the input output dedicated thread to enter a first sleep state and said controlling the input output dedicated thread to transition from the first sleep state to an active state in steps 101 and 102 comprises:
the control input and output dedicated thread enters a first dormant state and the control input and output dedicated thread is converted to an active state from the first dormant state based on the passing operation and the releasing operation.
Specifically, the switching of the I/O dedicated thread between the first dormant state and the active state may be implemented based on a pass and release (PV) operation, where the PV operation includes steps of applying for a resource and releasing the resource.
For example, an I/O dedicated thread may first perform a P-operation on the asynchronous I/O request queue semaphore in an attempt to obtain an outstanding I/O request, and the P-operation may cause the I/O dedicated thread to enter a first sleep state if the asynchronous I/O request queue is empty at that time.
When an application program initiates a new asynchronous I/O request, a computing thread corresponding to the I/O dedicated thread performs a V-operation on semaphores of the asynchronous I/O request queue, and the V-operation can enable the I/O dedicated thread to enter an active state from the first sleep state.
In some embodiments, the asynchronous input/output thread processor resource allocation method provided by the embodiment of the present invention may further include step 201 and step 202.
Step 201: and judging whether the current file read-write operation exists or not, and controlling the input and output special thread to enter a second dormant state if the current file read-write operation exists.
Step 202: and when the input and output special thread is in the second dormant state and the file reading and writing operation is finished, controlling the input and output special thread to be converted into an active state from the second dormant state.
Specifically, the I/O dedicated thread reads and writes file data using corresponding functions of the MPI-I/O or operating system, and at this time, the I/O dedicated thread needs to enter the second sleep state, and resumes the active state after the data reading and writing is completed.
As can be seen from steps 101 to 102 and steps 201 to 101, the I/O dedicated thread enters a wait state when there is no task to be done or when other functions are used to read and write file data. One situation is that when an I/O dedicated thread acquires an outstanding asynchronous I/O request, the request queue is found to be empty, indicating that there is no task to be done, and the application is waiting to initiate a new asynchronous I/O request. The other situation is that the I/O special thread uses corresponding functions of MPI-I/O or an operating system to read and write file data, and the I/O special thread needs to wait for the completion of data reading and writing.
In the method provided by the embodiment of the invention, the switching of the I/O special thread between the second dormant state and the active state is not suitable for being realized by using PV operation. This scenario is difficult to implement since the use of PV operations requires modifications to the operating system's associated programs.
In some embodiments, said controlling said input output dedicated thread to enter a second sleep state and said controlling said input output dedicated thread to transition from said second sleep state to an active state in steps 201 and 202 comprises:
and controlling the input and output special thread to enter a second dormant state and controlling the input and output special thread to be converted into an active state from the second dormant state based on a process suspension operation.
Specifically, the switching of the I/O dedicated thread between the second sleep state and the active state may be implemented based on a process suspension function of the system. In a specific embodiment, the function used by the process suspension function may include a sleep function and/or a useep function, so that a thread may sleep for a specified length of time and automatically resume an active state after the specified length of time is reached.
In some embodiments, the suspend time determination process of the process suspend operation includes:
and determining the suspension time of the process suspension operation based on a preset suspension time threshold and/or the data size of the read-write operation.
In one specific example, the length of time that the sleep or useep function is called once is determined based on a preset threshold length of time to enable the I/O dedicated thread to sleep. And when the I/O special thread is dormant for a preset time, the I/O special thread is restored to the active state from the second dormant state.
Furthermore, when the I/O special thread dormancy reaches the preset duration and the file data read-write operation is not completed, the sleep or usleep function is called again, so that the I/O special thread maintains the second dormancy state.
In a specific example, the time required by the current read-write task is predicted based on the size of the data to be read-written, and a sleep or usleep function is called based on the predicted time, so that the I/O dedicated thread sleeps for the predicted time length.
Specifically, the sleep time is predicted according to the size of the data to be read and written and the pre-stored historical time information. For example, if the historical time information corresponding to 200MB of data is 100 milliseconds, and the size of the data to be read and written is 100MB currently, the length of time for which the I/O dedicated thread sleeps may be set to 50 milliseconds.
In a specific example, after the I/O dedicated thread is made to sleep for the predicted time length based on the predicted time required for the read-write task, if the file data read-write operation is not completed, the sleep or useep function is called again, so that the I/O dedicated thread maintains the second sleep state. Optionally, the sleeping time length of the I/O dedicated thread is determined based on a preset time length threshold or a time length predicted value.
In some embodiments, the asynchronous input/output thread processor resource allocation method provided by the embodiment of the present invention may further include step 301 and step 302.
Step 301: and judging whether the computing thread waits for the completion of the asynchronous input/output request currently, and if the computing thread waits for the incomplete asynchronous input/output request currently, controlling the computing thread to enter a third sleep state.
Step 302: when the computing thread is in the third sleep state, if all the asynchronous input/output requests waiting for the computing thread are judged to be completed, the computing thread is controlled to be converted to the active state from the third sleep state.
Specifically, the I/O dedicated thread and the corresponding computing thread belong to the same computing process, and the I/O dedicated thread is created by the corresponding computing thread. Variable resources are shared between the I/O dedicated threads and the corresponding compute threads.
The asynchronous I/O thread processor allocation method provided by the embodiment of the invention can release the processor resource when the asynchronous I/O request is not completed, namely the asynchronous I/O thread is in an active state, and occupy the processor resource when the asynchronous I/O request is completed.
In some embodiments, the entering of the control computing thread into the third sleep state and the transition of the control computing thread from the third sleep state to the active state in steps 301 and 302 includes:
the control computing thread enters a third sleep state and the control computing thread transitions from the third sleep state to an active state based on a pass through operation and a release operation.
In some embodiments, switching of computing threads between the third sleep state and the active state may also be accomplished based on PV operations. Specifically, a shared semaphore is set, where the shared semaphore is a shared semaphore between an I/O dedicated thread and its corresponding compute thread. If the currently waiting outstanding requests include asynchronous I/O requests, performing a P-operation on the shared semaphore to cause the computing thread to enter the third sleep state. And after the I/O special thread completes the corresponding asynchronous I/O request, performing V operation on the shared semaphore to enable the computing thread to return to an active state.
In summary, the asynchronous I/O thread processor allocation method provided in the embodiments of the present invention enables the asynchronous I/O dedicated thread to actively release the processor resource in the wait state and actively use the processor resource when the wait state is finished, and on the other hand, enables the computing thread of the application program to actively release the processor resource when the asynchronous I/O request is found to be incomplete, and then uses the processor resource after the asynchronous I/O request is finished. Through the process, in the resource allocation of the application program manager, the asynchronous I/O thread is enabled to occupy a priority position, namely the asynchronous I/O thread is prior to the computing thread, so that the data reading and writing speed is fully guaranteed, the condition that the computing speed is high but limited by the data transmission speed is avoided, the processor resource is fully utilized, and the overall efficiency of the application program is improved.
Example II,
Fig. 2 is a schematic diagram illustrating an apparatus for allocating resources of an asynchronous input/output threaded processor according to an embodiment of the present invention.
Referring to fig. 2, an apparatus for allocating resources of an asynchronous input/output threaded processor according to an embodiment of the present invention includes:
a first sleep control module 201, configured to determine whether there is a pending asynchronous input/output request currently, and if there is no pending asynchronous input/output request currently, control the i/o dedicated thread to enter a first sleep state;
a first sleep transition module 202, configured to, when the io dedicated thread is in a first sleep state, if an asynchronous i/o request initiated by an application is received, control the io dedicated thread to transition from the first sleep state to an active state.
In some embodiments, the controlling the input/output dedicated thread to enter the first sleep state and the controlling the input/output dedicated thread to transition from the first sleep state to the active state in the first sleep control module 201 and the first sleep transition module 202 include:
the control input and output dedicated thread enters a first dormant state and the control input and output dedicated thread is converted to an active state from the first dormant state based on the passing operation and the releasing operation.
In some embodiments, the asynchronous input and output thread processor resource allocation apparatus may further include:
the second dormancy control module is used for judging whether the ongoing file reading and writing operation exists currently or not, and controlling the input and output special thread to enter a second dormancy state if the ongoing file reading and writing operation exists currently;
and the second dormancy conversion module is used for controlling the special input/output thread to be converted into an active state from the second dormancy state when the read-write operation of the file is completed when the special input/output thread is in the second dormancy state.
In some embodiments, said controlling said input output dedicated thread to enter a second sleep state and said controlling said input output dedicated thread to transition from said second sleep state to an active state in a second sleep control module and a second sleep transition module comprises:
and controlling the input and output special thread to enter a second dormant state and controlling the input and output special thread to be converted into an active state from the second dormant state based on a process suspension operation.
In some embodiments, the asynchronous input/output thread processor resource allocation apparatus may further include a suspend time determining module, configured to determine a suspend time for the process to suspend operation based on a preset suspend time threshold and/or a data size of the read/write operation.
In some embodiments, the asynchronous input output thread processor resource allocation apparatus may further include:
the third dormancy control module is used for judging whether the computing thread waits for the completion of the asynchronous input/output request or not, and controlling the computing thread to enter a third dormancy state if the computing thread waits for the incomplete asynchronous input/output request;
and the third sleep conversion module is used for controlling the computing thread to convert from the third sleep state to the active state if all the asynchronous input/output requests waiting for the computing thread are judged to be completed when the computing thread is in the third sleep state.
In some embodiments, the entering of the control computing thread into a third sleep state and the transitioning of the control computing thread from the third sleep state to the active state in a third sleep control module and a third sleep transition module comprises:
the control computing thread enters a third sleep state and the control computing thread transitions from the third sleep state to an active state based on a pass through operation and a release operation.
In summary, the resource allocation apparatus for an asynchronous input/output threaded processor according to the embodiments of the present invention enables an asynchronous I/O thread to occupy a priority position, that is, the asynchronous I/O thread is prior to a computing thread, so as to fully ensure a data reading and writing speed, avoid a situation that the computing speed is fast but limited by a data transmission speed, fully utilize processor resources, and improve the overall efficiency of an application program.
Example III,
Fig. 3 shows a schematic structural diagram of a computer device provided in an exemplary embodiment of the present application, where the computer device includes:
the processor 301 includes one or more processing cores, and the processor 301 executes various functional applications and data processing by executing software programs and modules.
The receiver 302 and the transmitter 303 may be implemented as one communication component, which may be a communication chip. Optionally, the communication assembly may be implemented to include signal transmission functionality. That is, the transmitter 303 may be configured to transmit a control signal to the image capturing device and the scanning device, and the receiver 3 may be configured to receive a corresponding feedback instruction.
The memory 304 is connected to the processor 301 by a bus 305.
The memory 304 may be configured to store at least one instruction, and the processor 301 is configured to execute the at least one instruction to implement steps 101 to 102 in the above-described method embodiments.
Examples IV,
Embodiments of the present application further provide a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, for being loaded and executed by a processor to implement the above-mentioned asynchronous input/output thread processor resource allocation method.
Examples V,
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the asynchronous input output threaded processor resource allocation method described in any of the above embodiments.
Optionally, the computer-readable storage medium may include: read Only Memory (ROM), random Access Memory (RAM), solid State Drive (SSD), or optical disc. The Random Access Memory may include a Resistance Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM).
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages or disadvantages of the implementation.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended only to illustrate the alternative embodiments of the present application, and should not be construed as limiting the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application should be included in the scope of the present application.

Claims (10)

1. An asynchronous input output thread processor resource allocation method, comprising:
judging whether an asynchronous input/output request to be processed exists at present, and controlling an input/output dedicated thread to enter a first dormant state if the asynchronous input/output request to be processed does not exist at present;
when the input and output dedicated thread is in the first dormant state, if an asynchronous input/output request initiated by an application program is received, controlling the input and output dedicated thread to be converted into an active state from the first dormant state.
2. The method of claim 1, wherein said controlling the input/output dedicated thread to enter a first sleep state and said controlling the input/output dedicated thread to transition from the first sleep state to an active state comprises:
and based on the pass operation and the release operation, realizing that the input and output special thread enters a first dormant state and the input and output special thread is controlled to be converted from the first dormant state to an active state.
3. The method of claim 1, further comprising:
judging whether the current file read-write operation exists or not, and if the current file read-write operation exists, controlling the input and output special thread to enter a second dormant state;
when the special input/output thread is in the second sleep state and the file read-write operation is completed, controlling the special input/output thread to be converted into an active state from the second sleep state.
4. The method of claim 3, wherein said controlling the input/output dedicated thread to enter a second sleep state and said controlling the input/output dedicated thread to transition from the second sleep state to an active state comprises:
and controlling the input and output special thread to enter a second dormant state and controlling the input and output special thread to be converted into an active state from the second dormant state based on a process suspension operation.
5. The method of claim 4, wherein the suspend time determination of the process suspend operation comprises: and determining the suspension time of the process suspension operation based on a preset suspension time threshold and/or the data size of the read-write operation.
6. The method of claim 1, further comprising:
judging whether a computing thread waits for the completion of the asynchronous input/output request or not, and if the computing thread waits for the incomplete asynchronous input/output request, controlling the computing thread to enter a third dormant state;
and when the computing thread is in the third dormant state, controlling the computing thread to be converted into an active state from the third dormant state if all the asynchronous input/output requests waiting for the computing thread are judged to be completed.
7. The method of claim 1, wherein the controlling the computing thread to enter a third sleep state and the controlling the computing thread to transition from the third sleep state to the active state comprises:
the control computing thread enters a third sleep state and the control computing thread transitions from the third sleep state to an active state based on a pass through operation and a release operation.
8. An apparatus for allocating resources of an asynchronous input output threaded processor, the apparatus comprising:
the first dormancy control module is used for judging whether the asynchronous input/output request to be processed exists currently or not, and controlling the input/output dedicated thread to enter a first dormancy state if the asynchronous input/output request to be processed does not exist currently;
and the first dormancy conversion module is used for controlling the input and output dedicated thread to be converted into an active state from the first dormancy state if an asynchronous input/output request initiated by an application program is received when the input and output dedicated thread is in the first dormancy state.
9. A computer device comprising a processor and a memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement an asynchronous input output threaded processor resource allocation method as claimed in any one of claims 1 to 7.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the asynchronous input output threaded processor resource allocation method according to any one of claims 1 to 7.
CN202211264580.6A 2022-10-17 2022-10-17 Asynchronous input/output thread processor resource allocation method and device Active CN115328564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211264580.6A CN115328564B (en) 2022-10-17 2022-10-17 Asynchronous input/output thread processor resource allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211264580.6A CN115328564B (en) 2022-10-17 2022-10-17 Asynchronous input/output thread processor resource allocation method and device

Publications (2)

Publication Number Publication Date
CN115328564A true CN115328564A (en) 2022-11-11
CN115328564B CN115328564B (en) 2023-04-25

Family

ID=83915497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211264580.6A Active CN115328564B (en) 2022-10-17 2022-10-17 Asynchronous input/output thread processor resource allocation method and device

Country Status (1)

Country Link
CN (1) CN115328564B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115718665A (en) * 2023-01-10 2023-02-28 北京卡普拉科技有限公司 Asynchronous I/O thread processor resource scheduling control method, device, medium and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801101A (en) * 2006-01-17 2006-07-12 浙江大学 Thread implementation and thread state switching method in Java operation system
CN103442204A (en) * 2013-08-08 2013-12-11 浙江工业大学 Network video transmission system and method based on DM365
CN105487987A (en) * 2015-11-20 2016-04-13 深圳市迪菲特科技股份有限公司 Method and device for processing concurrent sequential reading IO (Input/Output)
CN106648851A (en) * 2016-11-07 2017-05-10 郑州云海信息技术有限公司 IO management method and device used in multi-controller storage
WO2021003443A1 (en) * 2019-07-03 2021-01-07 Qualcomm Incorporated Methods and apparatus to facilitate sleep mechanisms for read-only mode devices in a dedicated carrier
CN114138381A (en) * 2022-01-30 2022-03-04 北京卡普拉科技有限公司 Processing system of numerical program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801101A (en) * 2006-01-17 2006-07-12 浙江大学 Thread implementation and thread state switching method in Java operation system
CN103442204A (en) * 2013-08-08 2013-12-11 浙江工业大学 Network video transmission system and method based on DM365
CN105487987A (en) * 2015-11-20 2016-04-13 深圳市迪菲特科技股份有限公司 Method and device for processing concurrent sequential reading IO (Input/Output)
CN106648851A (en) * 2016-11-07 2017-05-10 郑州云海信息技术有限公司 IO management method and device used in multi-controller storage
WO2021003443A1 (en) * 2019-07-03 2021-01-07 Qualcomm Incorporated Methods and apparatus to facilitate sleep mechanisms for read-only mode devices in a dedicated carrier
CN114138381A (en) * 2022-01-30 2022-03-04 北京卡普拉科技有限公司 Processing system of numerical program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115718665A (en) * 2023-01-10 2023-02-28 北京卡普拉科技有限公司 Asynchronous I/O thread processor resource scheduling control method, device, medium and equipment

Also Published As

Publication number Publication date
CN115328564B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
US9135060B2 (en) Method and apparatus for migrating task in multicore platform
CN1717645B (en) Apparatus and method for multi-threaded processors performance control
US5692192A (en) Load distribution method and system for distributed threaded task operation in network information processing apparatuses with virtual shared memory
CN108228343B (en) Memory recovery method and device, computer device and computer readable storage medium
US10459773B2 (en) PLD management method and PLD management system
JPH03144847A (en) Multi-processor system and process synchronization thereof
US20110107344A1 (en) Multi-core apparatus and load balancing method thereof
US20110265093A1 (en) Computer System and Program Product
US11061841B2 (en) System and method for implementing a multi-threaded device driver in a computer system
CN115328564A (en) Asynchronous input output thread processor resource allocation method and device
US10521371B2 (en) Cache system and associated method
KR20080105390A (en) Apparatus and method for controlling commands used in flash memory
CN114610472B (en) Multi-process management method in heterogeneous computing and computing equipment
CN112667380A (en) Multiprocessor task scheduling method, device and storage medium
US10318362B2 (en) Information processing apparatus, information processing method, and non-transitory computer-readable storage medium
CN110837415A (en) Thread scheduling method and device based on RISC-V multi-core processor
CN115617494A (en) Process scheduling method and device in multi-CPU environment, electronic equipment and medium
CN112114967B (en) GPU resource reservation method based on service priority
CN116724294A (en) Task allocation method and device
TWI823655B (en) Task processing system and task processing method applicable to intelligent processing unit
CN115794450B (en) Micro-kernel system service-oriented parallelism optimization method, system and medium
CN115718665B (en) Asynchronous I/O thread processor resource scheduling control method, device, medium and equipment
CN115599459B (en) Cross-power-domain multiprocessor operation device and communication method thereof
KR102575773B1 (en) Processor capable of processing external service requests using a symmetrical interface
US20230325512A1 (en) Graphics processing unit invoking method, central processing unit and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant