[go: up one dir, main page]

CN112596774B - Instantiated software management method and device - Google Patents

Instantiated software management method and device Download PDF

Info

Publication number
CN112596774B
CN112596774B CN202011285020.XA CN202011285020A CN112596774B CN 112596774 B CN112596774 B CN 112596774B CN 202011285020 A CN202011285020 A CN 202011285020A CN 112596774 B CN112596774 B CN 112596774B
Authority
CN
China
Prior art keywords
instance
target
coroutine
identifier
target task
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.)
Active
Application number
CN202011285020.XA
Other languages
Chinese (zh)
Other versions
CN112596774A (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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies 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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202011285020.XA priority Critical patent/CN112596774B/en
Publication of CN112596774A publication Critical patent/CN112596774A/en
Application granted granted Critical
Publication of CN112596774B publication Critical patent/CN112596774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of data storage, in particular to an instantiated software management method and device, wherein the method comprises the following steps: starting a target instance and configuring an instance identifier of the target instance, wherein the instance identifier of one instance is used for uniquely identifying the one instance; when a target task under the target instance is started and operated, establishing an incidence relation between the instance identifier and the target task, and distributing target system resources required by the operation of the target task for the target task based on the instance identifier; when the target instance is determined to need to be closed, stopping each target task under the target instance based on the instance identifier, determining system resources allocated to each target task under the target instance based on the instance identifier, and closing the target instance after determining that the system resources are completely recycled.

Description

Instantiated software management method and device
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a method and an apparatus for managing instantiated software.
Background
In a storage system, a process is usually selected as a running instance of a hard disk, and when one hard disk is added, one more process is pulled up. When a hard disk is deleted, the corresponding process is exited. By the design mode, the hard disks are directly and mutually influenced less and are relatively independent, and the influence of the fault of one disk on other disks can be reduced. However, taking a process as an example, memory resources and network communication sharing during instance running are inefficient. In order to share resources such as memory and network communication, services corresponding to different entities are typically run in one process in an instantiated manner.
Although the services corresponding to different entities are instantiated to run in one process, the requirement of multiple instantiated shared memory and network communication resources can be met, the resources such as the memory, the scheduling, the lock and the like in the instances are not attributed and are not managed uniformly, all the logics in the instances need to consider the problem of resource recovery when a single instance exits, the software implementation logics are complex, and the problem is easily introduced.
Disclosure of Invention
The application provides an instantiated software management method and device, which are used for solving the problem that shared system resources cannot be effectively managed in the prior art.
In a first aspect, the present application provides an instantiated software management method, the method comprising:
starting a target instance and configuring an instance identifier of the target instance, wherein the instance identifier of one instance is used for uniquely identifying the one instance;
when a target task under the target instance is started and operated, establishing an incidence relation between the instance identifier and the target task, and distributing target system resources required by the operation of the target task for the target task based on the instance identifier;
when the target instance is determined to need to be closed, stopping each target task under the target instance based on the instance identifier, determining system resources allocated to each target task under the target instance based on the instance identifier, and closing the target instance after determining that the system resources are completely recycled.
Optionally, the system resources include scheduling resources, memory resources, and network resources.
Optionally, multiple instances run in one process in a parent coroutine manner, each target task under one instance runs in a child coroutine manner, and an instance identifier of one instance is a private variable of the parent coroutine corresponding to the one instance.
Optionally, when starting and running a target task under the target instance, the step of establishing an association relationship between the instance identifier and the target task includes:
starting a target subprogram for bearing the target task;
and when the target task is operated, acquiring the private variable of a parent coroutine corresponding to the target child coroutine, and establishing an association relation between the target task and the private variable of the parent coroutine, wherein the private variable of the parent coroutine is an instance identifier of the target instance.
Optionally, the step of stopping each target task under the target instance based on the instance identifier, determining the system resource allocated to each target task under the target instance based on the instance identifier, and after determining that the system resource recycling is completed, closing the target instance includes:
traversing a child coroutine queue corresponding to a parent coroutine for bearing the target instance based on the instance identifier, and stopping each child coroutine in the child coroutine queue;
determining system resources allocated to each subprogram based on the instance identifiers, and recycling the system resources;
and after determining that the system resource recovery is completed, closing the parent coroutine for bearing the target instance.
In a second aspect, the present application provides an instantiated software management device, the device comprising:
the configuration unit is used for starting a target instance and configuring an instance identifier of the target instance, wherein the instance identifier of one instance is used for uniquely identifying the one instance;
the establishing unit is used for establishing an incidence relation between the instance identifier and the target task when starting and running a target task under the target instance, and distributing target system resources required by running the target task for the target task based on the instance identifier;
and the closing unit is used for stopping each target task under the target example based on the example identifier when the target example is determined to need to be closed, determining the system resource distributed to each target task under the target example based on the example identifier, and closing the target example after the system resource is determined to be completely recycled.
Optionally, the system resources include scheduling resources, memory resources, and network resources.
Optionally, multiple instances run in one process in a parent coroutine manner, each target task under one instance runs in a child coroutine manner, and an instance identifier of one instance is a private variable of the parent coroutine corresponding to the one instance.
Optionally, when an association relationship between the instance identifier and the target task is established when a target task under the target instance is started and run, the establishing unit is specifically configured to:
starting a target subprogram for bearing the target task;
and when the target task is operated, acquiring the private variable of a parent coroutine corresponding to the target child coroutine, and establishing an association relation between the target task and the private variable of the parent coroutine, wherein the private variable of the parent coroutine is an instance identifier of the target instance.
Optionally, the target tasks in the target instance are stopped based on the instance identifier, the system resources allocated to the target tasks in the target instance are determined based on the instance identifier, and when the target instance is closed after it is determined that the system resource recovery is completed, the closing unit is specifically configured to:
traversing a child coroutine queue corresponding to a parent coroutine for bearing the target instance based on the instance identifier, and stopping each child coroutine in the child coroutine queue;
determining system resources allocated to each subprogram based on the instance identifiers, and recycling the system resources;
and after determining that the system resource recovery is completed, closing the parent coroutine for bearing the target instance.
In a third aspect, an embodiment of the present application provides another instantiated software management device, where the instantiated software management device includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the above first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the above first aspects.
In summary, in the instantiated software management method provided in the embodiment of the present application, a target instance is started, and an instance identifier of the target instance is configured, where the instance identifier of one instance is used to uniquely identify the one instance; when a target task under the target instance is started and operated, establishing an incidence relation between the instance identifier and the target task, and distributing target system resources required by the operation of the target task for the target task based on the instance identifier; when the target instance is determined to need to be closed, stopping each target task under the target instance based on the instance identifier, determining system resources allocated to each target task under the target instance based on the instance identifier, and closing the target instance after determining that the system resources are completely recycled.
By adopting the instantiated software management method provided by the embodiment of the application, the corresponding instance identifier is configured for each instance, the association relationship between the instance identifier and each task under the instance is established, the association relationship between the instance identifier and the distributed shared system resource for running each task is established, when one instance is determined to be closed, each corresponding task and the shared system resource distributed to the instance can be determined based on the instance identifier of the instance, and when each task is determined to be closed and the shared system resource is determined to be recycled, the instance is closed, the recycling process of the supply system resource when the instance is closed is simplified, and the shared system resource is effectively managed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a detailed flowchart of an instantiated software management method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an instantiated software framework according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an instantiated software management device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another instantiated software management device according to the embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Illustratively, referring to fig. 1, a detailed flowchart of an instantiated software management method provided in the embodiment of the present application is shown, where the method includes the following steps:
step 100: starting a target instance and configuring an instance identifier of the target instance, wherein the instance identifier of one instance is used for uniquely identifying the one instance.
By instance, it is meant a complete set of business logic that runs based on a set of software logic. The instances are independent of each other, and the instances run the same business logic. For example, in a storage system, each hard disk needs to have a set of service logic providing services, and different disks need to have a set of service logic providing services, and only for each hard disk, a corresponding software service needs to be provided, so that each hard disk corresponds to a software instance. Adding a hard disk requires pulling an instance, deleting a hard disk, and exiting an instance.
In practical application, in order to enable each instance to better share resources such as a memory and a network, services corresponding to different entities are generally operated in one process in an instantiation manner.
Specifically, a plurality of instances run in one process in a parent coroutine mode, each target task under one instance runs in a child coroutine mode, and an instance identifier of one instance is a private variable of the parent coroutine corresponding to the one instance.
For example, in the embodiment of the present application, an instantiated software framework is provided, and for example, referring to fig. 2, a schematic structural diagram of the instantiated software framework provided in the embodiment of the present application is provided; when an instance 1 (storage instantiation service) is started, relevant information corresponding to the instance 1 (such as instance memory management, an instance coroutine framework and a global resource registration framework) is registered in the instantiation software framework; when an instance 3 (storage instantiation service) is started, relevant information corresponding to the instance 3 is registered in the instantiation software framework; the instantiated software framework may also include system threads, system memory and other system resource management. The global resource registration framework may implement: when a registered instance exits, all tasks under the instance can be forcibly exited, and the instance registration framework is recycled, so that the problem of resource leakage after the instance exits is solved.
Step 110: when a target task under the target instance is started and operated, establishing an incidence relation between the instance identifier and the target task, and distributing target system resources required by the target task to operate based on the instance identifier.
Specifically, the system resources include, but are not limited to, scheduling resources, memory resources, and network resources.
In the embodiment of the present application, when a target task under the target instance is started and run and an association relationship between the instance identifier and the target task is established, a preferred implementation manner is to start a target subroutine for carrying the target task; and when the target task is operated, acquiring the private variable of a parent coroutine corresponding to the target child coroutine, and establishing an association relation between the target task and the private variable of the parent coroutine, wherein the private variable of the parent coroutine is an instance identifier of the target instance.
That is to say, in the embodiment of the present application, when the shared system resource is allocated, an association relationship is established between one instance and the allocated shared system resource for running the one instance, based on the instance identifier.
Specifically, the instance identifier may be a private variable of a parent coroutine that carries the instance, that is, each instance runs in a target process, each instance runs in a parent coroutine manner, and a plurality of tasks may be started under one instance, each task runs in a child coroutine manner of a parent coroutine corresponding to the task, when starting and running one target task, a child coroutine is started first, the private variable of the parent coroutine is obtained from the parent coroutine corresponding to the child coroutine as the instance identifier, the instance identifier is recorded in the target task, and when allocating a shared system resource for running the target task to the child coroutine, an association relationship between the allocated shared system resource and the instance identifier is established. That is, according to the instance identifier of an instance, the shared scheduling resource, memory resource, network resource, and the like allocated to all target tasks under the instance can be determined.
In practical application, when an instance is started, a corresponding coroutine scheduling queue and a network communication transceiving queue are configured for the instance, wherein the coroutine scheduling queue of the instance comprises a waiting queue and an execution queue of the instance, and the network communication transceiving queue of the instance comprises a receiving queue and a sending queue of the instance. Therefore, when one instance exits, the corresponding queue of the instance is traversed, the task is stopped to be scheduled, and the system resource is released.
Step 120: when the target instance is determined to need to be closed, stopping each target task under the target instance based on the instance identifier, determining system resources allocated to each target task under the target instance based on the instance identifier, and closing the target instance after the system resources are determined to be completely recycled.
That is to say, when an instance is closed, all tasks under the instance are determined based on the instance identifier of the instance, all tasks are closed, then system resources allocated for running the tasks are determined based on the instance identifier of the instance, the determined system resources are recycled, and after the completion of recycling is determined, the instance is closed.
For example, when an instance exits, all coroutine tasks under the instance are stopped first, and it is ensured that there is no access to resources in the instance any more; then clearing the messages sent to the communication module to ensure that all the messages are cleared; and continuing destroying the resources of the global framework, finally ensuring that all the resources are destroyed, stopping the task, avoiding accessing the instance memory, intensively destroying the instance memory, releasing the instance memory back to the system memory pool, and quitting the instance nursing thread to finish instance quitting.
Based on the same inventive concept as the above method embodiment, for example, referring to fig. 3, a schematic structural diagram of an instantiated software management device provided in the embodiment of the present application is shown, where the device includes:
a configuration unit 30, configured to start a target instance and configure an instance identifier of the target instance, where the instance identifier of one instance is used to uniquely identify the one instance;
the establishing unit 31 is configured to, when starting and running a target task under the target instance, establish an association relationship between the instance identifier and the target task, and allocate a target system resource required for running the target task to the target task based on the instance identifier;
a closing unit 32, configured to, when it is determined that the target instance needs to be closed, stop each target task under the target instance based on the instance identifier, determine, based on the instance identifier, system resources allocated to each target task under the target instance, and close the target instance after it is determined that the system resources are completely recovered.
Optionally, the system resources include scheduling resources, memory resources, and network resources.
Optionally, multiple instances run in one process in a parent coroutine manner, each target task under one instance runs in a child coroutine manner, and an instance identifier of one instance is a private variable of the parent coroutine corresponding to the one instance.
Optionally, when an association relationship between the instance identifier and the target task is established when starting and running a target task under the target instance, the establishing unit 31 is specifically configured to:
starting a target subprogram for bearing the target task;
and when the target task is operated, acquiring the private variable of a parent coroutine corresponding to the target child coroutine, and establishing an association relation between the target task and the private variable of the parent coroutine, wherein the private variable of the parent coroutine is an instance identifier of the target instance.
Optionally, the closing unit 32 is specifically configured to stop each target task in the target instance based on the instance identifier, determine, based on the instance identifier, system resources allocated to each target task in the target instance, and when the target instance is closed after it is determined that the system resource recovery is completed, to:
traversing a child coroutine queue corresponding to a parent coroutine for bearing the target instance based on the instance identifier, and stopping each child coroutine in the child coroutine queue;
determining system resources allocated to each subprogram based on the instance identifiers, and recycling the system resources;
and after determining that the system resource recovery is completed, closing the parent coroutine for bearing the target instance.
The above units may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above units is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the intelligent network card provided in the embodiment of the present application, from a hardware aspect, a schematic diagram of a hardware architecture of the intelligent network card may be shown in fig. 4, where the intelligent network card may include: a memory 40 and a processor 41, which,
memory 40 is used to store program instructions; processor 41 calls program instructions stored in memory 40 and executes the above-described method embodiments in accordance with the obtained program instructions. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application further provides an intelligent network card, which includes at least one processing element (or chip) for executing the above method embodiments.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, having stored thereon computer-executable instructions for causing the computer to perform the above-described method embodiments.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. An instantiated software management method, the method comprising:
starting a target instance and configuring an instance identifier of the target instance, wherein the instance identifier of one instance is used for uniquely identifying the one instance;
when a target task under the target instance is started and operated, establishing an incidence relation between the instance identifier and the target task, and distributing target system resources required by the operation of the target task for the target task based on the instance identifier;
when the target instance is determined to need to be closed, stopping each target task under the target instance based on the instance identifier, determining system resources allocated to each target task under the target instance based on the instance identifier, and closing the target instance after determining that the system resources are completely recycled.
2. The method of claim 1, wherein the system resources comprise scheduling resources, memory resources, and network resources.
3. The method of claim 1, wherein multiple instances run in a process in a manner of a parent coroutine, each target task under one instance runs in a manner of a child coroutine, and an instance identifier of one instance is a private variable of the parent coroutine corresponding to the one instance.
4. The method of claim 3, wherein the step of establishing an association between the instance identifier and a target task under the target instance when the target task is started and run comprises:
starting a target subprogram for bearing the target task;
and when the target task is operated, acquiring the private variable of a parent coroutine corresponding to the target child coroutine, and establishing an association relation between the target task and the private variable of the parent coroutine, wherein the private variable of the parent coroutine is an instance identifier of the target instance.
5. The method of claim 4, wherein stopping each target task under the target instance based on the instance identifier, and determining system resources allocated for each target task under the target instance based on the instance identifier, and after determining that the system resource reclamation is complete, closing the target instance comprises:
traversing a child coroutine queue corresponding to a parent coroutine for bearing the target instance based on the instance identifier, and stopping each child coroutine in the child coroutine queue;
determining system resources allocated to each subprogram based on the instance identifiers, and recycling the system resources;
and after determining that the system resource recovery is completed, closing the parent coroutine for bearing the target instance.
6. An instantiated software management device, the device comprising:
the configuration unit is used for starting a target instance and configuring an instance identifier of the target instance, wherein the instance identifier of one instance is used for uniquely identifying the one instance;
the establishing unit is used for establishing an incidence relation between the instance identifier and the target task when starting and running a target task under the target instance, and distributing target system resources required by running the target task for the target task based on the instance identifier;
and the closing unit is used for stopping each target task under the target example based on the example identifier when the target example is determined to need to be closed, determining the system resource distributed to each target task under the target example based on the example identifier, and closing the target example after the system resource is determined to be completely recycled.
7. The apparatus of claim 6, wherein the system resources comprise scheduling resources, memory resources, and network resources.
8. The apparatus of claim 6, wherein multiple instances run in a process as a parent coroutine, each target task under one instance runs as a child coroutine, and an instance identifier of one instance is a private variable of the parent coroutine to which the one instance corresponds.
9. The apparatus according to claim 8, wherein when an association relationship between the instance identifier and the target task is established when starting and running a target task under the target instance, the establishing unit is specifically configured to:
starting a target subprogram for bearing the target task;
and when the target task is operated, acquiring the private variable of a parent coroutine corresponding to the target child coroutine, and establishing an association relation between the target task and the private variable of the parent coroutine, wherein the private variable of the parent coroutine is an instance identifier of the target instance.
10. The apparatus according to claim 9, wherein the stopping unit is configured to stop each target task in the target instance based on the instance identifier, determine, based on the instance identifier, a system resource allocated to each target task in the target instance, and when the target instance is closed after it is determined that the system resource recycling is completed, the closing unit is specifically configured to:
traversing a child coroutine queue corresponding to a parent coroutine for bearing the target instance based on the instance identifier, and stopping each child coroutine in the child coroutine queue;
determining system resources allocated to each subprogram based on the instance identifiers, and recycling the system resources;
and after determining that the system resource recovery is completed, closing the parent coroutine for bearing the target instance.
CN202011285020.XA 2020-11-17 2020-11-17 Instantiated software management method and device Active CN112596774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011285020.XA CN112596774B (en) 2020-11-17 2020-11-17 Instantiated software management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011285020.XA CN112596774B (en) 2020-11-17 2020-11-17 Instantiated software management method and device

Publications (2)

Publication Number Publication Date
CN112596774A CN112596774A (en) 2021-04-02
CN112596774B true CN112596774B (en) 2022-04-01

Family

ID=75183122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011285020.XA Active CN112596774B (en) 2020-11-17 2020-11-17 Instantiated software management method and device

Country Status (1)

Country Link
CN (1) CN112596774B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117283A (en) * 2015-08-26 2015-12-02 深圳市华验防伪科技有限公司 Task splitting method and system
CN109643245A (en) * 2016-08-30 2019-04-16 微软技术许可有限责任公司 The execution of relevant task instances is applied at least one

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7784051B2 (en) * 2005-11-18 2010-08-24 Sap Ag Cooperative scheduling using coroutines and threads
RU2633985C2 (en) * 2014-09-30 2017-10-20 Общество С Ограниченной Ответственностью "Яндекс" Data processing method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117283A (en) * 2015-08-26 2015-12-02 深圳市华验防伪科技有限公司 Task splitting method and system
CN109643245A (en) * 2016-08-30 2019-04-16 微软技术许可有限责任公司 The execution of relevant task instances is applied at least one

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Analysis of Scheduling Strategies for Spacecraft On-Board Control Procedure:Lua Coroutine vs. VxWorks Task;Su-Hyun Park等;《2018 18th International Conference on Control, Automation and Systems (ICCAS)》;20181213;第1598-第1061页 *
面向业务对象的工作流模型执行环境;林佳等;《计算机集成制造系统》;20180731;第24卷(第7期);第1715-1722页 *

Also Published As

Publication number Publication date
CN112596774A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
US10193977B2 (en) System, device and process for dynamic tenant structure adjustment in a distributed resource management system
US8789043B2 (en) Optimized placement planning for virtual machines in a network by breaking relocation graph into one or more cores to apply different solutions
CN101727357B (en) Method and apparatus for allocating resources in a compute farm
US8763012B2 (en) Scalable, parallel processing of messages while enforcing custom sequencing criteria
US20160139949A1 (en) Virtual machine resource management system and method thereof
CN112527310A (en) Multi-tenant data isolation method and device, computer equipment and storage medium
US20160150076A1 (en) System and Method for Instantiation of Services at a Location Based on a Policy
CN113360893B (en) Container-based intelligent contract execution method and device and storage medium
WO2016074130A1 (en) Batch processing method and device for system invocation commands
US10148740B2 (en) Multi-service application fabric architecture
CN101968751A (en) Sharing idled processor execution resources
CN112988460B (en) Data backup method and device for virtual machine
CN113703912A (en) Virtual machine management method and device
US10452820B2 (en) Thread-based software license management
CN112596774B (en) Instantiated software management method and device
CN115509704A (en) Task scheduling method, device, equipment and storage medium
CN112231053B (en) Load balancing service distribution method and device
CN113515346A (en) Method and device for cleaning residual data of storage volume
CN113961364B (en) Large-scale lock system implementation method and device, storage medium and server
CN109558249B (en) Control method and device for concurrent operation
CN117421063A (en) JAVA-based lightweight service arrangement method, electronic equipment and storage medium
CN112346879A (en) Process management method and device, computer equipment and storage medium
CN113760485A (en) Scheduling method, device, device and storage medium for timed tasks
CN111814007B (en) Method, device and equipment for processing data of doubly-linked list and machine-readable storage medium
CN115495215B (en) GPU sharing method, device, equipment and medium

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