Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Multithreading preloading method for class library in Java virtual machine

A java virtual machine and preloading technology, applied in the direction of program loading/starting, program control devices, etc., can solve the problems of long boot process and large amount of basic resources, and achieve the effect of improving loading speed and operating efficiency

Inactive Publication Date: 2014-05-14
BEIHANG UNIV
View PDF4 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the problems that the amount of basic resources preloaded by the current class loader is large and the booting process is long, the present invention proposes a multi-thread preloading method for a class library in a Java virtual machine

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Multithreading preloading method for class library in Java virtual machine
  • Multithreading preloading method for class library in Java virtual machine
  • Multithreading preloading method for class library in Java virtual machine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] The present invention will be further described in detail with reference to the accompanying drawings and embodiments.

[0017] The working principle of the present invention is as figure 1 shown. The running process of the virtual machine will follow the figure 1 Execute the process given in , and the generation method of the preload list is according to figure 2 The process shown is carried out. After obtaining the list of allocated preloaded classes, you can use image 3 The method given in is loaded. exist figure 1 the dashed part, and figure 2 and 3 The proposed method and execution mechanism are original creations of the present invention.

[0018] figure 1 The main process of multi-threaded loading of the class library in the Java virtual machine is given in . The part within the range of the dotted line is the optimization process. After the hardware has started and completed, the process of the multi-thread preloading method of the class library in...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a multithreading preloading method for a class library in a Java virtual machine. The method comprises the steps that firstly, the class library is connected to generate a preloading list, and the preloading list comprises classes needing to be preloaded when the virtual machine is operated; then, the classes in the preloading list are averagely distributed to all threads according to the number of the threads, meanwhile, the threads are started, the classes in the list are loaded in an internal memory, and static variables in the classes are initialized; finally, the preloaded classes are stored in a shared memory resource. According to the method, the classes which need to be loaded many times or must reside in the memory when a Java program operates are screened and recorded, the preloaded class library is automatically adjusted along with an application program and the change of user use habits, and the operating efficiency of the Java program is effectively improved. Meanwhile, the classes in the preloading list are synchronously loaded through multithreading, and the loading speed of the class library in the starting stage of the Java virtual machine is effectively improved.

Description

technical field [0001] The invention relates to a class loading technology in a Java virtual machine, in particular to a class preloading method in a mobile phone system Java virtual machine. Background technique [0002] The class loader is mainly responsible for querying and loading class files in the virtual machine. The class loader loads the data structure of the class during the running process by analyzing the binary file, and then calls it, and loads and connects all superclasses and interfaces between superclasses in the class at the same time. When a virtual machine needs to load a class, the class loader will search for the bytecode file corresponding to the class, then load the bytecode file, extract the required data information and store it in memory. [0003] The Java virtual machine running on the mobile phone, such as the Dalvik virtual machine under the Android system, is preloaded when the device is turned on, and all basic classes are loaded into the mem...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/445
Inventor 赵胜男史晓华范礼阳杨海燕
Owner BEIHANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products