Application program execution method

By employing a reuse process management unit to identify and utilize previously executed processes, the method addresses inefficiencies in process generation, thereby improving system response performance and reducing processing time.

JP7595553B2Active Publication Date: 2024-12-06MITSUBISHI ELECTRIC CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021191667
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-12-06
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Existing methods for generating application processes in an operating system environment are inefficient, particularly when multiple processes of the same type need to be created, leading to increased processing time and reduced system response performance.

Method used

A method that utilizes a reuse process management unit to retain and reuse previously executed application processes, allowing for quicker process generation by checking for available reusable processes before creating new ones, and initializing necessary data areas.

Benefits of technology

This approach significantly reduces process generation time and enhances system response performance by leveraging existing processes, making it applicable to various operating systems including UNIX-based systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007595553000001
    Figure 0007595553000001
  • Figure 0007595553000002
    Figure 0007595553000002
  • Figure 0007595553000003
    Figure 0007595553000003
Patent Text Reader

Abstract

To solve the problem in which: when execution of an application program (APL) terminates, a process for managing execution units in an operating system (OS) is deleted, and it is necessary to perform generation processing such as securing a memory area once again even though the same process exists when executing a next APL.SOLUTION: When APL execution terminates, a process is retained in a main storage device as a reuse process without the process being deleted. When executing a next APL, using the reuse process shortens time to generate the process and enhances response performance during the APL execution.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] Original Application Is A The present invention relates to an application program execution method. [Background technology]

[0002] When an application program (APL) is executed in a computer system equipped with an operating system (OS), the OS creates a process, which is the execution unit of the APL, in the main memory and manages the execution state of the APL.

[0003] The process creation process involves processes such as program loading and logical address space creation. The program loading process requires access to an external storage device, and the creation of logical address space requires the creation of a page table structure, which results in a large processing load. For this reason, many operating systems reduce I / O by using a buffer cache for program loading, and reduce the processing load by using demand paging for logical address space creation.

[0004] One method that is used to reduce the impact of APL execution on system response speed is to configure the system so that the APL is executed in advance and put into standby, and then activated when necessary. In this case, the source code must be modified to change the APL processing, but this is difficult to apply when the source code is not available for APL execution.

[0005] Therefore, in order to reduce the processing time required for process generation when an APL is executed, in an environment in which the same APL is executed multiple times, when generating and processing multiple processes, rather than creating them individually, a method is known in which one process is created and then any number of copies of that process are made to realize the generation processing of multiple processes, thereby reducing the process generation processing time and speeding up the execution of the APL (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0006] [Patent Document 1] Japanese Patent Application Publication No. 5-233307 Summary of the Invention [Problem to be solved by the invention]

[0007] However, the method of Patent Document 1 has a problem in that the process generation processing time can be reduced only when multiple processes are generated from the same APL.

[0008] The present application has been made to solve the problems described above, and aims to provide a computer system that can shorten the process generation processing time without being affected by the process generation status, and an APL execution method that improves the response performance when executing APL in a computer system equipped with an OS. [Means for solving the problem]

[0010] Books The application program execution method disclosed in the application is a method that includes a processor and a main memory device, and executes an application program by generating a process as an execution unit using an operating system, and stores the process used during execution of the application program in the main memory device when the execution of the application program ends, and reuses the stored process the next time the application program is executed. The method includes the steps of: issuing a system call when the next application program is executed; searching whether or not the held process is available to the application program that issued the system call after issuing the system call; reserving a reusable process if the process is available; and initializing at least a data area and process management data of the reusable process. Characterized by 。 Effect of the Invention

[0011] The present application discloses A According to the PL execution method, the process generation processing time can be shortened without being affected by the process generation status, and the response performance during APL execution in a computer system equipped with an OS can be improved. [Brief description of the drawings]

[0012] [Figure 1] FIG. 2 is a conceptual diagram illustrating an APL execution method according to the first embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a hardware configuration of a computer according to a first embodiment. [Diagram 3] FIG. 11 is a diagram illustrating a process generation process of an APL according to a comparative example. [Figure 4] FIG. 2 is a diagram for explaining processing of an APL according to the first embodiment. [Diagram 5] 5 is a flowchart showing a process generation process when an APL is executed according to the first embodiment. [Figure 6] FIG. 11 is a diagram for explaining processing of a fork( ) system call according to the second embodiment. [Figure 7] 13 is a flowchart showing a process generation process when a fork( ) system call is executed according to the second embodiment. [Figure 8] FIG. 13 is a diagram for explaining processing of an execve() system call according to the third embodiment. [Figure 9] 13 is a flowchart showing a process generation process when an execve() system call is executed according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, preferred embodiments of the computer system and APL execution method according to the present application will be described with reference to the drawings. Note that the same reference numerals are used for the same contents and corresponding parts, and detailed descriptions thereof will be omitted. In the following embodiments, the same reference numerals are used to designate the same components, and redundant descriptions will be omitted.

[0014] Embodiment 1 1 is a conceptual diagram for explaining an APL execution method according to the first embodiment. When an APL is executed, a reuse process search is performed on a reuse process management unit 100 existing in a main storage device 202, which will be described below, to check whether a reuseable process 101 exists. If a reuseable process exists, it is reused, and the process generation process is omitted, thereby shortening the processing time required for APL execution.

[0015] In order to reuse the process, the reuse process 101 is registered in the reuse process management unit 100 when the APL execution is completed.

[0016] An example of the hardware configuration of a computer for executing APL is shown in Fig. 2. The computer 200 includes a processor 201, a volatile storage device (main storage device 202) such as a random access memory, and a non-volatile auxiliary storage device (external storage device 203) such as a flash memory. A hard disk may be included instead of the flash memory. The processor 201 reads an executable file in the external storage device 203 into the main storage device 202. This enables the processor 201 to access the data in the file. Then, a process is created on the main storage device 202. The computer 200 here includes a large-scale computer (such as a server or laptop), a microcomputer, and the like.

[0017] As a comparative example, Figure 3(a) shows the generation of a process when an APL is executed. In this example, the OS generates a process when an APL is executed and manages the execution of the APL. The process is generated in the following steps: (1) Issuing a system call to execute APL (2) Load the APL executable file from the external storage device into the main storage device. (3) Allocating area on main memory for process management data (4) Logical address space generation (5) Each area of ​​APL is mapped to a logical address space. (6) Initializing each area (7) Register the process to the scheduler

[0018] In this comparative example, as shown in Fig. 3(b), when APL execution is terminated, the process is deleted. Therefore, since the process is deleted without being reused, if the same process as the deleted one is required for the next APL execution, the above steps (1) to (7) must be repeated to generate the process from scratch.

[0019] 4 is a diagram for explaining the processing of an APL in the first embodiment. Assume that APL_X 401, which is already running, issues a system call for executing an APL and starts executing APL_Y 402. At this time, it is assumed that the system call issued by APL_X 401 is provided with information for identifying APL_Y 402. APL_X 401 and APL_Y 402 may be the same type or different types of APL.

[0020] 5 is a flowchart showing the process generation processing when an APL is executed in the first embodiment. After a system call for executing an APL is issued, the reuse process management unit 100 is accessed to search for a usable reuse process 101 (step S501). The processing executed in the search is to confirm whether a reuse process 101 of the type of APL to be executed (APL_Y402 in FIG. 4) exists. For example, if only the reuse process 101 of APL_X401 exists in the reuse process management unit 100, speedup by reuse cannot be achieved when APL_Y402 is executed.

[0021] If there is a usable reuse process 101, the corresponding reuse process 101 is secured by the reuse process management unit 100 (step S502). At this time, the BSS (Block Started by Symbol) size, which is one of the memory areas of the secured reuse process 101, may differ from the initial size, so it is changed to the initial size (step S503).

[0022] If there is no available reuse process, the APL is read from the external storage device 203 onto the main storage device 202 (step S504), an area is allocated on the main storage device 202 for process management data (step S505), a logical address space is generated on the main storage device 202 (step S506), a text area, a data area, a BSS area, and a user stack area are allocated and associated with the logical address space (step S507), and the text area is initialized (step S508).

[0023] Regardless of whether the reusable process 101 is used or not, the data area, the BSS area, and other process management data are initialized (step S509), and the APL to be executed is registered in the process scheduler (step S510), and execution of the APL to be executed is started.

[0024] As described above, according to this embodiment, the reuse process management unit makes it possible to register and search for reuse processes, and by using the reuse processes managed by the reuse process management unit, the time required for process generation can be shortened.

[0025] Embodiment 2 6 is a diagram for explaining system call processing according to the second embodiment. This is a case where the fork() system call is used, which is a process generation method for UNIX (registered trademark)-based OSs that are widely used as general-purpose OSs. In the process generation processing using the fork() system call, a new APL_X process 602 is copied from the APL_X process 601 that issued the fork().

[0026] 7 is a flowchart showing the process generation processing when a fork() system call is executed in the second embodiment. After the fork() system call is issued, the reusable process management unit 100 is accessed to check whether there is a usable reusable process 101 (step S501). The processing executed in the check is to check whether there is a reusable process of the same type as the process that issued the fork() system call. If there is a usable reusable process, the corresponding reusable process is secured from the reusable process management unit (step S502). At this time, the BSS size of the secured reusable process may differ from the initial size, so it is changed to the initial size (step S503).

[0027] If there is no reusable process, the original processing of the fork() system call is performed. Specifically, an area for process management data is secured on the main memory device 202 (step S505), a logical address space is generated (step S506), a data area, a BSS area, and a user stack area are secured on the main memory device 202, and the text area, the data area, the BSS area, and the user stack area are associated with the logical address space (step S507). Note that no generation processing is performed for the text area, since it is shared with the process that issued the fork().

[0028] After that, regardless of whether a reusable process is used or not, the data area, BSS area, and other process management data are copied from the process that issued the fork() (step S701), registered in the process scheduler (step S510), and execution of the APL process copied by fork() is started.

[0029] As described above, according to this embodiment, the time required for creating a process by fork( ) can be reduced by using a usable reusable process registered in the reusable process management unit.

[0030] Embodiment 3 8 is a diagram for explaining the processing of a system call according to the embodiment 3. As in the embodiment 2, this is a case where the fork()+execve() system call is used, which is a process generation method of UNIX-based OSs that are widely used as general-purpose OSs.

[0031] Process creation using the fork() + execve() system calls involves duplicating a new APL_X process (802) from the APL_X process (801) that issued the fork(), and the duplicated APL_X (802) issues an execve() to change the type of APL_X (802) to APL_Y (803), a different type of APL. Note that the speed of fork() processing can be increased by the method described in the second embodiment.

[0032] 9 is a flowchart showing the process generation processing when the execve() system call is executed in embodiment 3. The fork() processing is the same as in embodiment 2, and therefore will not be described.

[0033] After the execve() system call is issued, the reusable process management unit 100 is accessed to check whether there is a usable reusable process 101 (step S501). The process executed in the check is to check whether the APL type process to be executed by execve() is held in the reusable process management unit 100 as a reusable process.

[0034] If a usable reuse process is found, the corresponding reuse process 101 is secured by the reuse process management unit 100 (step S502). Next, in order to exchange the reuse process 101 with the process that issued execve(), the process that issued execve() is registered as the reuse process 101 in the reuse process management unit 100 (step S901). Next, the size of the BSS area of ​​the secured reuse process is changed to the initial size of the APL.

[0035] If there is no reusable reuse process 101, the original processing of the execve() system call is performed. Specifically, the APL to be executed by the execve() system call is read (step S504), the text area, data area, and BSS area of ​​the process that issued the execve() system call are released from the logical space addresses (step S902), and the text area, data area, and BSS area of ​​the read APL are created and associated with the logical address space (step S903). After that, the contents of the text area are initialized (step S508).

[0036] Thereafter, regardless of whether a reusable process is being used or not, the data area, the BSS area, and other process management data are initialized (step S509), and the APL to be executed starts to be executed.

[0037] As described above, according to this embodiment, the time required for process creation by execve() can be reduced by using the available reusable processes registered in the reusable process management unit. Furthermore, by using the reusable processes described in the second embodiment for fork(), it becomes possible to generate a process in a shorter time for the fork()+execve() system call.

[0038] Although the present application describes various exemplary embodiments and examples, the various features, aspects, and functions described in one or more embodiments are not limited to application to a particular embodiment, but may be applied to the embodiments alone or in various combinations. Therefore, countless modifications not exemplified are assumed within the scope of the technology disclosed in the present specification, including, for example, modifying, adding, or omitting at least one component, and further, extracting at least one component and combining it with a component of another embodiment. [Explanation of symbols]

[0039] 100: reuse process management unit, 101: reuse process, 200: computer, 201: processor, 202: main memory device, 203: external memory device.

Claims

1. In an application program execution method comprising a processor and a main storage device, an operating system is used to generate a process as an execution unit and execute the application program, the process used during execution of the application program is stored in the main storage device when the execution of the application program ends, and the stored process is reused when the application program is next executed, a step of issuing a system call when the next application program is executed; a step of searching, after the system call is issued, whether or not the retained process is available to the application program which issued the system call; a step of reserving a reusable process if the process is available; and a step of initializing at least a data area and process management data of the reusable process.

2. 2. The application program execution method according to claim 1, characterized in that when the next application program is fork(), instead of initializing the data area and the process management data, at least the data area and the process management data are copied from the process which issued fork().

3. 2. The method for executing an application program according to claim 1, further comprising the step of, when the next application program is execve(), registering the process that issued execve() as a reusable process in order to exchange the reusable process with the process that issued execve() after securing a reusable process.

Citation Information

Patent Citations

  • Information processing apparatus, memory management apparatus and program

    JP2005301801A

  • Program execution device, program, and program execution method

    JP2019096271A

  • JP233307A

  • Initial Data Distribution for Different Application Processes

    US20210103446A1