Information processing apparatus

By writing file contents to a separate swap-out destination before releasing memory, the system ensures file integrity during swap-out, maintaining consistent file data across processes.

JP2024116638APending Publication Date: 2024-08-28NEC SOLUTION INNOVATORS LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023022340
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-16
Publication Date
2024-08-28

AI Technical Summary

Technical Problem

In existing information processing systems, when a computing process is swapped out due to lack of free memory, the contents of a file in physical memory are written back to the original file on storage, leading to changes in the file contents, which is problematic, especially in configurations like Linux.

Method used

A swap-out destination separate from storage is prepared, and the contents of the file in physical memory are written to this destination before releasing the memory area, ensuring the file contents remain unchanged during swap-out operations.

Benefits of technology

This approach prevents changes to the original file contents based on swap-out occurrences, allowing multiple processes to share the latest file contents through shared mapping while enabling swap-out operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024116638000001_ABST
    Figure 2024116638000001_ABST
Patent Text Reader

Abstract

To prevent the contents of an original file from being changed due to swap-out.SOLUTION: An information processing apparatus includes a control node with an operation system embedded therein, and a computation node which is controlled by the control node and not equipped with an operating system. The control node is configured to: prepare a swap-out space, allocate, when a first computation process running on the computation node issues a memory-mapped file request in shared mapping, a first memory region of a physical memory of the computation node to the first calculation process and read the contents of a file into the first memory region, and writes, when a swap-out request for the first calculation process is issued, the contents of the file stored in the first memory region to the swap-out space before releasing the first memory region.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an information processing device, an information processing method, a control node, and a program. [Background technology]

[0002] In an information processing device consisting of a computer (hereinafter referred to as a computation node) that does not have an operating system built in and a computer (hereinafter referred to as a control node) that has an operating system built in, a technology is known that makes memory-mapped file functions available on the computation node through control of the control node.

[0003] For example, in Patent Document 1, when a memory-mapped file request is issued by a computing process running on a computing node using shared mapping, the control node allocates a portion of the memory area of ​​the physical memory of that computing node to that computing process and reads the contents of the file into that memory area. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent No. 6439887 Summary of the Invention [Problem to be solved by the invention]

[0005] Incidentally, when the free space required to execute an urgent job does not exist in the physical memory of a computing node, a running computing process is swapped out to release the physical memory used by the computing process and secure the free space. In a configuration in which the contents of a file loaded into physical memory are written back to the original file on storage at the time of swapping out, as is done in Linux (registered trademark), there is a problem that the contents of the original file change depending on whether or not swapping out occurs.

[0006] An object of the present invention is to provide an information processing device that solves the above-mentioned problems. [Means for solving the problem]

[0007] An information processing device according to one aspect of the present invention includes: A system includes a control node having an operating system installed therein, and a computing node having no operating system installed therein, the computing node being controlled by the control node; The control node: Prepare a swap-out destination, When a memory-mapped file request is issued by a first computing process running on the computing node using shared mapping, a first memory area of ​​a physical memory of the computing node is allocated to the first computing process, and the contents of the file are read into the first memory area; When a swap-out request is issued for the first computing process, the contents of the file stored in the first memory area are written out to the swap-out destination before releasing the first memory area.

[0008] Further, an information processing method according to another aspect of the present invention includes: 1. An information processing method executed by an information processing device having a control node having an operating system installed and a computation node having no operating system installed, the computation node being controlled by the control node, comprising: The control node: Prepare a swap-out destination, When a memory-mapped file request is issued by a first computing process running on the computing node using shared mapping, a first memory area of ​​a physical memory of the computing node is allocated to the first computing process, and the contents of the file are read into the first memory area; when a swap-out request is issued for the first computing process, the contents of the file stored in the first memory area are written to the swap-out destination before releasing the first memory area; It is structured as follows.

[0009] Further, a control node according to another aspect of the present invention includes: A control node having an operating system installed therein and capable of controlling a compute node not having an operating system installed therein, Prepare a swap-out destination, When a memory-mapped file request is issued by a first computing process running on the computing node using shared mapping, a first memory area of ​​a physical memory of the computing node is allocated to the first computing process, and the contents of the file are read into the first memory area; When a swap-out request is issued for the first computing process, the contents of the file stored in the first memory area are written out to the swap-out destination before releasing the first memory area.

[0010] In addition, a program according to another aspect of the present invention includes: A control node having an operating system installed therein and having a function of controlling a computing node not having an operating system installed therein, A process to prepare a swap-out destination, a process of allocating a first memory area of ​​a physical memory of the computing node to the first computing process and reading the contents of the file into the first memory area when a memory mapped file request is made by shared mapping from a first computing process running on the computing node; a process of writing out the contents of the file stored in the first memory area to the swap-out destination before releasing the first memory area when a swap-out request for the first computing process is issued; The present invention is configured to cause the Effect of the Invention

[0011] By having the above-mentioned configuration, the present invention can prevent the contents of the original file from changing depending on whether or not swapping out has occurred. [Brief description of the drawings]

[0012] [Figure 1] 1 is a block diagram showing an example of a hardware configuration of an information processing device according to a first embodiment of the present invention. [Diagram 2] 2 is a block diagram showing an example of a software configuration of the information processing device according to the first embodiment of the present invention. FIG. [Diagram 3] FIG. 2 is a diagram illustrating an example of state transition of a calculation process according to the first embodiment of the present invention. [Figure 4] 4 is a flowchart illustrating an example of a process executed by a control node according to the first embodiment of the present invention when starting up an information processing device. [Diagram 5] 11 is a flowchart illustrating an example of a process executed by a control node according to the first exemplary embodiment of the present invention when a memory mapped file request is issued by a computing process using shared mapping. [Figure 6] 4 is a flowchart illustrating an example of a process executed by a control node according to the first embodiment of the present invention when a swap-out request is issued to a computing process. [Figure 7] 4 is a flowchart illustrating an example of a process executed by a control node according to the first exemplary embodiment of the present invention when a swap-in request is issued to a computing process. [Figure 8] FIG. 11 is a diagram illustrating an example of an operation when a computing process maps a file by shared mapping in the first embodiment of the present invention. [Figure 9] FIG. 11 is a diagram illustrating an example of an operation of swapping out a calculation process in the first embodiment of the present invention. [Figure 10] FIG. 11 is a diagram illustrating an example of an operation when a computing process is swapped out and another computing process maps a file using shared mapping in the first embodiment of the present invention. [Figure 11] FIG. 2 is a diagram illustrating an example of an operation of swapping in a calculation process in the first embodiment of the present invention. [Figure 12]FIG. 2 is a diagram illustrating an example of an operation when an unmap (munmap) or sync (msync) system call is issued from a computing process in the first embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] [First embodiment] First, in order to facilitate understanding of the embodiments of the present invention, problems assumed in the embodiments of the present invention and methods for solving the problems will be described.

[0014] In an information processing device that is composed of a control node and one or more computing nodes, the same memory area on the physical memory is assigned to multiple computing processes that operate on the same computing node under the control of the control node, and the contents of a file on the storage are read into that memory area, thereby sharing a file between the multiple computing processes by a shared mapping method. In this case, if the multiple computing processes are involved, writing to a file on the physical memory is immediately visible to the other computing processes. On the other hand, if the multiple computing nodes are involved, and the physical memory is independent of each other, even if a computing process of one computing node writes to a file on the physical memory, the writing is not visible to the computing process of the other computing node. When a computing process that has written to a file on the physical memory calls a specific system call and the contents of the file on the physical memory are written back to the original file on the storage of the control node under the control of the control node, the updated contents of the file become visible to the computing processes of the other computing nodes. It is desirable that the above behavior does not change depending on whether or not a computing process is swapped out. However, in Linux, when a process is swapped out, the contents of the file on the physical memory are written back to the original file on the storage. Therefore, if we do the same thing as Linux, the first problem will be that the contents of the original file on the storage will change depending on whether or not swapping out is performed.

[0015] In this embodiment, in order to solve the first problem, a swap-out destination other than the file on the storage is prepared, and when a computing process running on a computing node is swapped out, the contents of the file on the physical memory used by the computing process are written to the swap-out destination. This makes it possible to prevent the contents of the file on the storage from changing depending on whether or not the computing process is swapped out.

[0016] On the other hand, in Patent Document 1, if there is a memory area that has already been mapped by shared mapping, a new memory area is not assigned to another computing process that shares the memory area, but the memory area is mapped to the already mapped memory area. However, when the above-mentioned first solution method is adopted, when a computing process is swapped out, the mapped memory area is released by swapping out, and the file on the storage has not yet been updated. Therefore, even if another computing process running on the same computing node issues a memory-mapped file request by shared mapping, it cannot be mapped to the already mapped memory area, and even if the file on the storage is mapped, the latest data cannot be seen, which is a second problem.

[0017] In this embodiment, when a memory-mapped file request is issued by another computing process running on the same computing node using shared mapping, if the contents of the shared file have been written to the swap-out destination, a memory area is allocated to the other computing process, and the contents of the file that have been written to the swap-out destination are written back to the memory area. This allows the latest contents of the file to be shared by multiple computing processes running on the same computing node using shared mapping while still allowing swap-out.

[0018] Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

[0019] Fig. 1 is a block diagram showing an example of a hardware configuration of an information processing device according to a first embodiment of the present invention. Referring to Fig. 1, the information processing device of this embodiment is composed of a control node 100, a computation node 200, and an inter-node communication means 300 that connects the control node 100 and the computation node 200. In the example of Fig. 1, there is one computation node 200, but there may be two or more computation nodes, and the configuration of each computation node may be the same.

[0020] The control node 100 includes a physical memory 120, a processor 170, and a data transfer means 140. The calculation node 200 includes a physical memory 220, a processor 270, and a data transfer means 240. The control node 100 and the calculation node 200 may have the same computer architecture, or may have different computer architectures. The physical memory 120, the processor 170, and the data transfer means 140 are connected to each other within the node, and the processor 170 can access the physical memory 120 and the data transfer means 140 within the node. The physical memory 220, the processor 270, and the data transfer means 240 are connected to each other within the node, and the processor 270 can access the physical memory 220 and the data transfer means 240 within the node. When the control node 100 accesses the physical memory 220 of the calculation node 200, it uses an inter-node communication means 300 provided between the control node 100 and the calculation node 200.

[0021] The data transfer means 140, 240 have a DMA (Direct Memory Access) engine that accesses the physical memories 120, 220 without going through the processors 170, 270, and a processor-to-processor communication function that accesses resources such as registers on the processors 170, 270.

[0022] The processor 270 of the computing node 200 is configured to include one or more processor cores. The processor core of the computing node 200 is called a computing core. The computing core has, for example, a general-purpose register group, a control register group, an exception detection means, a register group access means, and an exception notification means. The processor 270 executes instructions in parallel, and even if a certain instruction causes a page fault, it is not necessary to be able to resume execution from that instruction.

[0023] The general-purpose register group is composed of a program counter (PC) and a general-purpose register (GPR) for storing calculation results, similar to common processors such as x86 and ARM. These registers are rewritten as instructions are executed in the calculation core of the processor 270. In addition, data is transferred between the general-purpose register group and memory when the calculation core of the processor 270 executes a load instruction or a store instruction.

[0024] The control register group is a register for controlling the execution of the calculation core of the processor 270. The control node 100 instructs the control register of the calculation core of the processor 270 to start and stop the execution of instructions through the inter-node communication means 300 and the data transfer means 140, 240.

[0025] When the exception detection means detects an exception during the execution of an instruction, it instructs the control register group to stop the execution. At the same time, the exception detection means requests the exception notification means to notify the exception (sends exception occurrence information). The above exceptions refer to exceptions that occur in general processors, such as arithmetic exceptions such as division by zero exceptions, memory access exceptions such as page faults and memory access boundary violations, and software traps for system call invocations.

[0026] The exception notification means notifies the control node 100 of an exception in the calculation core of the processor 270 using the inter-node communication means 300 based on the exception occurrence information obtained from the exception detection means.

[0027] The register group access means reads from and writes to each register of the general-purpose register group and the control register group based on an instruction issued by the control node 100 .

[0028] Fig. 2 is a block diagram showing an example of a software configuration of an information processing device according to the present embodiment. Referring to Fig. 2, a plurality of computing processes 250, 260 operate on a computing node 200. The computing processes 250, 260 are generated when an application program operating on the computing node 200 starts, and are discarded when the execution of the application program ends.

[0029] An operating system does not run on the computing node 200. Therefore, the control node 100 provides the computing node 200 with an alternative function to the services provided by the operating system via the inter-node communication means 300.

[0030] On the other hand, the control node 100 includes a computing node management means 110 , a file system 130 , an operating system 180 , and a plurality of proxy processes 150 and 160 .

[0031] The file system 130 holds a file 131. The file 131 can be specified by file identification information configured, for example, by a combination of a device number and an inode number. The file system 130 can be held in the physical memory 120, or can be held in an internal storage or an external storage accessible from the control node 100.

[0032] The operating system 180 has general functions of an operating system, such as a memory mapped file function, a system call, etc. The operating system 180 may be a commodity operating system used in computers, such as Linux (registered trademark) or Windows (registered trademark).

[0033] The proxy processes 150, 160 are generated in one-to-one correspondence with the computing processes 250, 260 on the computing node 200. The proxy processes 150, 160 accept system call requests issued by the corresponding computing processes 250, 260 via the inter-node communication means 300 and the computing node management means 110. The proxy processes 150, 160 then perform system call processing on behalf of the operation system that should exist on the computing node 200.

[0034] The proxy processes 150 and 160 also have a number of functions for proxy-executing system call requests. For example, the proxy processes 150 and 160 proxy-execute system calls for updating memory of the computing processes 250 and 260. The proxy processes 150 and 160 also proxy-execute memory-mapped file requests of the computing processes 250 and 260.

[0035] The operating system 180 holds information indicating the correspondence state between the areas of the physical memory 120 used by the proxy processes 150 and 160 and the files on the file system 130 .

[0036] The computing node management means 110 manages hardware resources such as the processor 270 and the physical memory 220 on the computing node 200. The computing node management means 110 also mediates access from the proxy processes 150 and 160 to the processor 270 for some resources. For example, the computing node management means 110 allocates computing cores in the processor 270 when generating the computing processes 250 and 260, manages memory on the computing node 200, and mediates system calls from the computing processes 250 and 260 to the proxy processes 150 and 160. The computing node management means 110 also manages information indicating the correspondence between the areas of the physical memory 220 used by the computing processes 250 and 260 and the files on the file system 130. In order to realize the above operations, the computing node management means 110 links hardware resources such as the processor 270 and the physical memory 220 on the computing node 200 to software resources such as the computing processes 250 and 260 and the proxy processes 150 and 160, and manages them.

[0037] The computing node management means 110 also has a function of synchronizing the physical memory 120 on the control node 100 with the physical memory 220 on the computing node 200. For example, when a computing process issues a system call for updating memory, the computing node management means 110 copies the updated contents of data in an area of ​​the physical memory 220 on the computing node 200 to a corresponding area on the physical memory 120 on the control node 100. Alternatively, the computing node management means 110 copies the updated contents of data in an area of ​​the physical memory 120 on the control node 100 to a corresponding area on the physical memory 220 on the computing node 200. This synchronization is performed when the operation of the processor 270 of the computing node 200 is stopped.

[0038] Furthermore, the computing node management means 110 prepares for swapping out a computing process. For example, the computing node management means 110 prepares a swap-out destination in addition to the file 131 of the file system 130. The swap-out destination may be the physical memory 120 of the control node 100 or the file system 130 of the control node 100. A swap-out destination is provided for each computing node 200. The computing node management means 110 generates and holds information on the swap-out destination (swap-out destination information to be described later) in order to manage the prepared swap-out destinations.

[0039] The computing node management means 110 also performs swap-out for the computing process. In this swap-out, the computing node management means 110 writes the contents of the file stored in the memory area of ​​the physical memory 220 mapped to the computing process to the swap-out destination before releasing the memory area. When the computing node management means 110 performs swap-out, it creates and holds swap-out management information including identification information of the swapped-out computing process and information of the save destination at the swap-out destination. The information of the save destination at the swap-out destination may be, for example, an address range if the swap-out destination is a physical memory, or a file name if the swap-out destination is a file system. The swap-out management information may also include the address of the physical memory to which the data is written back when writing data in the swap-out destination back to the physical memory and deleting the information of the save destination.

[0040] Furthermore, the computing node management means 110 performs swap-in for the computing process. In this swap-in, if the contents of the file written to the swap-out destination at the time of swap-out of the computing process have been written back to the memory area of ​​the physical memory 220 of the computing node 200, the computing node management means 110 allocates the memory area to the computing process to be swapped in. On the other hand, if the contents of the file written to the swap-out destination have not yet been written back to the physical memory 220 of the computing node 200, the computing node management means 110 allocates the memory area of ​​the physical memory 220 to the computing process to be swapped in, and writes back the contents of the file written to the swap-out destination to the allocated memory area.

[0041] The control node 100 described above may be an off-the-shelf PC server or an LSI. The inter-node communication means 300 may be an interconnect such as PCI Express or AXI. The computation node 200 may be a PCI Express card or an LSI connected to the control node. The computation node 200 may be an accelerator or a graphics processing unit. The control node 100 and the computation node 200 may be implemented in a single LSI.

[0042] FIG. 3 is a diagram showing an example of state transition of a calculation process such as the calculation process 250. Referring to FIG. 3, the calculation process takes one of the states RUNNING, STOP(a), STOP(o), STOP(i), and STOP(s). Here, RUNNING and STOP indicate the process status, and the parentheses indicate the substatus of the process. The substatus of the process includes a: active state (swap-out possible state, swap-in completed state, process resumable state), o: swap-out processing in progress state, s: swap-out completed state, and i: swap-in processing in progress state. Each state transitions to another state when events 1 to 10 described in FIG. 3 occur.

[0043] Next, the operation of the information processing device according to the present embodiment will be described.

[0044] FIG. 4 is a flow chart showing an example of a process executed by the control node 100 when starting up the information processing device. Referring to FIG. 4, the computing node management means 110 prepares for swap-out (step S1). In this preparation for swap-out, the computing node management means 110 prepares a swap-out destination other than the memory-mapped file. Specifically, the computing node management means 110 secures a swap-out destination in the physical memory 120 or the file system 130 of the control node 100 according to a predetermined startup method, for example, a user input input from an input means such as a console (not shown) or data read from a startup setting file. However, the startup method is not limited to reading from an input means such as a console or a startup setting file, and may be another method. Information on the secured swap-out destination is managed as swap-out destination information by the computing node management means 110. The swap-out destination information includes, for example, information indicating whether the swap-out destination is the physical memory 120 or the file system 130, an address of the physical memory 120 in the case of the physical memory 120, and a path of the file in the case of the file system 130.

[0045] 5 is a flow chart showing an example of a process executed by the control node 100 when a memory-mapped file request is issued by a computing process with shared mapping. Referring to FIG. 5, first, the control node 100 finds file management information related to the file specified in the memory-mapped file request (step S11). For each computing node 200, information including a computing process identifier and a file identifier (file management information to be described later) for the file used in the computing process running on the computing node 200 is managed, for example, by the computing node management means 110. The control node 100 determines whether the file management information related to the file specified in the memory-mapped file request is in the computing node management means 110 (step S12), and branches the process according to the determination result.

[0046] If file management information for a file that is not used in any of the computing processes of the computing node 200 does not exist in the computing node management means 110 (No in step S12), the control node 100 proceeds to step S13. On the other hand, file management information for a file that is used in any of the computing processes of the computing node 200 does exist in the computing node management means 110 (Yes in step S12). In that case, the control node 100 proceeds to step S16.

[0047] In step S13, the control node 100 generates file management information for the file requested as a memory mapped file by shared mapping, and holds it in the computation node management means 110. Next, the control node 100 secures a memory area from the physical memory 220 of the computation node 200, and maps it to the computation process that requested the memory mapped file (step S14). Next, the control node 100 reads the contents of the file from the file system 130, and loads it into the secured memory area (step S15). This enables the computation process to access the file in the memory area. Then, the control node 100 ends the processing of FIG. 5.

[0048] On the other hand, in step S16, the control node 100 finds swap-out management information. As described above, when a computing process that has issued a memory-mapped file request in shared mapping is swapped out, swap-out management information is created and stored in the computing node management means 110. This swap-out management information includes identification information of the swapped-out computing process, identification information of the file that has requested a memory-mapped file in shared mapping, and information on the save destination at the swap-out destination. Also, as described later, when a swapped-out computing process is swapped in, the swap-out management information stored in the computing node management means 110 is deleted. Therefore, the control node 100 determines whether there is swap-out management information including information on the save destination (step S17), and branches the process according to the determination result.

[0049] If there is swap-out management information including information on the save destination and the like (Yes in step S17), the control node 100 proceeds to step S19 since the requested file does not exist in the physical memory 220 but exists in the swap-out destination. On the other hand, if there is no swap-out management information including information on the save destination and the like (No in step S17), the control node 100 proceeds to step S18 since the requested file exists in the physical memory 220.

[0050] In step S18, the control node 100 maps the memory area of ​​the physical memory 220 of the computing node into which the file has been read to the computing process that requested the memory-mapped file. This allows the file on the physical memory 220 to be shared by multiple computing processes of the same computing node. Then, the control node 100 ends the process of FIG. 5.

[0051] On the other hand, in step S19, the control node 100 secures a memory area in the physical memory 220 of the computing node 200 and maps it to the computing process that requested the memory-mapped file. Next, the control node 100 reads the contents of the requested file from the swap-out destination specified by the swap-out destination information according to the information of the save destination in the swap-out destination included in the swap-out management information, and writes it back to the memory area mapped to the computing process that requested the file. This allows the computing process that requested the file to access the file on the physical memory 220. Next, since the control node 100 has written the file back from the swap-out destination to the physical memory, it deletes the information of the save destination in the swap-out destination included in the swap-out management information (step S21). The swap-out management information from which the information of the save destination has been deleted is still held by the computing node management means 110. Then, the control node 100 ends the process of FIG. 5.

[0052] 6 is a flowchart showing an example of a process executed by a control node when a swap-out request is issued to a computing process. The swap-out request is input by a user through a console (not shown), for example. The swap-out request includes an identifier of a process to be swapped out.

[0053] 6, when the control node 100 receives a swap-out request (step S31), it judges whether the computing process to be swapped out specified in the swap-out request is in a state where it can be swapped out (step S32). If the computing process is not in a state where it can be swapped out (No in step S32), the control node 100 responds to the request source that the computing process cannot be swapped out (step S33). Then, the control node 100 ends the process shown in FIG. 6. At this time, the computing process to be swapped out specified in the swap-out request is not ended.

[0054] On the other hand, if the computing process is in a state where it can be swapped out (Yes in step S32), the control node 100 changes the state of the computing process to be swapped out, specified in the swap-out request, to a swap-out in progress state (step S34). Next, the control node 100 judges whether the memory of the computing node is of a predefined type that can be swapped out (step S35). All memories that are mapped to memory-mapped files of shared mapping can be swapped out. Some memories, such as Sysy Shared, cannot be swapped out. If the memory of the computing node is of a type that cannot be swapped out (No in step S35), the control node 100 changes the state of the computing process to a swap-out completed state (step S39). Then, the control node 100 ends the processing shown in FIG. 6.

[0055] Furthermore, if the memory of the computing node is of a type that can be swapped out (Yes in step S35), the control node 100 creates swap-out management information (step S36). This swap-out management information includes identification information of the computing process to be swapped out, identification information of the file requested as a memory-mapped file in the shared mapping, and information of the save destination at the swap-out destination. Next, the control node 100 writes out data in the memory area of ​​the physical memory 220 mapped to the computing process to be swapped out to the save destination at the swap-out destination specified by the swap-out destination information (step S37). Next, the control node 100 releases the memory area of ​​the physical memory 220 mapped to the computing process to be swapped out (step S38). Next, the control node 100 changes the state of the swapped-out computing process to a swap-out completed state (step S39), and ends the processing shown in FIG. 6.

[0056] 7 is a flowchart showing an example of a process executed by the control node 100 when a swap-in request is issued to a computing process. The swap-in request is input by a user through a console (not shown), for example. The swap-in request includes an identifier of a process to be swapped in.

[0057] 7, when the control node 100 receives a swap-in request (step S41), it judges whether the computing process to be swapped in specified in the swap-in request is in a state where it can be swapped in (step S42). If the computing process is not in a state where it can be swapped in (No in step S42), the control node 100 responds to the request source that the computing process cannot be swapped in (step S43). Then, the control node 100 ends the processing shown in FIG. 7. At this time, the computing process to be swapped in specified in the swap-in request is not ended.

[0058] On the other hand, if the computing process is in a state where swap-in is possible (Yes in step S42), the control node 100 changes the state of the computing process to a swap-in in progress state (step S44). Next, the control node 100 reads swap-out management information related to the computing process (step S45). Next, the control node 100 secures a memory area from the physical memory 220 of the computing node 200 and maps it to the computing process (step S46). In this step S46, if the swap-out management information has information on the save destination, the control node 100 secures a memory area of ​​a size according to the amount of data saved to the swap-out destination from the physical memory 220 and maps it to the computing process. On the other hand, if the swap-out management information does not have information on the save destination, the control node 100 secures a memory area of ​​a write-back destination to the computing process and maps it. Next, the control node 100 determines whether or not the read swap-out management information has information on the save destination (step S47). If there is information on the save destination, the control node 100 writes back the data saved in the swap-out destination to the memory area of ​​the computing process (step S48) and resets the page management information of the computing process (step S49). If there is no information on the save destination, the control node 100 skips step S48 and resets the page management information of the computing process (step S49).

[0059] Next, the control node 100 deletes the swap-out management information of the computing process (step S50). Next, the control node 100 changes the state of the computing process to a restartable state (step S51), and ends the processing shown in FIG.

[0060] Next, the operation of this embodiment will be described with reference to Figs. 8 to 12. Here, Fig. 8 is a diagram for explaining an example of the operation when the computing process 250 maps the file 131 by shared mapping. Fig. 9 is a diagram for explaining an example of the operation of swapping out the computing process 250. Fig. 10 is a diagram for explaining an example of the operation when the computing process 260 maps the file 131 by shared mapping when the computing process 250 is swapped out. Fig. 11 is a diagram for explaining an example of the operation of swapping in the computing process 250. Fig. 12 is a diagram for explaining an example of the operation when a system call for unmap (munmap) or synchronization (msync) is issued from the computing process 250 or the computing process 260.

[0061] First, an example of the operation when the computing process 250 maps the file 131 with shared mapping will be described with reference to Fig. 8 and Fig. 5. In the example shown in Fig. 8, the swap-out destination 129 is secured in the physical memory 120 of the control node 100, and the corresponding swap-out destination information 1101 is stored in the computing node management means 110. However, the swap-out destination may be secured in the file system 130 instead of the physical memory 120. Also, it is assumed that the file management information of the file 131 does not exist in the computing node management means 110 at the time when the computing process 250 issues a memory mapped file request with shared mapping.

[0062] When the computing process 250 requests to map the file 131 with shared mapping, the control node 100 proceeds to step S13 because the file management information for the file specified in the memory mapped file request does not exist in the computing node management means 110 (No in step S12). Next, the control node 100 generates file management information 1102 for the file 131 and holds it in the computing node management means 110. The file management information 1102 includes, for example, an identifier of the file 131, an identifier of the computing process 250, a mapping type, and the like.

[0063] Next, the control node 100 secures a memory area 221 from the physical memory 220 of the computing node 200, and maps it to the computing process 250 (step S14). Next, the control node 100 reads the contents of the file 131 from the file system 130 and loads it into the memory area 221 (step S15). This enables the computing process 250 to access the file 131 in the memory area 221. The details of the operation at this time can be explained, for example, as follows in relation to the physical memory 120 and the proxy process 150 of the control node 100.

[0064] First, the file 131 is mapped to the area 151 on the virtual address space of the proxy process 150. This is performed by using a general function of the operating system 180. As a result, the memory area 121 is secured on the physical memory 120 of the control node 100, and the contents of the file 131 are read from the file system 130. Next, the memory area 221 is secured in the physical memory 220 of the computing node 200, and the page management information is set so that the memory area 221 is mapped to the area 251 of the virtual address space of the computing process 250. Next, the contents of the file 131 mapped to the area 151 of the virtual address space of the proxy process 150 are copied to the area 251 on the virtual address space of the computing process 250. The above is the detailed operation of steps S14 and S15.

[0065] Next, an example of the operation of swapping out the computing process 250 will be described with reference to Fig. 9 and Fig. 6. Here, it is assumed that the computing process 250 is in a swap-out possible state at the time when a swap-out request is issued. Also, it is assumed that the memory area of ​​the physical memory 220 mapped to the computing process 250 is only the memory area 221.

[0066] When the control node 100 receives a swap-out request for the computing process 250 (step S31), it changes the computing process 250 to a swap-out in progress state (step S34). Next, since the memory area 221 mapped to the computing process 250 is a type that can be swapped out (Yes in step S35), the control node 100 creates swap-out management information 1103 (step S36). The swap-out management information 1103 includes an identifier of the computing process 250, information on the save destination 122 in the swap-out destination 129 to be used, and the like. Next, the control node 100 writes out data in the memory area 221 mapped to the computing process 250 to the save destination 122 in the swap-out destination 129 (step S37). Next, the control node 100 releases the memory area 221 mapped to the computing process 250 (step S38). Next, the control node 100 changes the state of the swapped-out computing process 250 to a swap-out completed state (step S39), and ends the processing shown in FIG.

[0067] Next, with reference to FIG. 10 and FIG. 5, an example of the operation when a computing process 260 maps a file 131 with a shared mapping when a computing process 250 is swapped out will be described.

[0068] When the computing process 260 issues a memory-mapped file request in shared mapping, the control node 100 advances the process to step S19 since it has the file management information 1102 related to the file 131 and the swap-out management information 1103 including the information of the save destination (Yes in both steps S12 and S17). In step S19, the control node 100 secures a memory area 222 in the physical memory 220 of the computing node 200 and maps it to the computing process 260. Next, the control node 100 reads the contents of the file 131 from the save destination 122 of the swap-out destination 129 according to the information of the save destination in the swap-out destination included in the swap-out management information 1103, and writes it back to the memory area 222 mapped to the computing process 260. This allows the computing process 260 to access the file 131 in the memory area 222. Next, since the control node 100 has written the file 131 back from the swap-out destination 129 to the physical memory 220, the control node 100 deletes the information of the save destination in the swap-out destination 129 contained in the swap-out management information 1103 (step S21). Then, the control node 100 ends the process of FIG.

[0069] Next, an example of the operation of swapping in the computing process 250 in the state shown in Fig. 10 will be described with reference to Fig. 11 and Fig. 7. It is assumed that the computing process 250 is in a swap-in possible state at the time when the swap-in request is issued.

[0070] When the control node 100 receives a swap-in request for the computing process 250 (step S41), since the computing process is in a state where swap-in is possible (Yes in step S42), the control node 100 changes the state of the computing process 250 to a swap-in in progress state (step S44). Next, the control node 100 reads the swap-out management information 1103 related to the computing process 250 (step S45). Next, the control node 100 secures a memory area from the physical memory 220 of the computing node 200 and maps it to the computing process 250 (step S46). In this step S46, if the swap-out management information 1103 contains information on the save destination, the control node 100 secures a memory area of ​​a size according to the amount of data saved to the swap-out destination from the physical memory 220 and maps it to the computing process 250. However, since there is no information on the save destination in this example, the control node 100 secures a memory area of ​​a write-back destination to the computing process 250 and maps it. Next, the control node 100 judges whether or not there is information on the save destination in the swap-out management information (step S47). Since there is no information on the save destination in this example, step S48 is skipped, and the page management information of the computing process 250 is reset so that the area 251 of the virtual space of the computing process 250 is mapped to the memory area 222 (step S49). Next, the control node 100 deletes the swap-out management information 1103 of the computing process 250 (step S50), changes the state of the computing process 250 to a restartable state (step S51), and ends the processing shown in FIG.

[0071] Next, referring to FIG. 12, an example of the operation when an unmap (munmap) or sync (msync) system call is issued from one of the computing processes 250, 260 that share the file 131 by shared mapping will be described.

[0072] When the above system call for the file 131 is issued from the computing process 250 or the computing process 260, the control node 100 reads the contents of the file 131 from the memory area 222 of the physical memory 220 to which the file 131 is mapped, and overwrites the contents in the corresponding memory area 121 of the physical memory 120. Next, the control node 100 writes back the contents of the file 131 on the memory area 121 to the file 131 of the file system 130. As a result, the update contents made to the file 131 on the memory area 222 by the computing process 250 and the computing process 260 are reflected in the file 131 of the file system 130. At this point, if a computing node other than the computing node 200 on which the computing process 250 and the computing process 260 are running is connected to the control node 100, the update contents of the file 131 will be visible to the computing processes running on the other computing nodes.

[0073] As described above, in this embodiment, when a swap-out request is issued for the computing process 250 running on the computing node 200, the control node 100 is configured to write the contents of the file 131 mapped to the memory area 221 to a swap-out destination 129 different from the original file 131 before releasing the memory area 221 of the physical memory 220 that was mapped to the computing process 250. This makes it possible to prevent the contents of the file 131 on the file system 130 from changing depending on whether or not a swap-out has occurred.

[0074] Furthermore, in this embodiment, when a memory-mapped file request is issued by another computing process 260 operating on the same computing node 200 while the computing process 250 is swapped out, the control node 100 is configured to allocate the memory area 222 of the physical memory 220 to the computing process 260 and write back the contents of the file 131 written to the swap-out destination 129 to the memory area 222. Therefore, the latest contents of the file can be shared by the shared mapping between a plurality of computing processes operating on the same computing node 200.

[0075] Although the present invention has been described with reference to the above-mentioned embodiments, the present invention is not limited to the above-mentioned embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. For example, the information processing device may use a GPU (Graphic Processing Unit), a DSP (Digital Signal Processor), an MPU (Micro Processing Unit), an FPU (Floating number Processing Unit), a PPU (Physics Processing Unit), a TPU (Tensor Processing Unit), a quantum processor, a microcontroller, or a combination of these, instead of a CPU (Central Processing Unit). [Industrial Applicability]

[0076] The present invention can be applied to an information processing device in which a control node and one or more computing nodes are connected via an inter-node communication means, and can be used in particular in a parallel computer for HPC (High Performance Computing). [Explanation of symbols]

[0077] 100 Control Nodes 110 Computing node management means 120 physical memory 130 File Systems 131 Files 140 Means of data transfer 150, 160 Proxy process 170 Processors 180 Operating Systems 200 compute nodes 220 Physical Memory 240 Data transfer means 250, 260 Calculation process 270 Processor 1101 Swap-out destination information 1102 File management information 1103 Swap-out management information

Claims

1. A system includes a control node having an operating system installed therein, and a computing node having no operating system installed therein, the computing node being controlled by the control node; The control node: Prepare a swap-out destination, When a memory-mapped file request is issued by a first computing process running on the computing node with shared mapping, a first memory area of ​​a physical memory of the computing node is allocated to the first computing process, and the contents of the file are read into the first memory area; When a swap-out request is issued for the first computing process, the contents of the file stored in the first memory area are written to the swap-out destination before releasing the first memory area. Information processing device.

2. The control node further comprises: and when a memory mapped file request is issued by a second computing process running on the computing node using shared mapping, if the contents of the file have been written out to the swap-out destination, a second memory area of ​​the physical memory is allocated to the second computing process, and the contents of the file that have been written out to the swap-out destination are written back to the second memory area. The information processing device according to claim 1 .

3. The control node further comprises: when a swap-in request is made for the first computing process, and when the content of the file that has been written out to the swap-out destination is written back to the second memory area, the second memory area is allocated to the first computing process. The information processing device according to claim 2 .

4. The control node further comprises: when a swap-in request is made for the first computing process, if the contents of the file written out to the swap-out destination are not written back to the second memory area, a third memory area of ​​the physical memory is allocated to the first computing process, and the contents of the file written out to the swap-out destination are written back to the third memory area. The information processing device according to claim 3 .

5. The swap-out destination is a physical memory of the control node.

5. An information processing apparatus according to claim 1.

6. the swap-out destination is a file system of the control node; 5. An information processing apparatus according to claim 1.

7. The swap-out destination is provided for each of the computing nodes.

5. An information processing apparatus according to claim 1.

8. 1. An information processing method executed by an information processing device having a control node having an operating system installed and a computation node having no operating system installed, the computation node being controlled by the control node, comprising: The control node: Prepare a swap-out destination, When a memory-mapped file request is issued by a first computing process running on the computing node using shared mapping, a first memory area of ​​a physical memory of the computing node is allocated to the first computing process, and the contents of the file are read into the first memory area; When a swap-out request is issued for the first computing process, the contents of the file stored in the first memory area are written to the swap-out destination before the first memory area is released. Information processing methods.

9. A control node having an operating system installed therein and capable of controlling a compute node not having an operating system installed therein, Prepare a swap-out destination, When a memory-mapped file request is issued by a first computing process running on the computing node with shared mapping, a first memory area of ​​a physical memory of the computing node is allocated to the first computing process, and the contents of the file are read into the first memory area; When a swap-out request is issued for the first computing process, the contents of the file stored in the first memory area are written to the swap-out destination before releasing the first memory area. Control node.

10. A control node having an operating system installed therein and having a function of controlling a computing node not having an operating system installed therein, A process to prepare a swap-out destination, a process of allocating a first memory area of ​​a physical memory of the computing node to the first computing process and reading the contents of the file into the first memory area when a memory mapped file request is issued by a first computing process running on the computing node using shared mapping; a process of writing out the contents of the file stored in the first memory area to the swap-out destination before releasing the first memory area when a swap-out request for the first computing process is issued; A program to carry out the above.

Citation Information

Patent Citations

  • Parallel processing control device and job swap program

    JP2019020945A

  • Information processing apparatus

    JP2019139404A

  • Digital integrating circuit

    JP1989039887A