CN114185623B - Processing method and device for deadlock in application starting process - Google Patents

Processing method and device for deadlock in application starting process Download PDF

Info

Publication number
CN114185623B
CN114185623B CN202111558810.5A CN202111558810A CN114185623B CN 114185623 B CN114185623 B CN 114185623B CN 202111558810 A CN202111558810 A CN 202111558810A CN 114185623 B CN114185623 B CN 114185623B
Authority
CN
China
Prior art keywords
module
deadlock
class
loading stage
servlet
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
CN202111558810.5A
Other languages
Chinese (zh)
Other versions
CN114185623A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111558810.5A priority Critical patent/CN114185623B/en
Publication of CN114185623A publication Critical patent/CN114185623A/en
Application granted granted Critical
Publication of CN114185623B publication Critical patent/CN114185623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/524Deadlock detection or avoidance

Landscapes

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

Abstract

The present disclosure provides a method for processing deadlock in an application start process, which can be applied to other fields such as financial fields or computer technology. The method comprises the following steps: splitting an application starting process into a Spring loading stage and a Servlet loading stage by using starting information of an application; classifying the modules initialized in the Spring loading stage into deadlock type modules and non-deadlock type modules; in the Spring loading stage, loading the non-deadlock module and performing non-initialization operation on the deadlock module; and initializing a deadlock class module by using the newly built Servlet processing class in the Servlet loading stage. The present disclosure also provides a processing apparatus, a device, a storage medium and a program product for deadlock in an application start-up process.

Description

Processing method and device for deadlock in application starting process
Technical Field
The present disclosure relates to the field of financial and computer technology, and in particular, to a deadlock processing method, and more particularly, to a deadlock processing method, apparatus, device, medium, and program product during application start.
Background
Currently, applications can use Spring frameworks for lifecycle management of application business processing modules. The method is mainly characterized in that when an application program is started, the application service processing module is loaded, namely, the application module is instantiated and initialized. In order to ensure that the application starting can be completed in a short time, the starting and loading of the modules of the Spring framework application adopts a multithreaded concurrent loading mode. This may lead to deadlock problems, because the application modules load faster and slower, and inter-module interdependence may also exist, if multiple application level resources are involved in common and competing, then deadlock may result during the application launch phase, resulting in a launch that does not complete initialization.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method, apparatus, device, medium, and program product for processing deadlock in an application launch process.
According to a first aspect of the present disclosure, there is provided a method for processing deadlock in an application start process, including:
splitting an application starting process into a Spring loading stage and a Servlet loading stage by using starting information of an application;
Classifying the modules initialized in the Spring loading stage into deadlock type modules and non-deadlock type modules;
in the Spring loading stage, loading the non-deadlock module and performing non-initialization operation on the deadlock module;
and initializing the deadlock class module by using the newly built Servlet processing class in the Servlet loading stage.
According to an embodiment of the present disclosure, the classifying the modules initialized in the Spring loading stage into the deadlock class module and the non-deadlock class module includes:
Acquiring resource configuration information of a module in the Spring loading stage;
acquiring multiplexing information of global variable resources according to the resource configuration information;
And according to the multiplexing information, dividing the modules in the Spring loading stage into a deadlock module and a non-deadlock module.
According to an embodiment of the present disclosure, the deadlock class module includes a module in which there is a global variable resource contention during the initialization process.
According to an embodiment of the present disclosure, the loading operation includes an initialization operation and a non-initialization operation, wherein the non-initialization operation includes an instantiation operation and a business logic processing operation.
According to an embodiment of the present disclosure, initializing the deadlock class module by using the newly created Servlet processing class in the Servlet loading stage includes:
acquiring an instance of a deadlock class module for completing non-initialization operation by using a module object instance interface in a Spring loading stage;
Newly creating Servlet processing class;
and (3) utilizing the Servlet processing class to serially call an instance method of the deadlock class module to finish the initialization operation of the deadlock class module.
A second aspect of the present disclosure provides a processing apparatus for deadlock in an application launch process, including:
the splitting module is used for splitting the application starting process into a Spring loading stage and a Servlet loading stage by utilizing the starting information of the application;
The classifying module is used for classifying the module initialized in the Spring loading stage into a deadlock module and a non-deadlock module;
the loading module is used for loading the deadlock module and non-initializing the deadlock module in the Spring loading stage; and
And the initialization module is used for initializing the deadlock class module by utilizing the newly built Servlet processing class in the Servlet loading stage.
According to an embodiment of the present disclosure, the initialization module includes:
The acquisition unit is used for acquiring an instance of the deadlock class module for completing non-initialization operation by utilizing a module object instance interface in the Spring loading stage;
a new building unit for newly building the Servlet processing class; and
And the initialization unit is used for serially calling an instance method of the deadlock module by using the Servlet processing class to finish the initialization operation of the deadlock module.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the processing method of deadlock in the application launch process.
A fourth aspect of the present disclosure also provides a computer readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform a method of handling deadlock during start-up of an application as described above.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of handling deadlock during start-up of an application as described above.
According to the processing method for deadlock in the application starting process, the initialization which possibly causes concurrency conflict is subjected to stripping delay processing by utilizing different execution time sequences of the Spring framework and the Servlet processing class, so that the deadlock problem caused by application module loading is effectively avoided; meanwhile, the technical scheme provided by the disclosure is simple and easy to operate, does not invade the stored program logic codes, has a safe and controllable influence range, and cannot cause secondary damage caused by application transformation.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of parallel loading of modules during application launch;
FIG. 2 schematically illustrates a scenario diagram of the occurrence of a module initialization deadlock;
FIG. 3 schematically illustrates an application scenario diagram of a method of handling deadlocks during application launch according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a method of handling deadlock during application launch according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a flow chart of module classification according to an embodiment of the disclosure;
FIG. 6 schematically illustrates a flow diagram of an initialization deadlock class module according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a flow chart of module loading based on a latency mechanism according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of a processing apparatus for deadlock during application launch according to an embodiment of the disclosure;
FIG. 9 schematically illustrates a block diagram of an initialization module according to an embodiment of the disclosure;
fig. 10 schematically illustrates a block diagram of an electronic device adapted to implement a method of handling deadlocks during application launch according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Spring is a development framework oriented to java language in IT field, provides many basic functions and tool classes, and can rapidly complete development and construction of an application program by means of the Spring. Servlet is a specification of J2EE, and web applications developed using java will use servlets to process received requests of various types, but require instantiation and initialization at the time of application start. The Spring framework is a first pandemic development framework in the java field, and has the advantages of simple configuration, flexibility, easiness in expansion and the like, and most java applications are researched and developed based on the Spring framework at present.
The Spring framework loading module process can be summarized as 3 phases: instantiation, initialization, other processing. The instantiation stage is to newly build a module object instance according to the module definition. The initialization stage is to perform some initialization operations of setting values on member variables or global variables (system level) of the module itself. Other processing stages are some extension processes provided by the Spring framework for enhancing assignment processes of module member variable specialization or customization.
FIG. 1 is a schematic diagram of parallel loading of modules during application launch.
As shown in fig. 1, the above 3 stages related to startup, in which the initialization stage involves global variable acquisition assignment operation, in the case of simultaneous module loading operation by multithreading, the problem of deadlock caused by resource contention is very likely to occur, and the problem is not caused in the instantiation and other processing stages. The deadlock caused by resource contention is mainly the situation of mixed operation of a plurality of application customized global variables or Spring self-carried global variables and application customized global variables.
FIG. 2 schematically illustrates a scenario diagram of the occurrence of a module initialization deadlock.
As shown in FIG. 2, when the application is started and loaded, 2 modules are simultaneously loaded by threads A and B, and the 2 modules all need to operate resources A and B, the thread A obtains the operation control right of the resource A, the thread B obtains the operation control right of the resource B, the thread A waits for the release B of the thread B, and the thread B waits for the release A of the thread A, so that the 2 threads wait for each other to cause blocking.
Because the application self-defines some system-level global variables, when the application is started, the variables can be set or updated by a plurality of business processing modules, and because the starting is in a multi-thread concurrency mode, if a plurality of modules need to acquire a plurality of global variable resource operation authorities at the same time to perform subsequent operations, and each module only applies for the operation authority of one variable resource, then the situation that each module waits for other modules to release the variable resource and block the variable resource, so that the waiting deadlock is caused, and the normal starting loading of the application system cannot be completed. In addition, the Spring framework cannot control the use condition of the global variable resource applying the customization in the initialization stage, so that the deadlock problem caused by the customization variable cannot be solved in the self scope of the Spring framework.
In view of this, the embodiments of the present disclosure provide a method for processing a deadlock in an application start process, which is used to solve the problem of deadlock generated by operating a custom global variable in an application start stage by using a Spring development framework.
Specifically, embodiments of the present disclosure provide a method of handling deadlock during application launch, a device for handling deadlock during application launch, an electronic apparatus, a readable storage medium, and a computer program product.
It should be noted that, the method and the device for processing deadlock in the application starting process in the embodiment of the present disclosure may be used in the financial field or the computer field, and may also be used in any field other than the financial field and the computer field.
Fig. 3 schematically illustrates an application scenario diagram of a method of handling deadlock during application launch according to an embodiment of the disclosure.
As shown in fig. 3, an application scenario 300 according to this embodiment may include terminal devices 301, 302, 303, a network 304, and a server 305. The network 304 is used as a medium to provide communication links between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 305 via the network 304 using the terminal devices 301, 302, 303 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 301, 302, 303, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 301, 302, 303 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 305 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 301, 302, 303. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the processing method of deadlock in the application starting process provided in the embodiment of the present disclosure may be generally executed by the server 305. Accordingly, the processing apparatus for deadlock during application launch provided by the embodiments of the present disclosure may be generally disposed in the server 305. The processing method of deadlock in application launch provided by the embodiments of the present disclosure may also be performed by a server or a cluster of servers that are different from the server 305 and that are capable of communicating with the terminal devices 301, 302, 303 and/or the server 305. Accordingly, the processing apparatus for deadlock during application start-up provided by the embodiments of the present disclosure may also be provided in a server or a server cluster different from the server 305 and capable of communicating with the terminal devices 301, 302, 303 and/or the server 305.
It should be understood that the number of terminal devices, networks and servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method … … of the disclosed embodiments will be described in detail below with reference to fig. 2-7 based on the scenario described in fig. 3.
Fig. 4 schematically illustrates a flow chart of a method of handling deadlock during application launch according to an embodiment of the disclosure.
As shown in fig. 4, the processing method of deadlock in the application start procedure of this embodiment includes operations S410 to S440.
In operation S410, splitting the application startup process into a Spring loading phase and a Servlet loading phase using startup information of the application;
The application starting process is split into 2 phases, wherein the first phase is a Spring loading phase and the second phase is a Servlet loading phase.
In operation S420, the modules initialized in the Spring loading stage are classified into a deadlock class module and a non-deadlock class module;
In the Spring module loading stage, firstly, the initialization processing of each module is identified, the modules which possibly have global variable resources and operate simultaneously are selected, and for the modules which do not have resource conflict, the original processing mode is maintained and adjustment is not carried out.
In operation S430, in the Spring loading stage, loading the deadlock module and performing non-initialization operation on the deadlock module;
For modules with global variable resource contentions, module initialization processing configuration is removed from configuration files of a Spring framework, and in the Spring starting stage, the modules are only instantiated and some processes are irrelevant to initialization
In operation S440, the deadlock class module is initialized with the newly created Servlet processing class in the Servlet loading phase.
According to the standard J2EE specification, a Servlet processing class is newly added, a module acquisition interface (IOC container acquisition module object instance interface) provided by a Spring framework is provided in the Servlet processing class, corresponding module instances in the operation S420 and the operation S430 are acquired, and then each instance method is serially called in the initialization method of the Servlet processing class.
According to the method and the device, the Spring application starting loading module is decomposed, the initialization operation which possibly causes deadlock in the Spring starting process is stripped off, and the initialization operation is placed into an application Servlet to carry out the time delay processing of module initialization, so that the initialization of a plurality of modules which possibly cause deadlock is operated in a serial mode, and the problem of deadlock caused by concurrent operation of resources is avoided.
Fig. 5 schematically illustrates a flow chart of module classification according to an embodiment of the disclosure.
As shown in fig. 5, the above-mentioned classification of the modules initialized in the Spring loading stage into the deadlock class module and the non-deadlock class module includes operations S510 to S530.
In operation S510, acquiring resource configuration information of the module in the Spring loading stage;
In operation S520, multiplexing information of the global variable resource is obtained according to the resource configuration information;
in operation S530, according to the multiplexing information, the modules in the Spring loading stage are divided into a deadlock module and a non-deadlock module.
According to the embodiment of the disclosure, the modules are classified in the Spring loading stage, so that the modules with the possibility of deadlock are separated, and the deadlock caused in the application starting process is effectively avoided.
According to an embodiment of the present disclosure, the deadlock class module includes a module in which there is a global variable resource contention during the initialization process.
According to an embodiment of the present disclosure, the loading operation includes an initialization operation and a non-initialization operation, wherein the non-initialization operation includes an instantiation operation and a business logic processing operation.
The business logic processing operation comprises business analysis, data operation, context processing and other processing operations.
FIG. 6 schematically illustrates a flow diagram of an initialization deadlock class module according to an embodiment of the disclosure.
As shown in fig. 6, initializing the deadlock class module by using the newly created Servlet processing class in the Servlet loading stage includes operations S610 to S630.
In operation S610, an instance of a deadlock class module that completes the non-initialization operation is obtained using a module object instance interface of the Spring loading stage;
in operation S620, a Servlet processing class is newly created;
In operation S630, the initialization operation of the deadlock class module is completed by using the Servlet processing class to call the instance method of the deadlock class module in series.
According to the method for initializing the deadlock module, the deadlock problem or the resource conflict possibly occurring in the Spring loading stage is stripped, the deadlock module is initialized based on a delay mechanism, the deadlock problem in the module loading process is effectively avoided, meanwhile, the existing Servlet processing class is newly added or reused only by following the J2EE specification, the Spring framework configuration is modified, and the module initialization processing is added in the Servlet processing class.
Fig. 7 schematically illustrates a flow chart of module loading based on a latency mechanism according to an embodiment of the present disclosure.
As shown in fig. 7, application launch is split into launch phase one: spring loading processing stage and starting stage II: servlet loading processing stage. The application using the Spring framework is firstly subjected to Spring loading processing, namely loading processing such as application module instantiation and initialization in an application configuration file; and secondly, the initialization and the instantiation of various servlets are carried out. The two are sequential in time sequence, and the initialization operation of the application modules is carried out in a delayed and serial execution arrangement mode by extracting the initialization operation of part of the application modules into Servlet processing classes, so that the operation time of the same global variable resource can be effectively staggered, and the deadlock among the modules is avoided.
Based on the method for processing the deadlock in the application starting process, the invention also provides a device for processing the deadlock in the application starting process. The device will be described in detail below in connection with fig. 8.
Fig. 8 schematically illustrates a block diagram of a processing apparatus for deadlock during application start-up according to an embodiment of the disclosure.
As shown in fig. 8, the processing apparatus 800 for deadlock in the application start process of this embodiment includes a splitting module 810, a classifying module 820, a loading module 830, and an initializing module 840.
The splitting module 810 is configured to split an application startup process into a Spring loading stage and a Servlet loading stage by using startup information of an application; in an embodiment, the splitting module 810 may be configured to perform the operation S410 described above, which is not described herein;
The classification module 820 is configured to classify the module initialized in the Spring loading stage into a deadlock module and a non-deadlock module; in an embodiment, the classification module 820 may be configured to perform the operation S420 described above, which is not described herein;
The loading module 830 is configured to perform a loading operation on the deadlock module and perform a non-initializing operation on the deadlock module in a Spring loading stage; in an embodiment, the loading module 830 may be configured to perform the operation S430 described above, which is not described herein; and
An initialization module 840, configured to initialize a deadlock class module by using the newly created Servlet processing class in a Servlet loading stage; in an embodiment, the initialization module 840 may be used to perform the operation S440 described above, which is not described herein.
Any of the splitting module 810, the classifying module 820, the loading module 830, and the initializing module 840 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules according to an embodiment of the present disclosure. Or at least some of the functionality of one or more of the modules may be combined with, and implemented in, at least some of the functionality of other modules. At least one of the splitting module 810, the sorting module 820, the loading module 830, and the initialization module 840 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Or at least one of the splitting module 810, the classifying module 820, the loading module 830 and the initializing module 840 may be at least partially implemented as a computer program module which, when executed, may perform the corresponding functions.
The device provided by the embodiment of the disclosure avoids the problem of deadlock of loading of the application module, has the technical effects of simple operation, safety, reliability, low complexity, quick recovery, quick start and the like compared with various devices for processing the problem of deadlock in the prior art, and can meet the aging requirement of application start.
Fig. 9 schematically shows a block diagram of the initialization module according to an embodiment of the present disclosure.
As shown in fig. 9, the initialization module 840 of the deadlock during application start-up of this embodiment includes an acquisition unit 841, a new unit 842, and an initialization unit 843.
An obtaining unit 841, configured to obtain an instance of a deadlock module that completes a non-initialization operation by using a module object instance interface in a Spring loading stage; in an embodiment, the obtaining unit 841 may be configured to perform the operation S610 described above, which is not described herein;
A new unit 842, configured to create the Servlet processing class; in an embodiment, the new creating unit 842 may be used to perform the operation S620 described above, which is not described herein; and
An initialization unit 843, configured to complete an initialization operation of the deadlock module by using an instance method of the Servlet processing module to call the deadlock module in series; in an embodiment, the initialization unit 843 may be used to perform the operation S630 described above, which is not described herein.
Fig. 10 schematically illustrates a block diagram of an electronic device adapted to implement a method of handling deadlocks during application launch according to an embodiment of the disclosure.
As shown in fig. 10, an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. The processor 1001 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 1001 may also include on-board memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 are stored. The processor 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing programs in the ROM 1002 and/or the RAM 1003. Note that the program may be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 1000 may also include an input/output (I/O) interface 1005, the input/output (I/O) interface 1005 also being connected to the bus 1004. The electronic device 1000 may also include one or more of the following components connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 1002 and/or RAM 1003 and/or one or more memories other than ROM 1002 and RAM 1003 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the item recommendation method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of signals on a network medium, distributed, and downloaded and installed via the communication section 1009, and/or installed from the removable medium 1011. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (8)

1. A processing method for deadlock in an application starting process comprises the following steps:
Splitting the application starting process into a Spring loading stage and a Servlet loading stage by using starting information of an application;
Classifying the modules initialized in the Spring loading stage into deadlock type modules and non-deadlock type modules;
In the Spring loading stage, loading the non-deadlock module and performing non-initialization operation on the deadlock module;
initializing the deadlock class module by using the newly built Servlet processing class in the Servlet loading stage;
The method for classifying the modules initialized in the Spring loading stage into deadlock class modules and non-deadlock class modules comprises the following steps:
Acquiring resource configuration information of a module in the Spring loading stage;
acquiring multiplexing information of global variable resources according to the resource configuration information;
according to the multiplexing information, the modules in the Spring loading stage are divided into a deadlock module and a non-deadlock module;
The deadlock class module comprises a module with global variable resource contention in the initialization process.
2. The method of claim 1, wherein the load operation comprises an initialization operation and a non-initialization operation, wherein the non-initialization operation comprises an instantiation operation and a business logic processing operation.
3. The method of claim 1, wherein the initializing the deadlock class module with the newly created Servlet processing class during the Servlet loading phase comprises:
Acquiring an instance of a deadlock class module for completing non-initialization operation by utilizing a module object instance interface of the Spring loading stage;
Newly building the Servlet processing class;
And serially calling the instance method of the deadlock class module by using the Servlet processing class to finish the initialization operation of the deadlock class module.
4. A processing apparatus for deadlock in an application launch process, comprising:
the splitting module is used for splitting the application starting process into a Spring loading stage and a Servlet loading stage by utilizing the starting information of the application;
The classifying module is used for classifying the module initialized in the Spring loading stage into a deadlock module and a non-deadlock module;
The loading module is used for loading the non-deadlock module and performing non-initialization operation on the deadlock module in the Spring loading stage; and
The initialization module is used for initializing the deadlock class module by utilizing a newly built Servlet processing class in the Servlet loading stage;
The method for classifying the modules initialized in the Spring loading stage into deadlock class modules and non-deadlock class modules comprises the following steps:
Acquiring resource configuration information of a module in the Spring loading stage;
acquiring multiplexing information of global variable resources according to the resource configuration information;
according to the multiplexing information, the modules in the Spring loading stage are divided into a deadlock module and a non-deadlock module;
The deadlock class module comprises a module with global variable resource contention in the initialization process.
5. The apparatus of claim 4, wherein the initialization module comprises:
The acquisition unit is used for acquiring an instance of the deadlock class module for completing non-initialization operation by utilizing a module object instance interface of the Spring loading stage;
a new building unit for newly building the Servlet processing class; and
And the initialization unit is used for serially calling the instance method of the deadlock class module by using the Servlet processing class to finish the initialization operation of the deadlock class module.
6. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-3.
7. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-3.
8. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 3.
CN202111558810.5A 2021-12-20 2021-12-20 Processing method and device for deadlock in application starting process Active CN114185623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111558810.5A CN114185623B (en) 2021-12-20 2021-12-20 Processing method and device for deadlock in application starting process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111558810.5A CN114185623B (en) 2021-12-20 2021-12-20 Processing method and device for deadlock in application starting process

Publications (2)

Publication Number Publication Date
CN114185623A CN114185623A (en) 2022-03-15
CN114185623B true CN114185623B (en) 2024-04-19

Family

ID=80605567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111558810.5A Active CN114185623B (en) 2021-12-20 2021-12-20 Processing method and device for deadlock in application starting process

Country Status (1)

Country Link
CN (1) CN114185623B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116149790B (en) * 2023-02-15 2023-11-21 北京景安云信科技有限公司 Method for starting multiple Springboot items based on JVM process reduction

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291558A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of application programming interfaces deadlock monitoring method and device
CN110673887A (en) * 2019-08-15 2020-01-10 华为技术有限公司 Application program starting method and device, terminal equipment and readable storage medium
CN110688171A (en) * 2019-09-26 2020-01-14 深圳市奋源科技有限公司 Plug-in configuration method, device, equipment and storage medium of application program
CN112698930A (en) * 2020-12-31 2021-04-23 中国农业银行股份有限公司 Method, device, equipment and medium for obtaining server identification

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7818370B2 (en) * 2008-05-20 2010-10-19 Bea Systems, Inc. Event server using clustering
US10740537B2 (en) * 2018-11-01 2020-08-11 Dell Products L.P. Enterprise form dependency visualization and management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291558A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of application programming interfaces deadlock monitoring method and device
CN110673887A (en) * 2019-08-15 2020-01-10 华为技术有限公司 Application program starting method and device, terminal equipment and readable storage medium
CN110688171A (en) * 2019-09-26 2020-01-14 深圳市奋源科技有限公司 Plug-in configuration method, device, equipment and storage medium of application program
CN112698930A (en) * 2020-12-31 2021-04-23 中国农业银行股份有限公司 Method, device, equipment and medium for obtaining server identification

Also Published As

Publication number Publication date
CN114185623A (en) 2022-03-15

Similar Documents

Publication Publication Date Title
JP6437579B2 (en) Intelligent GPU scheduling in virtualized environment
US8826276B1 (en) Multi-threaded virtual machine processing on a web page
CN113312037A (en) Data processing method, device and equipment applied to microservice and storage medium
US10719347B2 (en) Control apparatus, container starting method, and program
CN113946425A (en) Service processing method and device, electronic equipment and computer readable storage medium
US8938490B2 (en) System and method for accessing mainframe system automation from a process automation application
CN114185623B (en) Processing method and device for deadlock in application starting process
CN111427579A (en) Plug-in, application program implementing method and system, computer system and storage medium
CN110609755A (en) Message processing method, device, equipment and medium for cross-block chain node
US20160026511A1 (en) Method, apparatus and system for acquiring input events
CN113051049B (en) Task scheduling system, method, electronic device and readable storage medium
CN112529711B (en) Transaction processing method and device based on block chain virtual machine multiplexing
CN108089895B (en) Activity registration method and device in plug-in, electronic equipment and storage medium
US20160239283A1 (en) Software product release automation framework
CN111124523A (en) Method and apparatus for initializing applications
CN115373822A (en) Task scheduling method, task processing method, device, electronic equipment and medium
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium, and program product
US10713085B2 (en) Asynchronous sequential processing execution
CN115129438A (en) Method and device for task distributed scheduling
CN112214287A (en) Service control method and device of application software and electronic equipment
CN113032039B (en) Plug-in transformation method and device for application, electronic equipment and storage medium
CN117112075B (en) Method and system for automatically converting timed task applications into serverless functions
CN118152364A (en) Database transformation method, device, equipment, medium and program product
Kukushkin et al. Daddy: Data Dependancy Graphs in Serverless Computations
CN117472538A (en) Multithreading task scheduling method and device, electronic 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