Calculation device, method for operating a program

The arithmetic unit efficiently manages real-time programs in a general-purpose operating system by generating temporary processes to support quick startup and termination, addressing inefficiencies in existing RTOS systems.

JP7717482B2Active Publication Date: 2025-08-04HITACHI LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021069512
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-04-16
Publication Date
2025-08-04
Estimated Expiration
2041-04-16

AI Technical Summary

Technical Problem

Existing real-time operating systems (RTOS) face challenges in efficiently managing programs that require real-time processing within a general-purpose operating system, particularly during program startup and termination, leading to inefficiencies in resource allocation and processing time.

Method used

An arithmetic unit with a high-speed memory, non-real-time operating system, background program, and management program that generates temporary processes to associate with management target programs, allowing quick startup and termination without creating new processes, utilizing a CPU with multiple cores for efficient resource management.

Benefits of technology

Enables rapid initiation and termination of real-time programs by pre-creating temporary processes, optimizing resource allocation and reducing the impact on existing programs, thus enhancing processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007717482000001
    Figure 0007717482000001
  • Figure 0007717482000002
    Figure 0007717482000002
  • Figure 0007717482000003
    Figure 0007717482000003
Patent Text Reader

Abstract

To quickly start processing by a program.SOLUTION: An arithmetic device comprises: a memory; a nonvolatile storage medium for storing a non-real-time OS, managed programs that cannot be simultaneously started, a background program for executing the managed program, and a management program for managing the managed program; and a central processor for executing the OS, managed program, background program, and management program. The background program generates one or a plurality of temporary processes to be carried out by the OS and stores the managed program in the memory, selects a selection process, which is one of the temporary processes, and associates the selected selection process with the managed program stored in the memory. The management program causes the managed program associated with the selection process to operate without generating a new process, when a command for activating the managed object program is received.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an arithmetic device and an operation method of a program.

Background Art

[0002] Real-time operating systems are preferred in industrial fields because they can run programs within a certain time period. On the other hand, since there are constraints in real-time operating systems, there is a demand to run programs within a certain time period in general-purpose operating systems.Patent Document 1 discloses an RTOS simulation method that realizes an RTOS on a general-purpose development machine such as a workstation (WS) or a PC using a general-purpose OS such as UNIX (registered trademark) or Windows (registered trademark). Based on the real time of the general-purpose OS, a timer function (real-time timer function) that periodically generates signals at specified time intervals and a timer function (process-relative time timer function) that periodically generates signals at specified time intervals based on the CPU allocation time for a process are efficiently used and properly utilized to realize the time management of the RTOS. At the time of RTOS startup, a startup timer setting step of setting to generate a signal at regular intervals based on the CPU allocation time using the process-relative time timer function; when a system call that involves a transition to a WAITING state or a SUSPENDED state where the user task waits for the occurrence of some event is issued, a timer switching execution determination step of determining whether the generated task switch is a task switch from a normal user task to a special task (idle task) that means an idle state; in the timer switching execution determination step, when it is determined that it is a task switch from a normal user task to an idle task, stopping the activated timer function and setting to generate a signal at regular intervals based on the real time using the real-time timer function; a second timer switching execution determination step of determining, when a task switch is necessary and it is a task switch from an idle task to a normal user task, after the end of each interrupt handler process at the time of signal generation; and in the second timer switching execution determination step, when it is determined that a task switch is necessary and it is a task switch from an idle task to a normal user task, stopping the activated timer function and setting to generate a signal at regular intervals based on the CPU allocation time using the process-relative time timer function. An RTOS simulation method characterized by having the above is disclosed.

Prior Art Documents

Patent Documents

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2006-163983 [Summary of the Invention] [Problems to be Solved by the Invention]

[0004] In the invention described in Patent Document 1, there is room for improvement in the processing at the time of program startup. [Means for Solving the Problems]

[0005] The arithmetic unit according to the first aspect of the present invention includes a memory that can be read from and written to at high speed, an operating system (OS) that does not support real-time processing, a management target program that cannot be started simultaneously in multiple instances, a background program that executes the management target program, a non-volatile storage device that stores the management program for managing the management target program, and a central processing unit that executes the OS, the management target program, the background program, and the management program. The background program generates one or more temporary processes by the OS and stores the management target program in the memory, selects a selected process that is one of the temporary processes, and associates it with the management target program stored in the memory. When the management program receives a command to start the management target program, it operates the management target program associated with the selected process without generating a new process. The background program further secures a management area which is an area in the memory, and the selection process further acquires a part of the management area . A method for operating a program according to a second aspect of the present invention is a method for operating a program executed by an arithmetic unit including a memory capable of high-speed reading and writing, an operating system (OS) that does not support real-time processing, a management target program that cannot be started simultaneously in plurality, a background program that executes the management target program, a non-volatile storage device that stores a management program for managing the management target program, and a central processing unit that executes the OS, the management target program, the background program, and the management program. The background program generates one or more temporary processes by the OS and stores the management target program in the memory, selects a selected process that is one of the temporary processes, and associates it with the management target program stored in the memory. When the management program receives a command to start the management target program, the management program operates the management target program associated with the selected process without generating a new process. See , The background program further includes securing a management area which is an area in the memory, and the selection process further includes acquiring a part of the management area .

Advantages of the Invention

[0006] According to the present invention, processing by a program can be started quickly.

Brief Description of the Drawings

[0007]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Mode for Carrying Out the Invention

[0008] - First Embodiment - Hereinafter, a first embodiment of the arithmetic unit will be described with reference to FIGS. 1 to 10.

[0009] FIG. 1 is a hardware configuration diagram of the arithmetic unit 1. The arithmetic unit 1 includes a CPU 11 which is a central processing unit, a ROM 12 which is a read-only storage area, a RAM 13 which enables high-speed reading and writing, a communication device 14 which communicates with the outside of the arithmetic unit 1, and a storage device 17 which is a non-volatile storage device. The CPU 11 has a plurality of arithmetic cores including an RT core 11A and a management core 11B. The CPU 11 may be a single hardware having a plurality of arithmetic cores, or may be a plurality of hardwares having a single arithmetic core.

[0010] The ROM 12 is, for example, a mask ROM, an EPROM (Erasable Programmable Read Only Memory), or an EEPROM (Electric Erasable Programmable ROM). The RAM 13 is, for example, a DRAM (Dynamic RAM). The communication device 14 is, for example, a communication module corresponding to IEEE802.3 or a wireless communication module corresponding to IEEE802.11. The storage device 17 is, for example, a flash memory or a hard disk drive.

[0011] FIG. 2 is a diagram showing information stored in the storage device 17. However, it is not essential that all the information described below be stored in the storage device 17, and a part of them may be stored in the ROM 12. The storage device 17 stores a background program 2, a management table 3, a management program 4, an execution program 5, a hook 7, an OS 8, a first program 91, and a second program 92. Hereinafter, the first program 91 and the second program 92 are collectively referred to as a management target program 9. The background program 2, the management program 4, the execution program 5, the hook 7, the OS 8, the first program 91, and the second program 92 are developed and executed by the CPU 11 in the RAM 13.

[0012] In this embodiment, since the processing related to the start and end of the management target program 9 is mainly described, the management target program 9 and the execution program 5 are described in units of processes rather than units of programs. The background program 2, the management program 4, and the OS 8 do not end within the scope described in this embodiment, so these processes are not particularly described.

[0013] The OS 8 is an operating system and may or may not have real-time effectiveness. That is, the OS 8 may be a real-time OS or a non-real-time OS. The management table 3 stores information related to the first program 91 and the second program 92, which are management target programs 9 for which the background program 2 manages operations. The detailed configuration of the management table 3 will be described later.

[0014] The programs to be managed 9, namely the first program 91 and the second program 92, are required to operate periodically within a predetermined time interval. In the present embodiment, operating periodically within a predetermined time interval is referred to as "real-time operation". Also, each of the programs to be managed 9 does not start up constantly, but its startup and termination are repeated. Further, each of the programs to be managed 9 cannot operate simultaneously for purposes such as ensuring the integrity of the system. Note that in the present embodiment, the programs to be managed 9 include two programs, but the programs to be managed 9 may be one or three or more. The programs to be managed 9 are executed in the RT core 11A or the management core 11B as will be described later.

[0015] The background program 2 is a program that constantly operates in the arithmetic unit 1, so-called "daemon" or "service". The background program 2 operates based on the information described in the management table 3. The management program 4 is middleware or a library and processes system calls related to the programs to be managed 9. The background program 2 and the management program 4 realize the real-time operation of the programs to be managed 9 in the OS 4 that does not have real-time effectiveness. The background program 2 is always executed in the management core 11B.

[0016] The process of the execution program 5 is generated by the background program 2 and executes the first program 91 or the second program 92 based on an instruction from the background program 2. Since the process of the execution program 5 is temporarily created for the purpose of executing the first program 91 or the second program 92, hereinafter, the process of the execution program 5 will also be referred to as a "temporary process". The background program 2 uses the "fork", which is a system call of the OS 8, to generate the process of the execution program 5, but the "fork", which is a system call, is not used for the execution of the first program 91 or the second program 92 by the execution program 5. Details will be described later.

[0017] Hooker 7 is a library that hooks the read operations from each application to the OS 8. Specifically, Hooker 7 changes system calls to calls to the management program 4 through symbol wrapping. Hooker 7 hooks at least Fork, Exit, and Abort to call the management program 4. The management program 4 performs special processing described later only when Fork, Exit, and Abort target the managed program 9, and issues system calls to the OS 8 when other programs are targeted.

[0018] (Management Table) Figure 3 is a diagram showing an example of the management table 3. The management table 3 is composed of a plurality of records, and each record has fields of management number 31, storage location 32, entry point 33, status 34, resources 35, and assigned PID 36. In a state where the arithmetic unit 1 is not operating, only the fields of management number 31 and storage location 32 are described in the management table 3. Or even if some information is stored in other fields of the management table 3, the information of entry point 33, status 34, resources 35, and assigned PID 36 is erased by the initialization process at the startup of the arithmetic unit 1.

[0019] The management number 31 stores the identifier of the program that the background program 2 manages the operation of. The storage location 32 stores the information of the location where the program is stored, in other words, the absolute path of the program. In the example shown in Figure 3, "task1.bin" is, for example, the first program 91, and "task2.bin" is the second program 92. The entry point 33 stores the address of the RAM 13 where the program is stored and the address of the RAM 13 where the operation of the program starts. The address of the RAM 13 where the operation of the program starts is, for example, the address where the code corresponding to the main function of the C language is stored. However, if this program has not been stored in the RAM yet, no address is entered in the entry point.

[0020] In state 34, information indicating the state of the program is stored. In resource 35, information on the resources allocated to the program, specifically the size and starting address of RAM 13, is stored. In the allocated PID 36, the process ID of the execution program 5 that operates the program of that record, in other words, the process ID of the temporary process corresponding to that program, is stored. However, if the temporary process that operates the program of that record has not yet been determined, the allocated PID 36 is blank.

[0021] Specifically describe the first record shown in Figure 3. This first record shows that the program with the management number "T1" is stored at the absolute path position of " / bin / task1.bin", this program has already been stored in RAM 13, and the entry point is "0x0f0001". Furthermore, the current state is "ABORTING", the RAM 13 allocated to this program is a "64kb" area starting from "0xf10001", and it is shown to correspond to a temporary process with a process ID of "1234".

[0022] (Process state) Figure 4 is a diagram showing the transition of the process state in this embodiment. The management program 4 manages the process of the execution program 5 in any state. Among the states shown in Figure 4, DORMANT, READY, RUNNNIG, WAIT, and SUSPEND shown in light hatching are states in general process management. In addition to this, in this embodiment, the states of PRE-DORMANT, REGISTERTED, ABORTING, ABORTED, and EXITING are added. Here, mainly the states added in this embodiment will be described.

[0023] PRE-DORMANT is the initial state when a temporary process is created. It transitions from the PRE-DORMANT state to the DORMANT state. From the DORMANT state, it transitions to the REGISTERED state. The REGISTERED state is the state where preparations for executing the managed program 9 in the temporary process are complete. The temporary process waits in the REGISTERED state and transitions to the READY state when the startup of the corresponding managed program 9 is instructed. Also, from any of the states READY, RUNNNIG, WAIT, and SUSPEND, it returns to the REGISTERD state by the "_EXIT" system call.

[0024] Explanation of each state of READY, RUNNNIG, WAIT, and SUSPEND is omitted. From each state of READY, RUNNNIG, WAIT, and SUSPEND, it transitions to REGISTERD by the "_EXIT" system call and transitions to ABORTING by the "_ABORT" system call. It transitions from the ABORTING state to the ABORTED state. It transitions from the ABORTED state to the EXITING and REGISTERED states.

[0025] (Overview of operations) The background program 2 creates a plurality of temporary processes that are processes of the execution program 5. The state of the temporary process at this time is PRE-DORMANT. Next, the background program 2 secures resources, reads each binary described in the management table 3 into the RAM 4, registers the entry point of each binary in the entry point 33 of the management table 3, and transitions to REGISTERED. The background program 2 performs startup processing, termination processing, and generation processing in response to the occurrence of events. Details will be described later.

[0026] When the program 9 to be managed is launched in the environment of OS8, the hook 7 transmits "_Fork" as middleware to the management program 4 instead of the system call "Fork". The management program 4 changes the state of the temporary process corresponding to the program 9 to be managed, which is the target of "_Fork", from "REGISTERED" to "READY", and starts the execution of the program 9 to be managed, which is the target of "_Fork", by calling the entry point in that temporary process.

[0027] When the temporary process starts the execution of the program 9 to be managed, it secures the resources for the program 9 to be managed. When the program 9 to be managed further executes an instruction to secure resources, the management program 4 hooks this call and allocates a part of the area of the RAM 13 secured by the background program 2. At this time, the background program 2 describes the size of the allocated RAM 13 and the starting address of the RAM 13 in the resource 35 of the management table 3.

[0028] When the temporary process outputs the system call "EXIT" when it finishes processing, the hook 7 receives it and outputs "_EXIT" to the management program 4. The management program 4 first moves the temporary process that output "EXIT" from the RT core 11A to the management core 11B and transitions the state of the temporary process to "ABORTING". Next, the management program 4 releases the resources for the program 9 to be managed used by that temporary process and transitions the state of the temporary process to "ABORTED". Then, the management program 4 outputs a system call to end the temporary process to the OS8 and transitions the state of the temporary process to "EXITING". When another process outputs the system call "ABORT" to the temporary process, the same processing as above is also performed.

[0029] FIG. 5 is a flowchart showing the operation of the background program 2. As described above, the background program 2 is executed in the management core 11B. First, in step S301, the background program 2 forks itself to generate processes of a plurality of execution programs 5, that is, temporary processes, and further sets a timer for generating a timer event after a predetermined time.

[0030] The reason for generating not only one but a plurality of processes here is that there are a plurality of programs to be managed 9 and it is necessary when the programs to be managed 9 repeatedly end and start in a short time. Also, as described above, the background program 2 operates in the management core 11B, and the generated temporary processes also operate in the management core 11B.

[0031] In the subsequent step S302, the background program 2 secures resources, that is, secures a memory area. This resource securing is realized by a system call to the OS 8. Hereinafter, the area of the RAM 4 secured in this step is also referred to as the "management area".

[0032] In the subsequent step S303, the background program 2 reads the management table 3. In the subsequent step S304, the background program 2 determines whether all the records of the management table 3 read in step S303 have been processed. If the background program 2 determines that all have been processed, it proceeds to step S309, and if it determines that there are unprocessed records, it proceeds to step S305.

[0033] In step S305, the background program 2 selects one unprocessed record included in the management table 3 read in step S303. In the subsequent step S306, the background program 2 reads the binary indicated by the storage location 32 of the record selected in step S305 into the memory area secured in step S303. In the subsequent step S307, the background program 2 obtains the address of the entry point of the binary read into the memory in step S306 and records it in the management table 3. In the subsequent step S308, the background program 2 changes the state 34 in the record to be processed in the management table 3 to "REGISTERED".

[0034] In step S309, which is executed when an affirmative determination is made in step S304, the background program 2 waits for the occurrence of an event and proceeds to one of steps S350, S360, and S370 according to the event that has occurred. Specifically, when the background program 2 determines that a startup event has occurred, it proceeds to step S350; when it determines that an end event has occurred, it proceeds to step S360; and when it determines that a timer event has occurred, it proceeds to step S370. Even when any of steps S350, S360, and S370 ends, the background program 2 returns to step S309. The above is the description of FIG. 5.

[0035] Note that the startup event occurs when the hooker 7 hooks the startup process of the program 9 to be managed. The end event occurs by the process of step S343 in FIG. 10 described later. The timer event is generated when the timer set in step S301 or step S374 in FIG. 8 described later elapses a predetermined time.

[0036] FIG. 6 is a flowchart showing the details of step S350 in FIG. 5, namely the startup process. In step S351, the background program 2 assigns any one of the temporary processes that have already been created to the management target program 9 instructed to start up. In the subsequent step S352, the background program 2 writes the process ID of the temporary process assigned in step S351 to the assigned PID 36 in the management table 3. For example, if the program instructed to start up is "task2.bin" and the process ID of the assigned temporary process is "1256", it is written in the management table 3 as in the example of FIG. 3.

[0037] In the subsequent step S353, the background program 2 moves the temporary process assigned in step S351 to the RT core 11A. In the subsequent step S354, the background program 2 instructs the temporary process moved to the RT core 11A in step S353 to execute from the entry point, and ends the process shown in FIG. 6.

[0038] FIG. 7 is a flowchart showing the details of step S360 in FIG. 5, namely the termination process. First, in step S361, the background program 2 receives a signal indicating a termination event. This signal includes information identifying the program to be terminated, such as the name or process ID of the program. In the subsequent step S362, the background program 2 deletes the value of the assigned PID 36 in the record of the corresponding program from the management table 3 and ends the process shown in FIG. 7.

[0039] FIG. 8 is a flowchart showing the details of step S370 in FIG. 5, namely the generation process. First, in step S371, the background program 2 checks the number of generated temporary processes. In the subsequent step S372, the background program 2 determines whether the number of temporary processes checked in step S371 is a predetermined number, for example, 10 or less. If the background program 2 determines that the number of temporary processes is less than or equal to the predetermined number, it proceeds to step S373, and if it determines that the number of temporary processes is more than the predetermined number, it proceeds to step S374.

[0040] In step S373, the background program 2 generates one or more temporary processes and proceeds to step S374. In step S374, the background program 2 sets a timer for generating a timer event after a predetermined time and ends the process shown in FIG. 8.

[0041] FIG. 9 is a flowchart showing the operation of the temporary process generated in step S301 of FIG. 5 or step S373 of FIG. 8. The temporary process starts operating upon receiving an instruction from the background program 2 in step S354 of FIG. 6. First, in step S323, the temporary process refers to the management table 3 to obtain the entry point that its own temporary process should load. Specifically, the temporary process identifies the record in which its own process number is described in the allocated PID36 of the management table 3, and obtains the address of the entry point 33 of that record. In the subsequent step S324, the temporary process maps the assets for that application in the memory area previously obtained by the background program 2. For this process, for example, the mmap command of Linux (registered trademark) can be used.

[0042] In the subsequent step S325, the temporary process starts the process of the program 9 to be managed. Specifically, the temporary process starts the process from the entry point obtained in step S323. If the process of securing a dynamic area is included in the process of the program 9 to be managed started in step S325, step S326 is executed. In step S326, the temporary process obtains a dynamic area from the background program 2 instead of from the OS 8. When all the processes of the program 9 to be managed are completed, the temporary process outputs "_EXIT" for which the processing by the management program 4 is performed instead of "EXIT", which is a standard system call, and ends the process.

[0043] Figure 10 is a flowchart showing the termination process when the management program 4 receives the system calls "_EXIT" or "_ABORT". In S341, the management program 4 identifies the process that output "_EXIT" or the process targeted by "_ABORT", releases the resources of the identified process (hereinafter referred to as the "stopped process"), and transitions the state of the stopped process to "REGISTERED". The release of resources refers to the application assets in S324 of FIG. 9 and the dynamic area acquired in step S326.

[0044] In the subsequent step S342, the management program 4 moves the stopped process from the RT core 11A to the management core 11B. In the subsequent step S343, the management program 4 notifies the background program 2 of the occurrence of the termination event, adds the "EXITING" flag to the state of the temporary process, and ends the process shown in FIG. 10.

[0045] Note that once the process of step S341 is completed, the resources used by the stopped process have already been released, so those resources can be allocated to other temporary processes. Therefore, a new process of the management target program 9 can be started without waiting for the termination process of the stopped process by the OS 8 after the execution of step S343. In other words, the time from when "_EXIT" or "_ABORT" is issued until a process of the same management target program 9 can be started is shortened.

[0046] According to the above-described first embodiment, the following operational effects can be obtained. (1) The arithmetic unit 1 includes a RAM 4 which is a memory capable of high-speed reading and writing, a storage device 17 that stores an OS 4, a management target program 9 that cannot be started simultaneously in multiple instances, a background program 2 that executes the management target program 9, and a management program 4 that manages the management target program 9, and a CPU 11 that executes the OS 8, the management target program 9, the background program 2, and the management program 4. The background program 2 generates one or more temporary processes by the OS 8 and stores the management target program 9 in the RAM 4, selects a selected process which is one of the temporary processes, and associates it with the management target program 9 stored in the RAM 4. When the management program 4 receives a command to start the management target program 9, it operates the management target program associated with the selected process without generating a new process. Therefore, since a temporary process is created in advance and the resource management by the OS 8 is completed before the start of the management target program 9 is supported, the processing by the management target program 9 can be quickly started.

[0047] (2) The background program 2 secures a management area which is an area in the RAM 4. The temporary process further acquires a part of the management area in the dynamic memory securing process in the management target program 9 (S323 and S326 in FIG. 9). Therefore, resources for the management target program 9 can be managed independently of the OS 8.

[0048] (3) When the management program 4 receives an end command of the management target program 9, that is, based on “_EXIT” or “_ABORT”, it reclaims the management area from the selected process in which the management target program 9 is operating (step S342 in FIG. 10), and then causes the OS to end the selected process. Therefore, even if the end of the selected process by the OS is not completed, the resources for the management target program 9 used by the selected process can be used by the next temporary process.

[0049] (4) The CPU 11 has a plurality of cores. In the CPU 11, the execution of the program to be managed 9 is executed in the RT core 11A, and the generation process of the temporary process by the background program 2 is executed in the management core 11B. Therefore, since the generation of the temporary process is executed in a computing core different from the execution of the program to be managed 9, the generation of the temporary process does not adversely affect the real-time execution of the program to be managed 9.

[0050] (Modification Example 1) In the first embodiment described above, the CPU 11 has a plurality of cores. However, the CPU 11 may have only one computing core. In this case, since the program to be managed 9, the background program 2, and the management program ④ all operate on the same core, it is inevitable that they will have an overall impact. However, even in this case, by applying the present invention and generating a temporary process in advance before the program to be managed 9 is started, the advantage of being able to omit at least the time for resource reservation by the OS 8 is the same as in the first embodiment. Also, when the temporary process that was executing the program to be managed 9 ends, by releasing the resources for executing the program to be managed 9 first, when the OS 8 terminates the temporary process, the resources for executing the program to be managed 9 can be allocated to the next temporary process in parallel, which is also the same as in the first embodiment.

[0051] (Modification Example 2) In the first embodiment described above, it was explained as if the program to be managed 9 requires dynamic memory reservation. However, it is not essential for the program to be managed 9 to dynamically reserve memory.

[0052] (Modification Example 3) In the first embodiment described above, the background program 2 and the management program 4 were described as different programs. However, the background program 2 and the management program 4 may be integrated into one program. Also, the management program 4 may be integrated into the OS 8.

[0053] (Modification Example 4) The arithmetic unit 1 may have a function of outputting a process list. FIG. 11 is a diagram showing the display result of the process state in the arithmetic unit 1. In the example shown in FIG. 11, by additionally specifying a predetermined option for the "PS" command that outputs a process list, the state of the process is output at the right end, and states such as "REGISTERED" and "ABORTING" can be confirmed.

[0054] - Second Embodiment - Referring to FIG. 12, a second embodiment of the arithmetic unit will be described. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and the differences will be mainly described. Points not particularly described are the same as those in the first embodiment. This embodiment is different from the first embodiment mainly in that a new management target program is added to the arithmetic unit.

[0055] FIG. 12 is a diagram showing information stored in the storage device 17 in the second embodiment. FIG. 12 shows that additional data P is added. This additional data P may be received via the communication device 14, or may be transferred via a storage medium such as a CD-ROM or a USB memory.

[0056] The additional data P added to the arithmetic unit 1A includes a script 41 for performing additional processing, a third program 93 which is a new management target program 9, and a management program 4A for replacing the management program 4. The script 41 is, for example, a shell script, and arranges the third program 93 and the management program 4A in the storage device 17, and updates the management table 3. The management program 4A is different from the management program 4 in that it corresponds not only to the first program 91 and the second program 92 but also to the third program 93.

[0057] The processing of script 41 will be specifically described. Script 41 saves the third program 93 at a predetermined storage location in the storage device 17, and describes the absolute path of the storage location in the storage location 32 of a new record in the management table 3. For example, script 41 sets the management number 31 of the record to be consecutive with existing records. Also, script 41 overwrites the management program 4 stored in the storage device 17 with a new management program 4A.

[0058] When a new record is added to the management table 3, the background program 2 stores the binary indicated by the storage location 32 of the new record in the RAM 13, assigns one of the temporary processes to the third program 93, and moves it from the management core 11B to the RT core 11A. Since the subsequent processing is the same as that of the first embodiment, the description thereof is omitted.

[0059] (Modification Example 1 of the Second Embodiment) In the second embodiment described above, the additional data P includes the management program 4A which is the data for replacing the management program 4. However, the additional data P may include the difference information between the management program 4 and the management program 4A, and the management program 4A may be created using the difference information and the management program 4. Also, instead of the additional data P including the management program 4A or the third program 93 itself, the additional data P may include the source code of the management program 4A or the source code of the third program 93. In this case, compilation and build are performed inside the arithmetic unit 1 to generate the management program 4A and the third program 93.

[0060] (Modification Example 2 of the Second Embodiment) In the above-described second embodiment, it is premised that the management target program 9 is already stored in the storage device 17, and the background program 2, the execution program 5, and the hook 7 are similarly stored in the storage device 17. However, it is not an essential configuration that the storage device 17 contains the management target program 9, the background program 2, the execution program 5, and the hook 7 in advance, and the background program 2, the execution program 5, and the hook 7 may be included in the additional data P.

[0061] That is, the first embodiment may be realized by adding the additional data P including the management target program 9, the background program 2, the management program 4, the execution program 5, and the hook 7 to the arithmetic unit 1 on which the OS 8 operates. In this case, the management target program 9, the background program 2, the management program 4, the execution program 5, and the hook 7 are included in the additional data P as source code, and may be compiled and built inside the arithmetic unit 1 to generate these programs.

[0062] (Modification Example 3 of the Second Embodiment) In the above-described second embodiment, the generation of the additional data P and the transmission of the additional data P to the storage device 17 may be executed as a series of processes. For example, as an extension of the compilation process of the third program 93, the additional data P including the generated third program 93 may be transmitted to the storage device 17.

[0063] In each of the above-described embodiments and modification examples, the configuration of the functional blocks is merely an example. Some functional configurations shown as separate functional blocks may be integrally configured, or the configuration represented by one functional block diagram may be divided into two or more functions. Also, a configuration may be adopted in which a part of the functions of each functional block is provided by another functional block.

[0064] Each of the above-described embodiments and modifications may be combined. Although various embodiments and modifications have been described above, the present invention is not limited to these contents. Other aspects conceivable within the scope of the technical idea of the present invention are also included in the scope of the present invention.

Explanation of Reference Numerals

[0065] 1... arithmetic unit 2... background program 3... management table 4... management program 5... execution program 7... hook 9... program to be managed 11... control device 11A... RT core 11B... management core 14... communication device 17... storage device 91... first program 92... second program

Claims

1. A memory capable of high-speed reading and writing, an operating system (OS) that does not support real-time processing, a management target program that cannot be started simultaneously in multiple instances, a background program that executes the management target program, and a non-volatile storage device that stores a management program for managing the management target program, a central processing unit that executes the OS, the management target program, the background program, and the management program, the background program generates one or more temporary processes by the OS and stores the management target program in the memory, selects a selected process that is one of the temporary processes, and associates it with the management target program stored in the memory, when the management program receives a command to start the management target program, it operates the management target program associated with the selected process without generating a new process, the background program further secures a management area that is an area in the memory, the selected process further acquires a part of the management area, a computing device.

2. In the computing device according to Claim 1, the selected process further acquires a part of the management area in the dynamic memory allocation process in the management target program, a computing device.

3. In the computing device according to Claim 1, when the management program receives an end command for the management target program, it reclaims the management area from the selected process in which the management target program is operating, and then causes the OS to end the selected process, a computing device.

4. In the computing device according to Claim 1, the central processing unit includes a plurality of cores, the execution of the management target program and the generation process of the temporary processes by the background program are executed on different ones of the cores, a computing device.

5. A method of operating a program executed by a computing device including a memory capable of high-speed reading and writing, an operating system (OS) that does not support real-time processing, a management target program that cannot be started simultaneously in multiple instances, a background program that executes the management target program, a non-volatile storage device that stores a management program for managing the management target program, and a central processing unit that executes the OS, the management target program, the background program, and the management program, The background program generates one or more temporary processes by the OS and stores the program to be managed in the memory, selects a selected process that is one of the temporary processes, and associates it with the program to be managed stored in the memory, The management program includes, when receiving an instruction to start the program to be managed, operating the program to be managed associated with the selected process without generating a new process, The background program further includes securing a management area that is an area in the memory, The operation method of the program, wherein the selected process further includes acquiring a part of the management area.

Citation Information

Patent Citations

  • Mounting system and execution muliplicity control system and execution priority control system for logical unit for object directing type system

    JP1994332724A

  • Real-time os simulation method

    JP2006163983A

  • Calculator system

    JP2016001417A

  • Vehicle appliance

    JP2016091257A

  • Execution method for application

    JP2019185423A