Process Schedule Method
The process scheduling method for general-purpose OS extends scheduling capabilities to match RTOS by allowing users to define and change process schedules, ensuring timely and critical process execution and maintaining system reliability.
Patent Information
- Application Number
- JP2021183713
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2025-04-21
- Estimated Expiration
- 2041-11-10
AI Technical Summary
Existing general-purpose operating systems (OS) struggle to replicate the real-time scheduling capabilities of traditional Real-Time Operating Systems (RTOS), making it difficult to manage and prioritize processes, especially in scenarios requiring immediate abnormality countermeasures.
A process scheduling method that allows for the implementation of an extended scheduler on general-purpose OS, enabling users to define and change the timing and contents of process schedules, thereby mimicking the RTOS scheduling characteristics.
This method allows for flexible and user-defined process scheduling on general-purpose OS, ensuring that critical processes can be prioritized and executed promptly, similar to RTOS, thereby maintaining system safety and reliability.
Smart Images

Figure 0007665495000001 
Figure 0007665495000002 
Figure 0007665495000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a process scheduling method, and more particularly to a process scheduling method in a real-time OS that extends OS-specific process scheduling to enable a user to define an event that will trigger the start of a process and the details of the process to be started. [Background technology]
[0002] Conventionally, in order to guarantee the real-time nature of control application software (hereinafter, application software is also simply referred to as "application") on a controller in a control system, it has been common to adopt a dedicated RTOS (Real Time Operating System) to guarantee the real-time nature of the application. However, an RTOS only has functions specialized for guaranteeing real-time nature, and cannot implement and operate technologies such as AI for data processing and connectivity with other devices, which are required in the recent IoT (Internet of Things) era. For this reason, controllers that adopt general-purpose OS such as Linux (registered trademark) have become widespread. When operating conventional control applications on a general-purpose OS, the order control of the application is influenced by the schedule characteristics of the general-purpose OS. In particular, when an abnormality occurs in an application, in conventional RTOS, abnormality countermeasure processing is often performed as an extension of RTOS processing. As a result, abnormality processing is processed preferentially and immediately, so that the safety of the system can be maintained by abnormality countermeasures such as abnormal system shutdown. However, it is difficult to realize the same processing on a general-purpose OS. As a solution to this problem, there is a method of providing an extended scheduler that realizes the scheduler characteristics of a conventional RTOS to the general-purpose OS.
[0003] In relation to this, for example, Patent Document 1 discloses a schedule for a guest OS executed on a virtual computer. Patent Document 1 discloses a virtual computer system in which a guest OS scheduler is provided in a virtual computer manager for scheduling the virtual computer, and the guest OS is scheduled so as to adjust the CPU allocation to the guest OS based on the measured operating frequency of the guest OS. Patent Document 2 discloses a technique for scheduling thread processing for executing VoIP. The call processing device of Patent Document 2 includes, in addition to a first scheduler that queues call processing events, a second scheduler that generates an event processing thread, extracts call processing events from each event queue management object, and executes the call processing events. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2009-110404 A [Patent Document 2] JP 2010-73214 A Summary of the Invention [Problem to be solved by the invention]
[0005] Patent document 1 describes a technology that sets up a new scheduler on a virtual computer manager to schedule guest OSs, while the call processing device described in patent document 2 provides a second scheduler to readjust the order of tasks to be executed within the processing deadline, preventing a decrease in CPU performance.
[0006] However, these extended schedulers do not allow the user to change when the scheduler is operated and what the schedule is.
[0007] There is a demand for an application scheduling method in a general-purpose OS that allows users to easily change the scheduling time and schedule contents. This will allow schedulers for control applications that were previously run on an RTOS to be implemented on a general-purpose OS. In addition, because users can easily change the processing required before all applications run, a variety of application scheduling methods can be realized.
[0008] An object of the present invention is to provide a process scheduling method that enables a scheduler for a control application to be implemented on a general-purpose OS and allows the user to change the time and contents of the schedule. [Means for solving the problem]
[0009] The process scheduling method of the present invention is a process scheduling method of an information processing device for scheduling a process executed on a general-purpose OS, comprising the steps of: the information processing device waking up an extended schedule process processing for scheduling a process separately from the OS when executing a specified OS internal processing function of the OS; and the information processing device scheduling a process according to an extended schedule processing content program by the extended schedule process processing. Effect of the Invention
[0010] According to the present invention, it is possible to provide a process scheduling method that enables a scheduler of a control application to be implemented on a general-purpose OS and allows a user to change the time and contents of the schedule. [Brief description of the drawings]
[0011] [Figure 1] 1 is a functional configuration diagram of an information processing device to which a process scheduling method according to a first embodiment is applied. [Diagram 2] 1 is a hardware / software configuration diagram of an information processing device to which a process scheduling method according to a first embodiment is applied. [Diagram 3] FIG. 13 illustrates an example of an extended schedule management table. [Figure 4] FIG. 13 illustrates an example of an extended schedule event hook process template. [Diagram 5] FIG. 11 is a diagram showing an example of an extended schedule event information table according to the first embodiment. [Figure 6] FIG. 13 is a diagram illustrating an overview of the relationship between an OS schedule and an extended schedule. [Figure 7] 13 is a flowchart showing an extended schedule event selection process. [Figure 8] 13 is a flowchart showing an extended schedule event hook process creating process. [Figure 9] 13 is a flowchart showing an extended schedule event hook process. [Figure 10] 13 is a flowchart showing an extended schedule processing content program registration process. [Figure 11] 5 is a flowchart showing an extended schedule wake-up process according to the first embodiment. [Figure 12] 13 is a flowchart showing an extended schedule process according to the first embodiment. [Figure 13] 13 is a diagram illustrating a user interface of an OS internal processing function CallGraph screen. FIG. [Figure 14] FIG. 11 is a functional configuration diagram of an information processing device to which a process scheduling method according to a second embodiment is applied. [Figure 15] FIG. 11 is a hardware / software configuration diagram of an information processing device to which a process scheduling method according to a second embodiment is applied. [Figure 16] FIG. 11 is a diagram showing an example of an extended schedule event information table according to the second embodiment. [Figure 17] 11 is a flowchart showing an extended schedule wake-up process according to the second embodiment. [Figure 18A] 11 is a flowchart showing an extended schedule process according to the second embodiment (part 1). [Figure 18B]13 is a flowchart showing an extended schedule process according to the second embodiment (part 2). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, each embodiment of the present invention will be described with reference to FIGS. 1 to 18B.
[0013] [Embodiment 1] A first embodiment of the present invention will be described below with reference to FIGS. 1 to 13. FIG.
[0014] First, the configuration of an information processing apparatus to which a process scheduling method according to the first embodiment is applied will be described with reference to FIGS.
[0015] As shown in FIG. 1, an information processing device 100 to which the process scheduling method of the present invention is applied has, as its functional configuration, an extended schedule event selection unit 101, an extended schedule event hook processing creation unit 110, an extended schedule processing content program registration unit 120, an extended schedule processing content program 121, an extended schedule processing unit 130, an application 140, an OS (Operating System) 150, and a memory unit 160.
[0016] The OS 150 is system software that acts as an intermediary between the hardware and software that controls the operation (operation, management, and running) of the computer, and is, for example, a general-purpose OS such as Linux (registered trademark) or Windows (registered trademark).
[0017] The OS 150 of this embodiment includes, as functions, a scheduler 151, an extended schedule event hook processing program 152, and an extended schedule process wake-up unit 153, which will be described later.
[0018] Here, the extended schedule is process scheduling that enables the user to newly define and execute process execution order and contents separately from the original process schedule of the OS 150.
[0019] The scheduler 151 is a functional unit that schedules processes specific to the OS.
[0020] The application 140 is an application software program that performs a productive role and control and is executed on the OS 150. There are usually a plurality of applications 140, and the applications 140 are executed in process units managed by the OS 150.
[0021] The extended schedule event selection unit 101 is a functional unit that selects an internal OS processing function of the kernel of the OS 150 that is specified to wake up the extended schedule process unit 130 (described later).
[0022] The extended schedule event hook process creator 110 is a functional unit that creates an extended schedule event hook process program 152, which will be described later.
[0023] The extended schedule event hook processing program 152 is a program created based on an extended schedule event hook processing template 201 described later, and is executed as a hook (start) of an event for executing an extended schedule when an OS process by an internal function selected as an event for waking up the extended schedule process unit 130 described later is executed on the OS 150. The extended schedule event hook processing program 152 is inserted as an internal process of the OS 150, and the mechanism for the insertion may use a function provided in the OS 150, such as Ftrace in the case of Linux (registered trademark). The extended schedule event hook processing program 152 inserted in the OS 150 calls an extended schedule process wake-up unit 153 described later, and stores parameters required for processing of the extended schedule process unit 130 in an extended schedule event information table 202 described later.
[0024] The extended schedule processing content program registration unit 120 is a functional unit that registers an extended schedule processing content program 121, which will be described later.
[0025] The extended schedule processing content program 121 is a program that realizes the function of an extended schedule process. This extended schedule processing content program 121 is created by the user, and is a program that realizes processing that the user wishes to execute as an extension of the execution of the internal processing function of the kernel of the OS 150 selected by the extended schedule event selection unit 101. Generally, there may be a plurality of extended schedule processing content programs 121, which are registered in the extended schedule management table 200 (described later) by the extended schedule processing content program registration unit 120 based on the user's settings.
[0026] The extended schedule process wake-up unit 153 is a functional unit that wakes up the extended schedule process unit 130. The extended schedule process wake-up unit 153 is loaded into the OS 150 as an internal module of the OS 150 when the extended schedule process unit 130 is initialized. The extended schedule process wake-up unit 153 may be loaded using a function provided in the OS 150.
[0027] The extended schedule processing unit 130 is a functional unit that executes the extended schedule processing content program 121 registered in an extended schedule management table 200, which will be described later, using parameters set in an extended schedule event information table 202, which will be described later.
[0028] The storage unit 160 is a functional unit that stores data for implementing the process scheduling method. The storage unit 160 holds an extended schedule management table 200 , an extended schedule event hook process template 201 , and an extended schedule event information table 202 .
[0029] The details of each table will be explained later.
[0030] Next, the hardware and software configuration of an information processing device to which the process scheduling method of the present invention is applied will be described with reference to FIG. As shown in FIG. 1, an information processing device 100 to which the process scheduling method of the present invention is applied is realized by a hardware configuration of a general information processing device such as a personal computer shown in FIG.
[0031] The information processing device 100 includes a CPU (Central Processing Unit) 302, a main memory device 304, a network I / F (Interface) 306, a display I / F 308, an input / output I / F 310, and an auxiliary memory I / F 312, all of which are connected via a bus.
[0032] The CPU 302 controls each unit of the information processing device 100, and loads necessary programs into the main storage device 304 and executes them.
[0033] The main storage device 304 is typically configured as a volatile memory such as a RAM, and stores the programs executed by the CPU 302 and data referenced by the CPU 302.
[0034] The network I / F 306 is an interface for connecting to the network 5 .
[0035] The display I / F 308 is an interface for connecting a display device 320 such as an LCD (Liquid Crystal Display).
[0036] The input / output I / F 310 is an interface for connecting input / output devices. In the example of Fig. 2, a keyboard 330 and a mouse 332 which is a pointing device are connected.
[0037] The auxiliary storage I / F 312 is an interface for connecting an auxiliary storage device such as a hard disk drive (HDD) 350 or a solid state drive (SSD).
[0038] The HDD 350 has a large storage capacity and stores programs for executing the present embodiment. An extended schedule event selection program 361, an extended schedule event hook process creation program 362, an extended schedule process content program registration program 363, an extended schedule process content program 121, and an extended schedule process program 364 are installed in the information processing device 100.
[0039] An extended schedule event selection program 361, an extended schedule event hook processing creation program 362, an extended schedule processing content program registration program 363, and an extended schedule process program 364 are programs which respectively realize the functions of the extended schedule event selection unit 101, the extended schedule event hook processing creation unit 110, the extended schedule processing content program registration unit 120, and the extended schedule process unit 130.
[0040] Furthermore, the information processing device 100 is installed with an application 140 as a general application program and an OS 150 as basic software.
[0041] The OS 150 also includes a schedule program, an extended schedule event hook processing program 152, and an extended schedule process wake-up program (omitted). The schedule program and the extended schedule process wake-up program are programs that respectively realize the functions of the schedule section 151 and the extended schedule process wake-up section 153. As already explained, the extended schedule event hook processing program 152 is embedded as a program of the OS 150.
[0042] Next, the data structure used in the process scheduling method of the present invention will be described with reference to FIGS.
[0043] The extended schedule management table 200 is a table for managing information related to extended schedules, and as shown in FIG. 3, has fields for an extended schedule event identifier 200a, an event hook identifier 200b, and an extended schedule processing content program identifier 200c.
[0044] The extended schedule event identifier 200a stores an identifier for uniquely identifying an event identifier related to an extended schedule defined separately from the OS. The extended schedule event identifier is created in association with, for example, an internal OS processing function of the kernel of the OS 150 selected by the extended schedule event selection unit 101.
[0045] The event hook identifier 200b stores the identifier of the extended schedule event hook process program 152 created by the extended schedule event hook process creator 110.
[0046] The extended schedule processing content program identifier 200c stores an identifier for uniquely identifying the extended schedule processing content program 121 for executing a process related to an extended schedule as an extension of the schedule unit 22 of the OS 150.
[0047] The extended schedule event hook processing template 201 is a template for the extended schedule event hook processing program 152, and as shown in FIG. 4, is made up of a parameter setting processing statement 201a and an extended schedule process wake-up processing call statement 201b in the form of a function.
[0048] Parameter setting statement 201a is a statement for setting a parameter used in an internal kernel processing function of OS 150. In the example shown in Fig. 4, an extended schedule event identifier stored in extended schedule management table 200 is set in PARM0 as a parameter used in an internal kernel processing function of OS 150.
[0049] Extended schedule process wake-up call statement 201b is a processing statement that calls an extended schedule process wake-up function for implementing the function of extended schedule process wake-up unit 153. Parameters such as PARM0, PARM1, PARM2, ... are passed to the extended schedule process wake-up function. Here, PARM0 is a parameter set in the above parameter setting processing statement 201a, and PARM1, PARM2, ... are parameters passed from the kernel of OS 150 and used in the extended schedule event.
[0050] This template is read by the extended schedule event hook process creating unit 110, and an extended schedule event hook process program 152 is created using this template.
[0051] The extended schedule event information table 202 is a table in which information for extended schedule events is stored, and as shown in FIG. 5, is made up of fields for an extended schedule event identifier 202a and an event hook parameter 202b.
[0052] The extended schedule event identifier 202a is an identifier that uniquely identifies an extended schedule event, and is linked to the extended schedule event identifier 200a in the extended schedule management table 200 in Fig. 3. The value of the extended schedule event identifier 202a is set by the extended schedule process wake-up unit 153 from the extended schedule event identifier (PARM0 in Fig. 4) passed from the extended schedule event hook processing program 152.
[0053] The event hook parameter information 202b is passed from the extended schedule event hook processing program 152 and is a parameter (PARM1, PARM2, . . . in FIG. 4) passed from an internal kernel processing function of the OS 150 used as an extended schedule event.
[0054] Next, an overview of the process scheduling method of this embodiment will be described with reference to FIG. FIG. 6 is a diagram showing an overview of the relationship between the OS schedule and the extended schedule. First, in the OS 150, an internal schedule process S01 schedules and executes an OS process and a user process resulting from application execution (S01).
[0055] When a user has embedded the extended schedule event hook processing program 152 in an internal OS processing function, the extended schedule event hook processing is executed by the schedule event hook processing program from the corresponding OS process (S02).
[0056] In the extended schedule event hook process, an extended schedule process wake-up process is performed, and a wake-up notification is issued by the extended schedule process unit (S11).
[0057] In response to this, the extended schedule process is performed by the extended schedule process unit (S12), and processes due to the execution of the extended schedule process content program are scheduled and executed. The extended schedule process is set to have a higher execution priority than all processes by the application 140.
[0058] As described above, by providing an extended scheduling function that allows a user to define the contents and execution timing of a process in addition to the process scheduling inherent to the OS, the user can write the extended schedule processing content program 121 for a process that the user wants to process before all the processes by the applications 140 run as an extension of a specific internal OS process, and set the process to be executed. During the specific internal OS process, the protected mode function of the OS ensures that the processes by all the applications 140 do not run. Since the process by the extended schedule event hook processing program 152 executed as an extension of that process is also processed inside the OS, it is guaranteed that the processes by all the applications 140 do not run. Furthermore, since the extended schedule process wake-up process called from the process by the extended schedule event hook processing program 152 is also an internal OS process, it is guaranteed that the processes by all the applications 140 do not run. By the extended schedule process wake-up process, a parameter is set in the extended schedule event information table 202, and the process to be run next is selected by the schedule processing of the OS. The execution priority of the extended schedule process process is set higher than that of the processes by all the applications 140. Therefore, it is possible to guarantee that all processes by the applications 140 will not be executed before the extended schedule process unit 130 finishes the process. Therefore, when an abnormality occurs in a process by one specific application 140, it is possible to execute the user-defined extended schedule processing content program 121 as a countermeasure against the abnormality before the processes by the remaining applications 140 are executed. That is, it is possible to execute the extended scheduling of the present invention as a user-defined process as an extension of the scheduling of the OS 150. When an abnormality occurs in a process by an application, an exception handling function is executed as an internal OS process in Linux (registered trademark). The user can flexibly set the contents of the extended schedule processing content program to select the exception handling function as an event of the extended schedule and reboot the system or execute an application other than the application where the abnormality occurs when the abnormality occurs as the extended schedule processing content program.
[0059] Next, the process schedule method of this embodiment will be described with reference to FIGS. This is a process executed by the extended schedule event selection unit 101.
[0060] First, the OS internal processing function CallGraph management unit 102 of the extended schedule event selection unit 101 of the information processing device 100 displays an OS internal processing function CallGraph screen (S101). The user interface of the OS internal processing function CallGraph screen will be described in detail later.
[0061] Next, the user specifies an OS internal processing function displayed on the OS internal processing function CallGraph screen, and inputs a hook point for executing the extended schedule (S102).
[0062] Next, the extended schedule event selection unit 101 generates an extended schedule event identifier for uniquely identifying the extended schedule, and sets it in the extended schedule management table 200 (S103).
[0063] Next, the extended schedule event selection unit 101 generates an event hook identifier corresponding to the input hook point, and sets it in the extended schedule management table 200 (S104).
[0064] Next, the extended schedule event hook process creating process will be described with reference to FIG. This is a process executed after the extended schedule event selection process shown in FIG.
[0065] First, the extended schedule event hook process creator 110 of the information processing device 100 reads the extended schedule event hook process template 201 (S201).
[0066] Next, the extended schedule event hook process creation unit 110 reads the extended schedule event identifier from the extended schedule management table 200 into PARM0 of the extended schedule event hook program (S202).
[0067] Next, the extended schedule event hook process creator 110 generates code for a parameter setting process statement 201a that substitutes the read extended schedule event identifier (S203).
[0068] Next, the extended schedule event hook process creation unit 110 associates the event hook identifier related to the extended schedule event identifier with the extended schedule event hook program, and inserts the extended schedule event hook program into the OS internal processing function corresponding to the input hook point (S204).
[0069] The event hook identifier and the extended schedule event hook program can be associated with each other, for example, by using the function name of the extended schedule event hook program as the event hook identifier (in the examples of Figs. 3 and 4, HOOKFUNC-1 to HOOKFUNC-n are generated as event hook identifiers from the template HOOKFUNC-♯.) Inserting an extended schedule event hook program means embedding the execution code of the program in the corresponding location of the binary code of the kernel of OS150, like the Ftrace utility of Linux (registered trademark), for example.
[0070] Next, the extended schedule event hook process will be described with reference to FIG. This is a process that is executed after the extended schedule event hook process creating process shown in FIG.
[0071] First, the extended schedule event hook process content program 152 sets an extended schedule event identifier in PARM0 (S301). The code of the parameter setting process statement 201a for this purpose is generated in S203 of FIG.
[0072] Next, the extended schedule event hook process content program 152 sets the parameters of the called internal OS processing function to PARM1, PARM2, . . . in order (S302).
[0073] Next, the extended schedule event hook processing content program 152 passes the parameters PARM0, PARM1, PARM2, . . . to call the extended schedule process wake-up processing (S303).
[0074] Next, the extended schedule processing content program registration process will be described with reference to FIG. This is a process executed by the extended schedule process content program registration unit 120.
[0075] First, the user designates the extended schedule processing content program 121 in the information processing device 100, and inputs an extended schedule event identifier for identifying an extended schedule event that executes the extended schedule processing content program 121 (S401).
[0076] Next, the extended schedule processing content program registration unit 120 of the information processing device 100 sets the extended schedule processing content program identifier that corresponds to the input extended schedule event identifier and uniquely identifies the extended schedule processing content program 121 to the extended schedule processing content program identifier 200c in the extended schedule management table 200 (S402). The extended schedule processing content program identifier may be anything that can uniquely identify a program, such as an execution file name or a function pointer, for example.
[0077] Next, the extended schedule wake-up process according to the first embodiment will be described with reference to FIG. This is a program executed by the extended schedule wake-up processing unit 153, and is called by executing the extended schedule event hook program inserted into the OS internal processing function by the extended schedule event hook processing creation processing in FIG.
[0078] First, extended schedule wake-up processing unit 153 of information processing device 100 reads PARM0, PARM1, PARM2, . . . as parameters when called (see FIG. 4) (S501).
[0079] Next, the extended schedule wake-up processing unit 153 assigns PARM0 to the extended schedule event identifier 202a in the extended schedule event information table 202, and assigns PARM1, PARM2, ... to the event hook parameters 202b (S502). PARM0 is the extended schedule event identifier assigned by the extended schedule event hook program, and PARM1, PARM2, ... are subsequent parameters passed from the OS internal processing function.
[0080] Next, the extended schedule wake-up processing unit 153 sets, in the scheduler unit 151 of the OS 150, a higher priority for the extended schedule process processing than for processes by other applications 140 (S503).
[0081] Next, the extended schedule wake-up processing unit 153 passes the identifier of the extended schedule event to be started to the extended schedule processing unit 130, and issues a wake-up notification (S504).
[0082] Since extended schedule wake-up processing unit 153 operates as a kernel internal process, no process by other applications 140 operates until this process ends. The wake-up notification to extended schedule process unit 130 is sent from the OS internal processing function to execute extended schedule process processing for the first time.
[0083] Furthermore, the extended scheduled process is set to run with a higher priority than processes by other applications, ensuring that the extended scheduled process is always executed before the running of processes by other applications.
[0084] Next, the extended schedule process according to the first embodiment will be described with reference to FIG. This is processing executed by the extended schedule processor 130, and is executed in response to a wake-up notification being sent to the extended schedule wake-up processor 153.
[0085] First, the extended schedule process unit 130 of the information processing device 100 determines whether or not there is a wake-up notification from the extended schedule process wake-up unit 153 (S601). If there is a wake-up notification (S601: YES), the process proceeds to S602. If there is no wake-up notification (S601: NO), the process waits (S610).
[0086] When the extended schedule process wake-up unit 153 notifies the extended schedule process unit 130 to wake up, the extended schedule process unit 130 searches the extended schedule event information table 202 using the extended event identifier passed from the extended schedule process wake-up unit 153 as a key, and acquires the event hook parameters (S602).
[0087] Next, the extended schedule processing unit 130 searches the extended schedule management table 200 using the extended event identifier passed from the extended schedule process wake-up unit 153 as a key, and acquires an extended schedule processing content program identifier (S603).
[0088] Next, the extended schedule process unit 130 passes the event hook parameters acquired in S602 and starts a process by the extended schedule processing content program 121 corresponding to the extended event identifier (S604).
[0089] Next, the user interface of the OS internal processing function CallGraph screen will be described with reference to FIG. FIG. 13 is a diagram for explaining the user interface of the OS internal processing function CallGraph screen.
[0090] The OS internal processing function CallGraph screen 600 is a screen that displays the flow of processing of OS internal processing functions executed by the kernel of the OS 150 and the function call relationships, as shown in Fig. 13. Black circles 601 in the figure are points where function calls are made. The intersections of black circles 601 indicate that two or more OS internal processing functions make function calls to the same function.
[0091] When embedding hook points in the OS 150 and performing extended scheduling, it is necessary to carefully select OS kernel processes to be used as schedule events in order to prevent too many schedule events from occurring. Therefore, it is desirable for the user to select OS internal processing functions that have few common parts called by multiple kernel processes, using the OS internal processing function CallGraph screen 600.
[0092] From the CallGraph, the user selects an OS internal processing function executed in the kernel of the OS 150 that the user wants to use as a hook point for an extended schedule event. When selecting an OS internal processing function, the user selects an OS internal processing function that does not overlap with other OS internal processing functions. This makes it possible to reduce the number of times extended schedule process processing is performed.
[0093] For this purpose, in the process of inputting a hook point for executing an extended schedule in S102 of FIG. 7, for example, the relevant OS internal processing function display 602 is specified, the mouse is right-clicked to display the context menu 603, and the command "specify hook point" is entered.
[0094] At this time, the extended schedule event identifier may be automatically generated by the system from the OS internal processing function name or the like, or may be input by the user through a dialogue (not shown) or the like.
[0095] As described above, in this embodiment, by setting a hook point in an internal processing function executed by the OS kernel, defining the startup timing and processing content, and starting an extended schedule process with a higher priority than other applications, it is possible to perform extended scheduling of a new process separate from the scheduling of the OS process.
[0096] This therefore makes it possible for the control application's scheduler to be implemented on a general-purpose OS, and makes it possible to schedule processes whose scheduling time and schedule contents can be changed by the user.
[0097] For example, if an abnormality occurs in one specific application, the abnormality countermeasure processing can be registered as user-defined extended schedule processing content, and the user-defined processing can be executed before the remaining applications are run.
[0098] [Embodiment 2] A second embodiment of the present invention will be described below with reference to FIGS. 14 to 18B.
[0099] In the first embodiment, a process scheduling method has been described that allows a user to define an extended schedule by adding start timing and processing contents in addition to the OS schedule.
[0100] This embodiment is a process scheduling method based on the same concept as that of the first embodiment, but differs in that the processor is an information processing device having a plurality of CPU cores.
[0101] That is, in the information processing device 100 of the first embodiment, one CPU 300 executes the OS 150 and the application 140, but in this embodiment, the CPU 300 has multiple CPU cores, and each of them can execute a process individually. Then, each extended schedule process unit is provided corresponding to each of the CPU cores, and each of them can execute an extended schedule separate from the OS 150.
[0102] First, the configuration of an information processing apparatus to which a process scheduling method according to the second embodiment is applied will be described with reference to FIGS.
[0103] The information processing device 100 to which the process scheduling method of the present invention is applied has a functional configuration that is almost the same as that of the first embodiment shown in Fig. 1, but differs in that there are multiple extended schedule process units 130 (indicated as 130a, 130b, ... in the figure) for each CPU core 301 (described later). As in the first embodiment, the process of the extended schedule process unit 130 is executed with a higher priority than the application 140 executed by each CPU core 301.
[0104] Unlike the first embodiment, the extended schedule process wake-up unit 22 wakes up all the extended schedule process units 130 executed in each CPU core 301 .
[0105] The storage unit 160 also has a schedule exclusive flag 210 for adjusting the scheduling of a plurality of extended schedule process units 130. There is only one schedule exclusive flag 210 in the system. The setting of the schedule exclusive flag 210 will be described in detail later.
[0106] Also, the format of the extended schedule event information table 202 is different (details will be described later).
[0107] Furthermore, the information processing device 100 to which the process scheduling method is applied has a hardware configuration that is almost the same as that of embodiment 1 shown in FIG. 2, but as shown in FIG. 15, a CPU 300 has multiple CPU cores 301 (represented in the figure as 301a, 301b, ...), each of which can execute a process individually.
[0108] Next, a data structure used in the process scheduling method of the present invention will be described with reference to FIG. The table used in this embodiment is different from that in the first embodiment only in the extended schedule event information table 202 .
[0109] As shown in FIG. 16, the extended schedule event information table 202 of this embodiment consists of fields for an extended schedule event identifier 202a, an event hook parameter 202b, and an execution CPU core identifier 202c, and differs only from the extended schedule event information table 202 of embodiment 1 shown in FIG. 5 in that the execution CPU core identifier 202c is added.
[0110] The execution CPU core identifier 202c stores an identifier that uniquely identifies the CPU core 301 that executes the extended schedule process corresponding to the relevant extended schedule event identifier. The specified CPU core 301 executes the scheduled process by processing the corresponding extended schedule process section and running the extended schedule processing content program 121.
[0111] Next, the process schedule method of this embodiment will be described with reference to FIG. 17, FIG. 18A, and FIG. 18B. In this embodiment, only the extended schedule wake-up processing and the extended schedule process processing are different from the process scheduling method shown in the first embodiment.
[0112] First, the extended schedule wake-up process according to the second embodiment will be described with reference to FIG. First, extended schedule wake-up processing unit 153 of information processing device 100 reads PARM0, PARM1, PARM2, . . . as parameters when called (see FIG. 4) (S701).
[0113] Next, the extended schedule wake-up processing unit 153 assigns PARM0 to the extended schedule event identifier 202a of the extended schedule event information table 202, and assigns PARM1, PARM2, ... to the event hook parameters 202b (S702). PARM0 is the extended schedule event identifier assigned by the extended schedule event hook program, and PARM1, PARM2, ... are subsequent parameters passed from the OS internal processing function.
[0114] Next, the extended schedule wake-up processing unit 153 sets, in the scheduler unit 151 of the OS 150, a higher priority for the extended schedule process processing than for processes by other applications (S703).
[0115] Next, the extended schedule wake-up processing unit 153 acquires the CPU core identifier of the CPU core on which it is being executed by a system call, and sets this as the executing CPU core identifier 202c in the extended schedule event information table 202 (S704).
[0116] Next, the extended schedule wake-up processing unit 153 passes the identifier of the extended schedule event to be started to all the extended schedule processing units 130, and issues a wake-up notification (S705).
[0117] Next, the extended schedule process according to the second embodiment will be described with reference to FIGS. 18A and 18B. First, the extended schedule process unit 130 of the information processing device 100 determines whether or not there is a wake-up notification from the extended schedule process wake-up unit 153 (S801 in FIG. 18A). If there is a wake-up notification (S801: YES), the process proceeds to S802. If there is no wake-up notification (S801: NO), the process waits (S820).
[0118] When the extended schedule process unit 130 receives a wake-up notification from the extended schedule process wake-up unit 153, the extended schedule process unit 130 reads an execution CPU core identifier from the extended schedule event information table 202 using the extended event identifier passed from the extended schedule process wake-up unit 153 as a key (S802). Next, the extended schedule process unit 130 obtains, by a system call, the CPU core identifier of the CPU core on which the extended schedule process unit 130 is being executed (S803).
[0119] Then, the extended schedule process unit 130 compares the CPU core identifier of the CPU core on which it is being executed with the executing CPU core identifier (S804), and if they match (S804: YES), proceeds to S805, and if they do not match (S804: NO), returns to S801.
[0120] When the CPU core identifier of the CPU core on which it is being executed matches the executing CPU core identifier, the extended schedule wake-up processing unit 153 refers to the schedule exclusive flag 210 and determines whether it is ON or OFF (S805).
[0121] When the schedule exclusive flag 210 is ON, it means that the process has been scheduled by another CPU core and is being executed according to that scheduling, and when the schedule exclusive flag 210 is OFF, it means that the process has not been scheduled by another CPU core and is available for new scheduling. Note that the schedule exclusive flag 210 is initialized to OFF when the system is started up.
[0122] If the schedule exclusive flag 210 is ON (S805: ON), the process waits until it becomes OFF (S830).
[0123] When the schedule exclusive flag 210 is OFF (S805: OFF), the process proceeds to S806 in FIG. 18B.
[0124] If the schedule exclusive flag 210 is OFF, the extended schedule processor 130 sets the schedule exclusive flag 210 to ON (S806).
[0125] Next, the extended schedule process unit 130 searches the extended schedule event information table 202 using the extended event identifier passed from the extended schedule process wake-up unit 153 as a key, and acquires the event hook parameters (S807).
[0126] Next, the extended schedule processing unit 130 searches the extended schedule management table 200 using the extended event identifier passed from the extended schedule process wake-up unit 153 as a key, and acquires an extended schedule processing content program identifier (S808).
[0127] Next, the extended schedule processing unit 130 passes the event hook parameters acquired in S802 and starts a process according to the extended schedule processing content program corresponding to the extended event identifier (S809).
[0128] Next, the extended schedule processor 130 sets the schedule exclusive flag 210 to OFF (S810).
[0129] According to this embodiment, in a multi-core system, the start-up timing and processing contents can be defined for each CPU, and each CPU can execute an extended schedule separate from the OS 150. [Explanation of symbols]
[0130] 100...information processing device, 101...extended schedule event selection unit, 102...OS internal processing function CallGraph management unit, 110...extended schedule event hook processing creation unit, 120...extended schedule processing content program registration unit, 121...extended schedule processing content program, 130...extended schedule process unit, 140...application, 150...OS (Operating System), 151...schedule unit, 152...extended schedule event hook processing program, 153...extended schedule process wake-up unit, 160...storage unit, 200...extended schedule management table, 201...extended schedule event hook processing template, 202...extended schedule event information table, 210...schedule exclusive flag
Claims
1. A process scheduling method for an information processing device that schedules a process executed on a general-purpose OS, comprising: a step of waking up an extended schedule process that schedules a process separately from the OS when the OS executes a specified internal OS processing function by the information processing device; the information processing device includes a step of scheduling a process according to an extended schedule processing content program by the extended schedule process processing, moreover, 11. A process scheduling method comprising the step of: selecting an OS internal processing function that initiates an extended schedule process in accordance with information on an OS internal processing function input by a user, said information processing device selecting an OS internal processing function that initiates an extended schedule process in accordance with information on an OS internal processing function input by a user.
2. A process scheduling method for an information processing device that schedules a process executed on a general-purpose OS, comprising: a step of waking up an extended schedule process that schedules a process separately from the OS when the OS executes a specified internal OS processing function by the information processing device; the information processing device includes a step of scheduling a process according to an extended schedule processing content program by the extended schedule process processing, moreover, 11. A process scheduling method comprising the step of: registering an extended schedule processing content program to be started by the extended schedule process in accordance with information on the extended schedule processing content program input by a user, said information processing device.
3. A process scheduling method for an information processing device that schedules a process executed on a general-purpose OS, comprising: a step of waking up an extended schedule process that schedules a process separately from the OS when the OS executes a specified internal OS processing function by the information processing device; the information processing device includes a step of scheduling a process according to an extended schedule processing content program by the extended schedule process processing, A process scheduling method, comprising the steps of: embedding an extended schedule event hook processing program as code for the OS internal processing function; and waking up an extended schedule process processing by the extended schedule event hook processing program.
4. 4. The process scheduling method according to claim 3, wherein the information processing device holds an extended schedule management table that associates an extended schedule event identifier that uniquely identifies an extended schedule event, an event hook identifier that uniquely identifies a point where the event is embedded as code for the OS internal processing function, and an extended schedule processing content program identifier that uniquely identifies the extended schedule processing content program.
5. A process scheduling method for an information processing device that schedules a process executed on a general-purpose OS, comprising: a step of waking up an extended schedule process that schedules a process separately from the OS when the OS executes a specified internal OS processing function by the information processing device; the information processing device includes a step of scheduling a process according to an extended schedule processing content program by the extended schedule process processing, The information processing device has a plurality of CPU cores each of which executes a process; a process scheduling method for performing the extended schedule process processing exclusively for each of the CPU cores;
Citation Information
Patent Citations
System, method and device for converting priority
JP2001043091A
Virtual machine system and guest os scheduling method in the same system
JP2009110404A
Thread processing in multi-call processing and call processing system
JP2010073214A