Function transmission device, function execution device, function transmission method, function execution method, function transmission program, and function execution program
The function transmission device prioritizes and expedites the execution of early completion functions within FaaS systems, ensuring timely completion and reducing resource overhead, addressing the inefficiencies in conventional FaaS systems.
Patent Information
- Application Number
- PCT/JP2023/007976
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2024-09-12
AI Technical Summary
Conventional FaaS systems face interruptions and inefficiencies in executing functions due to all execution threads operating with the same priority, leading to delayed completion of functions that need to be finished early.
A function transmission device that identifies and prioritizes 'early completion' functions, generating and transmitting instruction information to ensure these functions are executed ahead of others, using priority information or CPU core allocation to expedite their completion.
Enables early completion of functions without interruptions, allowing critical functions to finish ahead of others and optimize resource utilization by reducing thread switching overhead.
Smart Images

Figure JP2023007976_12092024_PF_FP_ABST
Abstract
Description
Function transmission device, function execution device, function transmission method, function execution method, function transmission program, and function execution program
[0001] This disclosure relates to the execution of functions.
[0002] A cloud computing service called FaaS (Function as a Service) is becoming increasingly popular. FaaS allows users to register event-driven functions they define in a function execution device. Furthermore, FaaS provides the function execution device with an execution environment appropriate for the function when the function is registered, allowing users to easily execute the function.
[0003] As a technology related to the present disclosure, for example, there is a technology disclosed in Patent Document 1. Patent Document 1 describes providing arguments received from a function execution device to a function of a function registration request device, and providing the execution result of the function to the function execution device.
[0004] Patent No. 6997096
[0005] The relationship between function execution request queues and execution threads in conventional technology is shown in Figure 20. In conventional technology, execution threads retrieve execution requests from an execution request queue that has a one-to-one correspondence with the execution thread, and call a function. In conventional technology, all execution threads operate with the same priority. For this reason, conventional technology has the problem that the execution of a function that needs to be completed quickly may be forced to wait and / or interrupted due to the execution of another function, as shown in the function processing timing chart in Figure 21.
[0006] A primary object of the present disclosure is to solve such problems. More specifically, an object of the present disclosure is to complete the execution of a function that needs to be completed early as soon as possible.
[0007] The function transmission device according to the present disclosure includes an information generation unit that generates instruction information that instructs the function execution device to complete the execution of an early completion function, which is a function that needs to be completed earlier than other functions among a plurality of functions to be executed by the function execution device, earlier than other functions; and a transmission unit that transmits the early completion function and the instruction information to the function execution device.
[0008] According to the present disclosure, it is possible to complete the execution of a function that needs to be completed early.
[0009] FIG. 1 is a diagram showing an example of the hardware configuration of a function registration request device and a function execution device according to the first embodiment. FIG. 2 is a diagram showing an example of the functional configuration of a function registration request device and a function execution device according to the first embodiment. FIG. 3 is a diagram showing an example of registration data according to the first embodiment. FIG. 4 is a diagram showing an example of an event function correspondence table according to the first embodiment. FIG. 5 is a diagram showing an example of an operation sequence in the execution preparation phase according to the first embodiment. FIG. 6 is a diagram showing an example of an operation sequence in the event execution phase according to the first embodiment. FIG. 7 is a timing chart of function processing according to the first embodiment. FIG. 8 is a diagram showing an example of registration data according to the second embodiment. FIG. 9 is a diagram showing an example of an event function correspondence table according to the second embodiment. FIG. 10 is a diagram showing an example of an operation sequence in the execution preparation phase according to the second embodiment. FIG. 11 is a diagram showing an example of an operation sequence in the event execution phase according to the third embodiment. FIG. 12 is a diagram showing an example of the functional configuration of a function registration request device and a function execution device according to the third embodiment. FIG. 13 is a diagram showing an example of registration data according to the third embodiment. FIG. 14 is a diagram showing an example of an event function correspondence table according to the third embodiment. FIG. 15 is a diagram showing an example of an operation sequence in the execution preparation phase according to the third embodiment. FIG. 16 is a diagram showing an example of an operation sequence in the event execution phase according to the third embodiment. 13 is a diagram showing an example of an operation sequence in an execution preparation phase according to Embodiment 4. FIG. 14 is a diagram showing the relationship between a conventional execution request queue and an execution thread. FIG. 15 is a timing chart of conventional function processing.
[0010] Hereinafter, embodiments will be described with reference to the drawings. In the following description of the embodiments and the drawings, the same reference numerals denote the same or corresponding parts.
[0011] Embodiment 1. *** Description of Configuration *** Fig. 1 shows an example of the hardware configuration of a function registration request device 100 and a function execution device 200 according to this embodiment. The function registration request device 100 and the function execution device 200 are connected by a network 300. The function execution device 200 executes a function. There may be multiple function execution devices 200. The function registration request device 100 transmits a function to be executed by the function execution device 200 to the function execution device 200 via the network 300.
[0012] The function registration request device 100 corresponds to a function transmission device. The operating procedure of the function registration request device 100 corresponds to a function transmission method. The program that realizes the operation of the function registration request device 100 corresponds to a function transmission program. The operating procedure of the function execution device 200 corresponds to a function execution method. The program that realizes the operation of the function execution device 200 corresponds to a function execution program.
[0013] The function registration request device 100 is a computer. The function registration request device 100 includes a CPU (Central Processing Unit) 101, a memory 102, a communication device 103, and a storage 104. The function registration request device 100 may include a plurality of CPUs 101. The communication device 103 of the function registration request device 100 transmits a function to the communication device 203 of the function execution device 200 via the network 300.
[0014] The function execution device 200 is also a computer. The function execution device 200 also includes a CPU 201, a memory 202, a communication device 203, and a storage 204. The function execution device 200 may include multiple CPUs 201. The communication device 203 of the function execution device 200 receives a function from the communication device 103 of the function registration request device 100 via the network 300.
[0015] FIG. 2 shows an example of the functional configuration of the function registration request device 100 and the function execution device 200 according to this embodiment.
[0016] An operating system 110 runs on the function registration requesting device 100. A function registration unit 111 runs on the operating system 110. The function registration unit 111 is realized, for example, by a program. More specifically, the CPU 101 executes a program that realizes the functions of the function registration unit 111, thereby performing the operation of the function registration unit 111, which will be described later.
[0017] The function registration unit 111 acquires a function registration request from a user. Upon acquiring the function registration request, the function registration unit 111 generates instruction information. The instruction information is information that instructs a function that needs to be completed earlier than other functions among multiple functions (hereinafter referred to as an early completion function) to complete its execution earlier than the other functions. The function registration unit 111 then transmits registration data 105, which includes multiple functions including the early completion function and the instruction information, to the function execution device 200. The function registration unit 111 corresponds to an information generation unit and a transmission unit. Furthermore, the processing performed by the function registration unit 111 corresponds to information generation processing and transmission processing.
[0018] Registration data 105 is data to be registered from function registration request device 100 to function execution device 200. Registration data 105 is stored in storage 104. It is assumed that registration data 105 exists for each function to be transmitted to function execution device 200. In this embodiment, it is assumed that multiple functions are transmitted from function registration request device 100 to function execution device 200, and therefore it is assumed that multiple pieces of registration data 105 exist.
[0019] FIG. 3 shows an example of the registration data 105. The registration data 105 includes a function, execution setting information, and priority information. The function is a function to be executed by the function execution device 200. The execution setting information is setting information related to the execution of the function. The execution setting information includes event information. The event information defines an event that triggers the execution of the function. The priority information is instruction information in this embodiment. That is, in this embodiment, the priority information is used as instruction information. The priority information defines the order of priority when the function is executed. In the registration data 105 for early completion functions, the priority information indicates that the early completion function has a higher priority than other functions.
[0020] An operating system 210 runs on the function execution device 200. Also running on the operating system 210 are a function management unit 211, a receiving unit 212, a function execution environment 214, and a function execution unit 217. The function management unit 211, the receiving unit 212, the function execution environment 214, and the function execution unit 217 are realized, for example, by a program. More specifically, the CPU 201 executes a program that realizes the functions of the function management unit 211, the receiving unit 212, the function execution environment 214, and the function execution unit 217, thereby causing the function management unit 211, the receiving unit 212, the function execution environment 214, and the function execution unit 217, which will be described later, to operate.
[0021] The function management unit 211 stores the registration data 105 received by the receiving unit 212 in the storage 204 and prepares for function execution.
[0022] The receiving unit 212 receives registration data 105 from the function registration request device 100. Then, the receiving unit 212 outputs the received registration data 105 to the function management unit 211. The receiving unit 212 also has an execution request queue 213 corresponding to each function. In this embodiment, the receiving unit 212 is assumed to have a plurality of execution request queues 213. An execution request queue 213 exists for each function 216. The receiving unit 212 also receives an event notification that notifies the occurrence of an event when the event occurs. The event notified in the event notification is an event that triggers function execution. Upon receiving the event notification, the receiving unit 212 submits an execution request to the execution request queue 213 corresponding to the function 216 to be executed by the function execution unit 217. The processing performed by the receiving unit 212 corresponds to reception processing.
[0023] When an execution request is submitted to the execution request queue 213 by the receiving unit 212, the function executing unit 217 generates an execution thread 215 in the function execution environment 214. Furthermore, the function executing unit 217 calls a corresponding function 216 and executes the function 216. The function 216 is a function transmitted from the function registration requesting device 100 as part of the registration data 105. The function executing unit 217 calls a function included in the registration data 105 as the function 216. If the function 216 is an early completion function, the function executing unit 217 executes the function 216 (early completion function) with priority according to priority information so that the function 216 completes execution earlier than other functions. The processing performed by the function executing unit 217 corresponds to function execution processing. Note that, although the function executing unit 217 is independent of the operating system 210 in FIG. 2 , the function executing unit 217 may be part of the operating system 210.
[0024] It is assumed that there are a plurality of function execution environments 214. In this embodiment, a function execution environment 214 exists for each function 216.
[0025] The storage 204 stores the registration data 105 sent from the function registration request device 100 and an event-function correspondence table 205 .
[0026] 4 shows an example of the event-function correspondence table 205. In the event-function correspondence table 205, the event column indicates an event that triggers the execution of the function listed in the function name column. The event listed in the event column is the event indicated in the event information of the registration data 105. The function name column indicates a function that is executed when the event listed in the event column occurs. The function listed in the function column is a function included in the registration data 105. The priority column indicates the priority of the function listed in the function name column. The priority indicated in the priority column is the priority indicated in the priority information of the registration data 105. If the function listed in the function name column is an early completion function, the priority column indicates a higher priority than other functions.
[0027] ***Explanation of Operation*** Next, an example of the operation of the function registration request device 100 and the function execution device 200 according to this embodiment will be described. Below, the operation sequences of the function registration request device 100 and the function execution device 200 will be explained, divided into an execution preparation phase and an event execution phase. The execution preparation phase is a phase for putting the function execution device 200 into a state of waiting to receive an event. The event execution phase is a phase in which the function execution device 200 executes a function when an event occurs.
[0028] FIG. 5 shows the operation sequence in the execution preparation phase.
[0029] The function registration unit 111 receives a function registration request from a user (step S400). The function registration request indicates elements (function, event, priority) to be included in the registration data 105. Upon receiving the function registration request, the function registration unit 111 generates the registration data 105 according to the function registration request, and transmits the registration data 105 and the function execution environment 214 corresponding to the function to the function execution device 200 (step S401).
[0030] In the function execution device 200, the receiving unit 212 receives the registration data 105 and the function execution environment 214, and the function management unit 211 stores the registration data 105 and the function execution environment 214 in the storage 204 (step S402). Note that FIG. 2 shows a state in which the function execution environment 214 is activated. For this reason, the function execution environment 214 is not written in the storage 204. Furthermore, the function management unit 211 generates an event-function correspondence table 205 from the registration data 105 and registers the event-function correspondence table 205 in the storage 204 (step S403). Furthermore, the function management unit 211 activates the function execution environment 214 (step S404) and sets priorities for the execution threads 215 based on the event-function correspondence table 205 (step S405).
[0031] 6 shows the operation sequence in the event execution phase. When the event execution phase starts, the execution preparation phase is completed.
[0032] When an event occurs, the receiving unit 212 receives the event notification (step S500). The receiving unit 212 searches the "Event" column of the event-function correspondence table 205 for the event notified in the event notification, identifies a function corresponding to the notified event, and submits an execution request to the execution request queue 213 for the identified function (step S501). The function executing unit 217 performs a process of extracting an execution request from the execution request queue 213 (step S502). The function executing unit 217 then determines whether or not an execution request has been extracted from the execution request queue 213 (step S503). If an execution request has been extracted from the execution request queue 213, the function executing unit 217 generates an execution thread 215 in the function execution environment 214, calls the corresponding function 216, and executes the function 216 (step S504). The process then returns to step S502. If the execution request queue 213 is empty and the function executing unit 217 was unable to extract an execution request, the process returns to step S502.
[0033] In step S504, the function execution unit 217 prioritizes processing of the execution threads 215 with the highest priority among the multiple execution threads 215. That is, the function execution unit 217 prioritizes execution of functions with high priority, i.e., early completion functions, according to the priority information. As a result, the execution of early completion functions is completed earlier than the execution of other functions.
[0034] FIG. 7 shows a timing chart of function processing in this embodiment. The function execution unit 217 performs task scheduling based on the priority set for the execution thread of each function. In FIG. 7, execution thread 3, which is the execution thread for the early completion function, executes before execution threads 1 and 2, which are execution threads for other functions. This allows the execution of the early completion function to be completed early. In other words, the execution of the early completion function can be started without waiting for the execution of other functions to be completed. Furthermore, no interruption due to other functions occurs during the execution of the early completion function.
[0035] ***Explanation of Effects of the Embodiment*** As described above, according to the present embodiment, it is possible to quickly complete the execution of a function that needs to be quickly completed.
[0036] Second Embodiment In the first embodiment, an example was described in which priority information was used as instruction information. That is, in the first embodiment, a priority was set for the execution thread of each function, thereby completing the execution of an early-completion function early. On the other hand, the same effect can be obtained by using information other than priority information as instruction information. In the present embodiment, an example will be described in which CPU core allocation information is used as instruction information instead of priority information. In this embodiment, differences from the first embodiment will mainly be described. Note that matters not described below are the same as those in the first embodiment.
[0037] *** Description of Configuration *** In this embodiment, the hardware configuration example (FIG. 1) and the functional configuration example (FIG. 2) are the same as those in embodiment 1. However, in this embodiment, it is assumed that the CPU 201 of the function execution device 200 has multiple CPU cores.
[0038] In this embodiment, the registration data 105b shown in FIG. 8 is used. The registration data 105b includes a function, execution setting information, and CPU core allocation information. The function and execution setting information are the same as those shown in FIG. 3. Therefore, a description thereof will be omitted. The CPU core allocation information defines the number of the CPU core to which the execution of the function is assigned. The function registration unit 111 can instruct, in the CPU core allocation information, that a specific CPU core from among the multiple CPU cores of the function execution device 200 be assigned to the early completion function.
[0039] Furthermore, in this embodiment, the event-function correspondence table 205b shown in FIG. 9 is used. The event-function correspondence table 205b has columns for event, function name, and assigned CPU core. The event and function name columns are the same as those shown in FIG. 4. Therefore, a description thereof will be omitted. The assigned CPU core column indicates the number of the CPU core assigned to execute the function indicated in the function column. The CPU core number indicated in the assigned CPU core column is the number of the CPU core indicated in the CPU core allocation information of the registration data 105b.
[0040] ***Explanation of Operation*** Next, an example of operation of the function registration requesting device 100 and the function execution device 200 according to this embodiment will be described. In this embodiment as well, the operation sequences of the function registration requesting device 100 and the function execution device 200 will be explained by dividing them into an execution preparation phase and an event execution phase.
[0041] FIG. 10 shows the operation sequence in the execution preparation phase.
[0042] The function registration unit 111 receives a function registration request from a user (step S400). The function registration request indicates elements (functions, events, and CPU cores) to be included in the registration data 105b. Upon receiving the function registration request, the function registration unit 111 generates registration data 105b in accordance with the function registration request and transmits the registration data 105b and the function execution environment 214 corresponding to the function to the function execution device 200 (step S401).
[0043] In the function execution device 200, the receiving unit 212 receives the registration data 105b and the function execution environment 214, and the function management unit 211 stores the registration data 105b and the function execution environment 214 in the storage 204 (step S402). Furthermore, the function management unit 211 generates an event-function correspondence table 205b from the registration data 105b and registers the event-function correspondence table 205b in the storage 204 (step S406). Furthermore, the function management unit 211 starts the function execution environment 214 (step S404) and assigns a CPU core to the execution thread 215 based on the event-function correspondence table 205b (step S407).
[0044] 11 shows the operation sequence in the event execution phase. When the event execution phase starts, the execution preparation phase is completed.
[0045] When an event occurs, the receiving unit 212 receives the event notification (step S500). The receiving unit 212 searches the "Event" column of the event-function correspondence table 205b for the event notified in the event notification, identifies a function corresponding to the notified event, and submits an execution request to the execution request queue 213 for the identified function (step S501). The function executing unit 217 performs a process of extracting an execution request from the execution request queue 213 (step S502). The function executing unit 217 then determines whether or not an execution request has been extracted from the execution request queue 213 (step S503). If an execution request has been extracted from the execution request queue 213, the function executing unit 217 generates an execution thread 215 in the function execution environment 214, calls the corresponding function 216, and executes the function 216 (step S504). The process then returns to step S502. If the execution request queue 213 is empty and the function executing unit 217 was unable to extract an execution request, the process returns to step S502.
[0046] In step S504, the function execution unit 217 processes each execution thread 215 using the CPU core assigned to that execution thread 215. That is, the function execution unit 217 assigns a specific CPU core to the early completion function in accordance with the CPU core assignment information, and executes the early completion function preferentially on that CPU core. As a result, the execution of the early completion function is completed earlier than the execution of other functions.
[0047] FIG. 12 shows a timing chart of function processing in this embodiment. As shown in FIG. 12, the function execution unit 217 performs task scheduling based on the assigned CPU core set for the execution thread of each function. In FIG. 12, execution thread 3, which is the execution thread of the early completion function, is executed by CPU core 2. On the other hand, execution threads 1 and 2, which are execution threads of other functions, are executed by CPU core 1. As such, in this embodiment, since the early completion function is executed by a CPU core different from that of the other functions, the execution of the early completion function is completed early. In other words, the execution of the early completion function can be started without waiting for the completion of the execution of the other functions. Furthermore, during the execution of the early completion function, an interruption due to the other functions does not occur.
[0048] ***Explanation of Effects of the Embodiment*** As described above, according to the present embodiment as well, it is possible to quickly complete the execution of a function that needs to be completed quickly.
[0049] Third Embodiment In the first embodiment, an example was described in which priority information was used as instruction information. That is, in the first embodiment, a priority was set for each function execution thread, thereby completing the execution of early-completion functions early. When a large number of functions are registered in the function execution device 200, a large number of threads are generated. As a result, overhead due to thread switching may increase. Furthermore, there is a possibility of a shortage of resources such as memory. In this embodiment, an example is described in which the number of threads is reduced by grouping functions. More specifically, the function registration request device 100 groups multiple functions of the same priority. Then, the function registration request device 100 notifies the function execution device 200 of multiple functions grouped by group ID (Identifier) information, which is instruction information in this embodiment, and instructs the function execution device 200 to execute multiple functions in the same group consecutively. In this embodiment, differences from the first embodiment are mainly described. Note that matters not described below are the same as in the first embodiment.
[0050] *** Description of Configuration *** In this embodiment, the hardware configuration example ( FIG. 1 ) is the same as in embodiment 1. FIG. 13 shows a functional configuration example of a function registration request device 100 and a function execution device 200 according to this embodiment. Compared to FIG. 2 , in FIG. 13 , registration data 105c is stored in storage 104. Furthermore, multiple functions 216 share a function execution environment 214 and an execution thread 215. Multiple functions 216 that share the function execution environment 214 and the execution thread 215 belong to the same group. In other words, in this embodiment, the function execution environment 214 and the execution thread 215 exist for each group. Furthermore, in this embodiment, an execution request queue 213 is provided for each group of functions 216.
[0051] FIG. 14 shows an example of registration data 105c. The registration data 105c includes functions, execution setting information, priority information, and group ID information. The functions, execution setting information, and priority information are the same as those shown in FIG. 3. Therefore, a description thereof will be omitted. The group ID information indicates the group ID of the group to which the function belongs. Note that only functions that share a common trigger event and have the same priority belong to a single group. Multiple functions whose group ID information indicates the same group ID belong to the same group. Note that for functions that do not belong to any group, that is, functions for which there are no other functions that share a common event and have the same priority, a null value is indicated in the group ID information.
[0052] In this embodiment, the function registration unit 111 classifies, for example, multiple early completion functions that share a common trigger event and are set to the same priority into the same group.The function registration unit 111 then includes the same group ID information in the registration data 105c of each of the multiple early completion functions classified into the same group.In this way, the function registration unit 111 can instruct the function execution device 200 to execute multiple early completion functions consecutively.
[0053] 15 shows an example of the event function correspondence table 205c. The event function correspondence table 205c has columns for event, function name, priority, and group ID. The event, function name, and priority columns are the same as those shown in FIG. 4. Therefore, a description thereof will be omitted. The group ID column indicates the group ID of the group to which the function indicated in the function column belongs. The group ID indicated in the group ID column is the group ID indicated in the group ID information of the registration data 105c. In the event function correspondence table 205c, a null value is set in the group ID column for a function indicated as a null value in the group ID information of the registration data 105c.
[0054] ***Explanation of Operation*** Next, an example of the operation of the function registration request device 100 and the function execution device 200 according to this embodiment will be described.
[0055] FIG. 16 shows the operation sequence in the execution preparation phase.
[0056] The function registration unit 111 receives a function registration request from a user (step S400). The function registration request indicates elements (function, event, priority, and group ID) to be included in the registration data 105c. Upon receiving the function registration request, the function registration unit 111 generates registration data 105c in accordance with the function registration request and transmits the registration data 105c and the function execution environment 214 to the function execution device 200 (step S408). As described above, the same group ID is indicated in the group ID information of the registration data 105c for multiple functions that share a common trigger event and are set with the same priority.
[0057] In the function execution device 200, the receiving unit 212 receives the registration data 105c and the function execution environment 214, and the function management unit 211 stores the registration data 105c and the function execution environment 214 in the storage 204 (step S409). Furthermore, the function management unit 211 generates an event-function correspondence table 205c from the registration data 105c and registers the event-function correspondence table 205c in the storage 204 (step S410). Furthermore, the function management unit 211 starts the function execution environment 214 for each group (step S411) and sets a priority for each execution thread 215 based on the event-function correspondence table 205c (step S412).
[0058] 17 shows the operation sequence in the event execution phase. When the event execution phase starts, the execution preparation phase is completed.
[0059] When an event occurs, the receiving unit 212 receives the event notification (step S500). The receiving unit 212 searches the "Event" column of the event-function correspondence table 205c for the event notified in the event notification, identifies multiple functions belonging to the same group that correspond to the notified event, and submits execution requests for the identified multiple functions to the execution request queue 213 of the corresponding group (step S505). The function executing unit 217 performs a process of retrieving execution requests from the execution request queue 213 (step S502). Then, the function executing unit 217 determines whether an execution request has been retrieved from the execution request queue 213 (step S503). If an execution request has been retrieved from the execution request queue 213, the function executing unit 217 generates an execution thread 215 in the function execution environment 214, calls the corresponding function 216, and executes the function 216 (step S506). The process then returns to step S502. If the execution request queue 213 is empty and the function execution unit 217 cannot extract an execution request, the process returns to step S502.
[0060] In step S506, the function execution unit 217 successively executes a plurality of functions that share a common trigger event and belong to the same group. That is, if there are functions α and β that belong to the same group and are triggered by event A, when event A occurs, the function execution unit 217 successively executes functions α and β.
[0061] In this embodiment, as described above, the function registration unit 111 can classify multiple early completion functions that share a common trigger event and are set to the same priority into the same group. In this case, the function execution unit 217 can sequentially execute the multiple early completion functions classified into the same group, prioritizing them over other functions.
[0062] ***Explanation of Effects of the Embodiment*** As described above, according to the present embodiment, the number of threads can be reduced. As a result, according to the present embodiment, it is possible to reduce the overhead caused by thread switching and also reduce the amount of resources used, such as memory.
[0063] Embodiment 4 In embodiment 3, multiple functions to be classified into the same group are determined based on a function registration request from a user. Alternatively, it is also possible for the function execution device 200 to determine multiple functions to be classified into the same group. In this embodiment, an example in which the function execution device 200 determines multiple functions to be classified into the same group will be described. In this embodiment, differences from embodiments 1 and 3 will mainly be described. Note that matters not described below are the same as in embodiment 1 or 3.
[0064] ***Description of Configuration*** In this embodiment, the hardware configuration example (FIG. 1) and the functional configuration example (FIG. 2) are the same as those in the first embodiment.
[0065] In this embodiment, the registration data 105d shown in FIG. 18 is used. The registration data 105d includes functions, execution setting information, priority information, and grouping flag information. The functions, execution setting information, and priority information are the same as those shown in FIG. 3. Therefore, a description thereof will be omitted. The grouping flag information is binary data that defines whether or not a function is permitted to be included in a group. When the function registration unit 111 permits the function of the registration data 105d to be included in a group, it sets the grouping flag information to True. On the other hand, when the function of the registration data 105d is not permitted to be included in a group, it sets the grouping flag information to False. The function registration unit 111 sets the grouping flag information of multiple functions that share a common event and have the same priority set to True. On the other hand, the function registration unit 111 sets the grouping flag information of functions that do not have other functions that share a common event and have the same priority set to False.
[0066] In this embodiment, the function registration unit 111 sets, for example, True to the grouping flag information of multiple early completion functions that share a common trigger event and are set to the same priority. By doing so, the function registration unit 111 permits the function execution device 200 to group multiple early completion functions that share a common trigger event and are set to the same priority. In other words, the function registration unit 111 permits the function execution device 200 to execute such early completion functions consecutively. Note that grouping flag information set to True corresponds to consecutive execution permission information.
[0067] In this embodiment, as in the third embodiment, the event function correspondence table 205c is used.
[0068] ***Explanation of Operation*** Next, an example of the operation of the function registration request device 100 and the function execution device 200 according to this embodiment will be described. Fig. 19 shows the operation sequence in the execution preparation phase.
[0069] The function registration unit 111 acquires a function registration request from a user (step S400). The function registration request indicates functions, events, and priorities among the elements to be included in the registration data 105d. When the function registration unit 111 acquires the function registration request, it generates registration data 105d according to the function registration request and transmits the registration data 105d and the function execution environment 214 to the function execution device 200 (step S413). More specifically, if there are multiple functions that share a common event and have the same priority, the function registration unit 111 sets True to the grouping flag information of these multiple functions. On the other hand, the function registration unit 111 sets False to the grouping flag information of functions that do not share a common event and have the same priority.
[0070] In the function execution device 200, the receiving unit 212 receives the registration data 105d and the function execution environment 214, and the function management unit 211 stores the registration data 105c and the function execution environment 214 in the storage 204 (step S414). Furthermore, the function management unit 211 extracts functions that share a common event and the same priority from the functions whose grouping flag information is set to True, and assigns the same group ID to the extracted functions (step S415).
[0071] Next, the function management unit 211 generates an event-function correspondence table 205c from the registration data 105d and the group ID assigned in step S415, and registers the event-function correspondence table 205c in the storage 204 (step S416). That is, for functions whose grouping flag information is True, the function management unit 211 generates the event-function correspondence table 205c using the function, event information, and priority information in the registration data 105d and the group ID assigned in step S415. On the other hand, for functions whose grouping flag information is False, the function management unit 211 generates the event-function correspondence table 205c using the function, event information, and priority information in the registration data 105d. For functions whose grouping flag information is False, a null value is set in the group ID column.
[0072] The operation sequence after the execution preparation phase (steps S411 and S412) is the same as that shown in Fig. 16. The operation sequence of the event execution phase is the same as that shown in Fig. 17.
[0073] In this embodiment, as described above, the function registration unit 111 can allow the function execution device 200 to group multiple early completion functions that share a common event and are set to the same priority. In this case, the function management unit 211 can classify multiple early completion functions that share a common event and are set to the same priority into the same group. Then, as in the third embodiment, when executing any one of the early completion functions, the function execution unit 217 can consecutively execute other early completion functions classified in the same group, giving priority to other functions.
[0074] ***Explanation of Effects of the Embodiment*** As described above, in this embodiment, functions are grouped by the function execution device 200. This embodiment also makes it possible to reduce the overhead caused by thread switching, and also to reduce the amount of resources used, such as memory.
[0075] Although the first to fourth embodiments have been described above, two or more of these embodiments may be combined and implemented. Alternatively, one of these embodiments may be partially implemented. Alternatively, two or more of these embodiments may be partially combined and implemented. Furthermore, the configurations and procedures described in these embodiments may be modified as necessary.
[0076] ***Supplementary Explanation*** Finally, a supplementary explanation will be given regarding the configurations of the function registration request device 100 and the function execution device 200. At least one of information, data, signal values, and variable values indicating the results of processing by the function registration unit 111 is stored in at least one of the memory 102, the storage 104, a register within the CPU 101, and a cache memory. Furthermore, a program implementing the functions of the function registration unit 111 may be stored on a portable recording medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, or a DVD. Portable recording media storing the program implementing the functions of the function registration unit 111 may also be distributed. Similarly, at least one of information, data, signal values, and variable values indicating the results of processing by the function management unit 211, the receiving unit 212, the function execution environment 214, and the function execution unit 217 is stored in at least one of the memory 202, the storage 204, a register within the CPU 201, and a cache memory. Furthermore, the programs that realize the functions of the function management unit 211, the receiving unit 212, the function execution environment 214, and the function execution unit 217 may be stored on a portable recording medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, a DVD, etc. Then, the portable recording medium on which the programs that realize the functions of the function management unit 211, the receiving unit 212, the function execution environment 214, and the function execution unit 217 are stored may be distributed.
[0077] Furthermore, the "part" in at least one of the function registration unit 111, the function management unit 211, the receiving unit 212, and the function execution unit 217 may be interpreted as a "circuit," a "step," a "procedure," a "process," or a "circuitry." Furthermore, the function registration requesting device 100 and the function execution device 200 may be realized by a processing circuit. The processing circuit is, for example, a logic IC (Integrated Circuit), a GA (Gate Array), an ASIC (Application Specific Integrated Circuit), or an FPGA (Field-Programmable Gate Array). In this case, the function registration unit 111, the function management unit 211, the receiving unit 212, and the function execution unit 217 are each realized as part of the processing circuit. In this specification, the generic concept of a processor and a processing circuit is referred to as a "processing circuitry." In other words, a processor and a processing circuit are each specific examples of "processing circuitry."
[0078] 100 Function registration request device, 101 CPU, 102 Memory, 103 Communication device, 104 Storage, 105 Registration data, 105b Registration data, 105c Registration data, 105d Registration data, 110 Operating system, 111 Function registration unit, 200 Function execution device, 201 CPU, 202 Memory, 203 Communication device, 204 Storage, 205 Event function correspondence table, 205b Event function correspondence table, 205c Event function correspondence table, 210 Operating system, 211 Function management unit, 212 Receiving unit, 213 Execution request queue, 214 Function execution environment, 215 Execution thread, 216 Function, 217 Function execution unit, 300 Network.
Claims
1. A function transmission device having: an information generation unit that generates instruction information to instruct a function execution device to complete the execution of an early completion function, which is a function that needs to be completed earlier than other functions among a plurality of functions to be executed by the function execution device, earlier than other functions; and a transmission unit that transmits the early completion function and the instruction information to the function execution device.
2. A function transmission device according to claim 1, wherein the information generation unit generates, as the instruction information, priority information indicating that the early completing function has a higher priority than other functions.
3. The function transmission device of claim 1, wherein the information generation unit generates, as the instruction information, CPU core allocation information that instructs the function execution device to allocate a specific CPU core among a plurality of CPU (Central Processing Unit) cores included in the function execution device to the early completion function.
4. The function transmission device of claim 1, wherein the information generation unit, when there are two or more early completion functions, groups the two or more early completion functions, and generates instruction information for each of the two or more grouped early completion functions that instructs the function execution device to execute the two or more grouped early completion functions consecutively.
5. The function transmission device of claim 1, wherein the information generation unit generates consecutive execution permission information that permits consecutive execution of two or more early completion functions when there are two or more early completion functions, and the transmission unit transmits the two or more early completion functions, the instruction information, and the consecutive execution permission information to the function execution device.
6. A function execution device having: a receiving unit that receives instruction information instructing an early completion function, which is a function among a plurality of functions that needs to be completed earlier than other functions, to be completed earlier than other functions, and the early completion function; and a function execution unit that executes the early completion function in accordance with the instruction information so that it completes execution earlier than other functions.
7. The function execution device according to claim 6, wherein the receiving unit receives, as the instruction information, priority information indicating that the early completing function has a higher priority than other functions.
8. The function execution device of claim 6, wherein the receiving unit receives, as the instruction information, CPU core allocation information that instructs the function execution device to allocate a specific CPU core among a plurality of CPU (Central Processing Unit) cores included in the function execution device to the early completion function, and the function execution unit assigns the specific CPU core indicated in the CPU core allocation information to the early completion function and executes the early completion function.
9. The function execution device according to claim 6, wherein the receiving unit receives instruction information instructing to execute two or more grouped early completion functions consecutively, and the two or more grouped early completion functions, and the function execution unit executes the two or more grouped early completion functions consecutively.
10. The function execution device described in claim 6, wherein the receiving unit receives two or more early completion functions and consecutive execution permission information that permits consecutive execution of the two or more early completion functions, and the function execution unit executes any one of the early completion functions in succession while executing other early completion functions in accordance with the consecutive execution permission information.
11. A function transmission method in which a computer generates instruction information instructing a function execution device to complete the execution of an early completion function, which is a function that needs to be completed earlier than other functions among a plurality of functions to be executed by the function execution device, earlier than the other functions, and the computer transmits the early completion function and the instruction information to the function execution device.
12. A function execution method in which a computer receives instruction information instructing the execution of an early completion function, which is a function among a plurality of functions that needs to be completed earlier than other functions, earlier than the other functions, and the early completion function, and the computer executes the early completion function in accordance with the instruction information so that it completes execution earlier than the other functions.
13. A function transmission program that causes a computer to execute an information generation process that generates instruction information that instructs a function execution device to complete the execution of an early completion function, which is a function that needs to be completed earlier than other functions among a plurality of functions to be executed by the function execution device, earlier than other functions, and a transmission process that transmits the early completion function and the instruction information to the function execution device.
14. A function execution program that causes a computer to execute a receiving process that receives instruction information instructing a function that needs to be completed earlier than other functions among a plurality of functions to be completed earlier than other functions, and the early completion function, and a function execution process that executes the early completion function in accordance with the instruction information so that it completes execution earlier than other functions.
Citation Information
Patent Citations
Multithread server
JP1995006043A
Strengthening Function as a Service (FaaS) systems
JP2022511177A
Method and system for managing and executing serverless functions in a messaging service
US20210073059A1
Serverless function colocation with storage pools
US20210240537A1
Function-as-a-service (FAAS) model for specialized processing units
US20210287323A1
