APPLICATION PROGRAM STARTUP METHOD AND APPARATUS
First Claim
1. An application program startup method, comprising:
- loading, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, wherein the prefetch data comprises at least one file block corresponding to at least one page fault occurred during a history startup process of the application program; and
loading code of the application program to start up the application program;
wherein prior to loading, upon receiving an instruction for starting up an application, prefetch data corresponding to the application program, analyzing the history startup process of the application program to obtain the prefetch data corresponding to the application program during the history startup process; and
wherein the analyzing history start process of the application program to obtain the prefetch data corresponding to the application program during the history startup process specifically comprising;
obtaining at least one mapped file list loaded and the virtual address of the at least one page fault occurred during the history startup process of the application program;
calculating the file offset corresponding to each virtual address according to the at least one mapped file list and the at least one virtual address; and
combining, according to the file offset corresponding to each virtual address, file blocks corresponding to the file offset corresponding to the at least one virtual address to obtain the prefetch data corresponding to the application program.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention, pertaining to the field of computer technologies, discloses an application startup method and apparatus. The method includes: loading, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, where the prefetch data includes at least one file block corresponding to at least one page fault occurred during a history startup process of the application program; and loading code of the application program to start up the application program. The apparatus includes: a prefetch data loading module and a code loading module. According to the present invention, the number of page faults occurred during the startup process of the application program because a process cannot be mapped to a valid physical page when accessing a virtual page is greatly reduced. Further, since before the code of the application program is loaded, instead of all file blocks during the initial startup of the application program, only the file block(s) corresponding to page fault(s) is loaded, frequent memory page flipping and file flipping during the loading process of the application program are mitigated, and startup speed and startup efficiency of the application program are improved.
24 Citations
10 Claims
-
1. An application program startup method, comprising:
-
loading, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, wherein the prefetch data comprises at least one file block corresponding to at least one page fault occurred during a history startup process of the application program; and loading code of the application program to start up the application program; wherein prior to loading, upon receiving an instruction for starting up an application, prefetch data corresponding to the application program, analyzing the history startup process of the application program to obtain the prefetch data corresponding to the application program during the history startup process; and wherein the analyzing history start process of the application program to obtain the prefetch data corresponding to the application program during the history startup process specifically comprising; obtaining at least one mapped file list loaded and the virtual address of the at least one page fault occurred during the history startup process of the application program; calculating the file offset corresponding to each virtual address according to the at least one mapped file list and the at least one virtual address; and combining, according to the file offset corresponding to each virtual address, file blocks corresponding to the file offset corresponding to the at least one virtual address to obtain the prefetch data corresponding to the application program. - View Dependent Claims (4, 5)
-
-
2. (canceled)
-
3. (canceled)
-
6. An application program startup apparatus, comprising:
-
a prefetch data loading module, configured to load, upon receiving an instruction for starting up an application program, prefetch data corresponding to the application program, wherein the prefetch data comprises at least one file block corresponding to at least one page fault occurred during a history startup process of the application program; a code loading module, configured to load code of the application program to start up the application program; and a prefetch data obtaining module, configured to analyze the history startup process of the application program to obtain the prefetch data corresponding to the application program during the history startup process, wherein the prefetch data obtaining module comprises; an obtaining unit, configured to obtain at least one mapped file list loaded and the virtual address of the at least one page fault occurred during the history startup process of the application program; an offset calculating unit, configured to calculate the file offset corresponding to each virtual address according to the at least one mapped file list and the at least one virtual address; and a prefetch data obtaining unit, configured to combine, according to the file offset corresponding to each virtual address, file blocks corresponding to the file offset corresponding to the at least one virtual address to obtain the prefetch data corresponding to the application program. - View Dependent Claims (9, 10)
-
-
7. (canceled)
-
8. (canceled)
Specification