Data processing device, data processing method and program
The data processing device and method address data access conflicts and inconsistencies by using notification and confirmation functions to manage update flags, enabling seamless sequential and parallel operations.
Patent Information
- Application Number
- JP2024078092
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2025-11-26
AI Technical Summary
Conventional data processing technologies experience data access conflicts and inconsistencies, leading to program operation halts depending on the operating environment.
A data processing device and method that includes first and second functional units with notification and confirmation functions to manage data sharing, ensuring that update flags are checked and updated to prevent conflicts and inconsistencies.
Enables data processing while preventing data access conflicts and inconsistencies, allowing for both sequential and parallel operations to be performed without interruptions.
Smart Images

Figure 2025172535000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a data processing device, a data processing method, and a program. [Background technology]
[0002] In recent years, virtualization has been attracting attention in the field of networks. Virtualization allows the devices that make up a network to be used logically, regardless of the actual physical hardware configuration. To achieve this, devices that were previously made with dedicated hardware are being considered for configuration with general-purpose hardware, with functions implemented in software.
[0003] As an example of virtualization, an accelerator-based polling implementation method has been proposed, which has a lower load and better latency than conventional interrupt methods (see, for example, Non-Patent Document 1). In the technology described in Non-Patent Document 1, a shared memory is provided between a first function and a second function that perform arbitrary data processing in order to perform low-latency data transfer between the first function and the second function. The first function has functions of first data processing and update flag setting. The second function has functions of update flag checking, update flag resetting, and second data processing. Note that the first and second data processing are functions that perform arbitrary processing in the first and second functions, respectively. The update flag setting is a function that sets the update flag to 1, which indicates that data has been updated. The update flag checking is a function that repeatedly checks the update flag until it becomes 1, and when the flag becomes 1, proceeds to the next process. The update flag reset is a function that sets the update flag to 0, which indicates that data has not been updated. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Takahiro Suzuki, Sang-Yuep Kim, et al., “Low-Latency PON PHY Implementation on GPUs for Fully Software-Defined Access Networks”, NEXT-GENERATION OPTICAL ACCESS NETWORKS TO SUPPORT SUPER-BROADBAND SERVICES AND 5G / 6G MOBILE NETWORKS, IEEE, p108-114 2022 Summary of the Invention [Problem to be solved by the invention]
[0005] However, with the conventional technology, data access conflicts and inconsistencies can occur, which can lead to program operation halts depending on the operating environment.
[0006] The present invention has been made in consideration of the above-mentioned problems, and aims to provide a data processing device, a data processing method, and a program that can execute data processing while suppressing the occurrence of data access conflicts and inconsistencies. [Means for solving the problem]
[0007] A data processing device according to one embodiment of the present invention comprises a first functional unit and a second functional unit, wherein the first functional unit and the second functional unit perform processing and data sharing, the first functional unit comprises a notification function that updates whether the data can be shared and notifies the second functional unit, and a confirmation function that repeatedly checks variables until the data can be shared, and the second functional unit comprises a notification function that updates whether the data can be shared and notifies the first functional unit, and a confirmation function that repeatedly checks variables until the data can be shared.
[0008] A data processing method according to one embodiment of the present invention is a data processing method for a data processing device in which a first functional unit and a second functional unit perform processing and share data, wherein a notification function of the first functional unit updates whether the data can be shared and notifies the second functional unit, a confirmation function of the first functional unit repeatedly checks variables until the data can be shared, a notification function of the second functional unit updates whether the data can be shared and notifies the first functional unit, and a confirmation function of the second functional unit repeatedly checks variables until the data can be shared.
[0009] A program according to one aspect of the present invention is a program for causing a computer to function as the above-described data processing device. [Effects of the Invention]
[0010] According to the present invention, data processing can be executed while preventing data access conflicts and inconsistencies from occurring. [Brief explanation of the drawings]
[0011] [Figure 1] FIG. 1 illustrates an example of the configuration of a data processing device according to an embodiment. [Figure 2] FIG. 2 illustrates an example of software functions according to an embodiment. [Figure 3] FIG. 2 is a diagram illustrating an example of a software configuration according to the first embodiment. [Figure 4] 10 is a flowchart of a processing procedure of a first functional unit in the first embodiment. [Figure 5] 10 is a flowchart of a processing procedure of a second functional unit in the first embodiment. [Figure 6] FIG. 10 is a diagram illustrating an example of a software configuration according to a second embodiment. [Figure 7] 10 is a flowchart of a processing procedure of a first functional unit in the second embodiment. [Figure 8] 10 is a flowchart of a processing procedure of a second functional unit in the second embodiment. [Figure 9]FIG. 11 is a diagram illustrating an example of a software configuration according to a third embodiment. [Figure 10] 11 is a flowchart of a processing procedure of a plurality of functional units in the third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0012] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram illustrating an example of the configuration of a data processing device 1 according to this embodiment. The data processing device 1 is, for example, a server cluster. The data processing device 1 is configured with a single or multiple nodes 2 (2-1, ..., 2-N) (N is an integer equal to or greater than 1). Each node is configured with, for example, CPUs 21 (21-1, ..., 21-N), accelerators 22 (22-1, ..., 22-N), IF cards 23 (23-1, ..., 23-N), software 24 (24-1, ..., 24-N), and memories 25 (25-1, ..., 25-N). Each node 2 includes multiple CPUs 21, accelerators 22, and IF cards 23.
[0013] The CPU 21 performs calculation processing.
[0014] The accelerator 22 performs arithmetic processing on behalf of the CPU 21 for high-load processing.
[0015] The IF card 23 is an interface card that inputs and outputs external signals to and from the node.
[0016] The software 24 writes instructions to perform calculations in hardware. The software 24 checks the status of shared resources in each function when accessing the shared memory 25. If the shared resource is not being used by another function, the software 24 occupies and uses the memory. After use, the software 24 releases the occupancy. The software 24 accesses the shared memory 25, checks the update flags (variables) indicating its own update permission in both the first functional unit 241 (FIG. 2) and the second functional unit 242 (FIG. 2). After operating the function requiring serialization, the software 24 updates the update flags to indicate that its own update is not permitted and that the update of the other function is permitted, thereby performing processing that enables parallel operation. Even when the first functional unit 241 and the second functional unit 242 operate in independent memory spaces, the software 24 similarly notifies the first functional unit 241 and the second functional unit 242 of data update permission by communicating the update flags, and also communicates the data itself between them. In the following description, the "update flag" is also referred to as the "flag." This flag indicates whether data sharing is enabled. An example of a processing procedure by the software 24 will be described in each embodiment.
[0017] The memory 25 is shared by each function of the software 24. Alternatively, the memory 25 is used independently by each function of the software 24.
[0018] FIG. 2 is a diagram showing an example of the functions of the software of this embodiment. As shown in FIG. 2, the software 24 has a plurality of functions. The software 24 includes, for example, a first functional unit 241 and a second functional unit 242. Each of the first functional unit 241 and the second functional unit 242 includes, for example, The software 24 includes a sequential operation processing 245 (sequential operation processing function), a parallel operation processing 246 (parallel operation processing function), and a sequential operation processing 247 (sequential operation processing function). In this way, the software 24 has a mixture of the sequential operation processing 245, 247, and the parallel operation processing 246 among its functions.
[0019] The sequential operation processes 245 and 247 are functions that operate sequentially, and require sequentiality of calculations due to processes that share memory with other functions. The sequential operation process 245 exchanges data with the sequential operation process 247 of the preceding functional unit, and with the parallel operation process 246 in the same functional unit. The sequential operation process 247 exchanges data with the sequential operation process 245 of the following functional unit, and with the parallel operation process 246 in the same functional unit.
[0020] The parallel operation processing 246 is a function that operates in parallel and performs functions that do not require serialization, such as processing using local variables.
[0021] With this configuration, according to this embodiment, a function that requires serialization between two functions and a function that can operate in parallel can be repeatedly performed while avoiding data access conflicts and data inconsistencies that occur when processing serialization is not maintained.
[0022] [First Example] In the first embodiment, the data processing device 1 stores update flags, data, and the state of shared resources in the shared memory 25. Fig. 3 is a diagram showing an example of the software configuration in Example 1. As shown in Fig. 3, the first function unit 241A has, for example, the functions of a flag update notification waiting function unit 261-1 (confirmation function), a lock acquisition function unit 262-1 (confirmation function), sequential operation processing 245-1, 247-1 (sequential operation processing function), an update flag setting function unit 263-1 (notification function), a lock release function unit 264-1 (notification function), a flag update notification function unit 265-1 (notification function), and a parallel operation processing 246-1 (parallel operation processing function). The second function unit 242A has, for example, the functions of a flag update notification waiting function unit 261-2 (confirmation function), a lock acquisition function unit 262-2 (confirmation function), sequential operation processing 245-2, 247-2 (sequential operation processing function), an update flag setting function unit 263-2, a lock release function unit 264-2, a flag update notification function unit 265-2 (notification function), and parallel operation processing 246-2 (parallel operation processing function).
[0023] The variables in the shared memory 25 (FIG. 1) are update flags (variables), data, and the state of the shared resources.
[0024] FIG. 4 is a flowchart of the processing procedure of the first functional unit in the first embodiment. (Step S11) The flag update notification waiting function unit 261-1 waits until it receives a flag update notification, and determines whether the received flag is 0 or 1. If the lock has not been acquired by another function and the flag is 0 (Flag=0), the flag update notification waiting function unit 261-1 performs flag update notification waiting processing again. If the lock has not been acquired by another function and the flag is 1 (Flag=1), the flag update notification waiting function unit 261-1 proceeds to processing in step S12. If the lock has been acquired by another function, the flag update notification waiting function unit 261-1 waits for a notification from the flag update notification, and if the update flag is 0 (Flag=0) when the notification arrives, it performs flag update notification waiting processing again. If the lock has been acquired by another function, the flag update notification waiting function unit 261-1 waits for a notification from the flag update notification, and if the update flag is 1 (Flag=1) when the notification arrives, it proceeds to processing in step S12. In the first functional unit 241A, Flag=1 indicates that data can be shared, and Flag=0 indicates that data cannot be shared.
[0025] (Step S12) The lock acquisition function unit 262-1 prevents (locks) other functions from accessing the shared memory 25 based on the state of the shared resource.
[0026] (Step S13) The sequential operation processes 245-1 and 247-1 perform sequential operation processes.
[0027] (Step S14) The update flag setting function unit 263-1 sets the update flag Flag to 0. That is, the update flag setting function unit 263-1 sets the update flag Flag to a state in which data sharing is not possible.
[0028] (Step S15) The lock release function unit 264-1 releases the function that prevents other functions from accessing the shared memory 25 based on the state of the shared resource.
[0029] (Step S16) The flag update notification function unit 265-1 notifies all function units including the second function unit 242A that the flag Flag has been updated.
[0030] (Step S17) The parallel operation processing 246-1 performs the parallel operation processing. After the processing, the parallel operation processing 246-1 returns to the processing of step S11.
[0031] FIG. 5 is a flowchart of the processing procedure of the second functional unit in the first embodiment. (Step S21) The flag update notification waiting function unit 261-2 waits until it receives a flag update notification, and determines whether the received flag is 0 or 1. If the lock has not been acquired by another function, and if the flag is 1 (Flag=1), the flag update notification waiting function unit 261-2 performs waiting processing for the flag update notification again. If the lock has not been acquired by another function, and if the flag is 0 (Flag=0), the flag update notification waiting function unit 261-2 proceeds to processing in step S22. If the lock has been acquired by another function, the flag update notification waiting function unit 261-2 waits for a notification from the flag update notification, and if the update flag is 1 (Flag=1) when the notification arrives, performs waiting processing for the flag update notification again. If the lock has been acquired by another function, the flag update notification waiting function unit 261-2 waits for a notification from the flag update notification, and if the update flag is 0 (Flag=0) when the notification arrives, proceeds to processing in step S22. In the second functional unit 242A, Flag=0 indicates that data can be shared, and Flag=1 indicates that data cannot be shared.
[0032] (Step S22) The lock acquisition function unit 262-2 prevents (locks) other functions from accessing the shared memory 25 based on the state of the shared resource.
[0033] (Step S23) The sequential operation processes 245-2 and 247-2 perform sequential operation processes.
[0034] (Step S24) The update flag setting function unit 263-2 sets the update flag Flag to 1. That is, the update flag setting function unit 263-2 sets the update flag Flag to a state in which data sharing is not possible.
[0035] (Step S25) The lock release function unit 264-2 releases the function that prevents other functions from accessing the shared memory 25 based on the state of the shared resource.
[0036] (Step S26) The flag update notification function unit 265-2 notifies all function units including the first function unit 241A that the flag Flag has been updated.
[0037] (Step S27) The parallel operation processing 246-2 performs the parallel operation processing. After the processing, the parallel operation processing 246-2 returns to the processing of step S21.
[0038] In this embodiment, by using the configurations of Figures 1 and 3 and the processing of Figures 4 and 5, update flags are mutually and exclusively set between the first functional unit 241A and the second functional unit 242A, which makes it possible to realize alternate sequential operation processing between the first functional unit 241A and the second functional unit 242A, unlike conventional methods.
[0039] [Second Example] In the second embodiment, the data processing device 1 performs memory copy as sequential operation processing. At that time, the data processing device 1 performs processing on local variables that are not shared between the first function unit 241B and the second function unit 242B.
[0040] Fig. 6 is a diagram showing an example of the software configuration in Example 2. As shown in Fig. 6, the first function unit 241B has, for example, the functions of a flag update notification waiting function unit 261-1 (confirmation function), a lock acquisition function unit 262-1 (confirmation function), sequential operation processing 245B-1, 247B-1 (sequential operation processing function), an update flag setting function unit 263-1 (notification function), a lock release function unit 264-1 (notification function), a flag update notification function unit 265-1 (notification function), and a parallel operation processing 246-1 (parallel operation processing function). The second function unit 242B has, for example, the functions of a flag update notification waiting function unit 261-2 (confirmation function), a lock acquisition function unit 262-2 (confirmation function), sequential operation processing 245B-2, 247B-2 (sequential operation processing function), an update flag setting function unit 263-2 (notification function), a lock release function unit 264-2 (notification function), a flag update notification function unit 265-2 (notification function), and parallel operation processing 246-2 (parallel operation processing function).
[0041] The variables in the shared memory 25 (FIG. 1) are update flags, data, and the state of the shared resources.
[0042] FIG. 7 is a flowchart of the processing procedure of the first functional unit in the second embodiment. (Step S31) The flag update notification waiting function unit 261-1 waits until it receives a flag update notification, and determines whether the received flag is 0 or 1. If the lock has not been acquired by another function and the flag is 0 (Flag=0), the flag update notification waiting function unit 261-1 performs a flag update notification waiting process again. If the lock has not been acquired by another function and the flag is 1 (Flag=1), the flag update notification waiting function unit 261-1 proceeds to the process of step S32. If the lock has been acquired by another function, the flag update notification waiting function unit 261-1 waits for a notification from the flag update notification, and if the update flag is 0 (Flag=0) when the notification arrives, it performs a flag update notification waiting process again. If the lock has been acquired by another function, the flag update notification waiting function unit 261-1 waits for a notification from the flag update notification, and if the update flag is 1 (Flag=1) when the notification arrives, it proceeds to the process of step S32.
[0043] (Step S32) The lock acquisition function unit 262-1 prevents (locks) other functions from accessing the shared memory 25 based on the state of the shared resource.
[0044] (Step S33) The sequential operation processes 245B-1 and 247B-1 copy local variables stored in the memory 25 to shared variables (memory copy) as sequential operation processes.
[0045] (Step S34) The update flag setting function unit 263-1 sets the update flag Flag to 0. That is, the update flag setting function unit 263-1 sets the update flag Flag to a state in which data sharing is not possible.
[0046] (Step S35) The lock release function unit 264-1 releases the function that prevents other functions from accessing the shared memory 25 based on the state of the shared resource.
[0047] (Step S36) The flag update notification function unit 265-1 notifies all function units including the second function unit 242B that the flag Flag has been updated.
[0048] (Step S37) The parallel operation processing 246-1 performs the parallel operation processing. After the processing, the parallel operation processing 246-1 returns to the processing of step S31.
[0049] FIG. 8 is a flowchart of the processing procedure of the second functional unit in the first embodiment. (Step S41) The flag update notification waiting function unit 261-2 waits until it receives a flag update notification, and determines whether the received flag is 0 or 1. If the lock has not been acquired by another function, and if the flag is 1 (Flag=1), the flag update notification waiting function unit 261-2 performs a flag update notification waiting process again. If the lock has not been acquired by another function, and if the flag is 0 (Flag=0), the flag update notification waiting function unit 261-2 proceeds to the process of step S42. If the lock has been acquired by another function, the flag update notification waiting function unit 261-2 waits for a notification from the flag update notification, and if the update flag is 1 (Flag=1) when the notification arrives, performs a flag update notification waiting process again. If the lock has been acquired by another function, the flag update notification waiting function unit 261-2 waits for a notification from the flag update notification, and if the update flag is 0 (Flag=0) when the notification arrives, proceeds to the process of step S42.
[0050] (Step S42) The lock acquisition function unit 262-2 prevents (locks) other functions from accessing the shared memory 25 based on the state of the shared resource.
[0051] (Step S43) The sequential operation processes 245B-2 and 247B-2 copy shared variables stored in the memory 25 to local variables (memory copy) as sequential operation processes.
[0052] (Step S44) The update flag setting function unit 263-2 sets the update flag Flag to 1. That is, the update flag setting function unit 263-2 sets the update flag Flag to a state in which data sharing is not possible.
[0053] (Step S45) The lock release function unit 264-2 releases the function that prevents other functions from accessing the shared memory 25 based on the state of the shared resource.
[0054] (Step S46) The flag update notification function unit 265-2 notifies all function units including the first function unit 241B that the flag Flag has been updated.
[0055] (Step S47) The parallel operation processing 246-2 performs the parallel operation processing. After the processing, the parallel operation processing 246-2 returns to the processing of step S41.
[0056] In steps S33 and S43, the storage locations of the local variables and shared variables are not limited to memories connected to (or built into) the CPU 21, but may also be memories connected to (or built into) the accelerator 22, or may be memories of the CPU 21 or accelerator 22 of different nodes.
[0057] 7 and 8, the example of data transfer is described in which data is transferred from the first functional unit 241B to the second functional unit 242B, but this is not limiting. Data may be transferred from the second functional unit 242B to the first functional unit 241B by the first functional unit 241B performing memory copying from shared variables to local variables, and the second functional unit 242B performing memory copying from local variables to shared variables.
[0058] [Third Example] In this embodiment, data is transferred while performing sequential operation processing and parallel operation processing in a plurality of first functional units, second functional units, ..., Nth functional unit, N+1th functional unit, ... provided in the software 24.
[0059] Fig. 9 is a diagram showing an example of the software configuration in Example 3. As shown in Fig. 9, the software 24C includes a first functional unit 241C-(1), ..., an N-1th functional unit 241C-(N-1), an Nth functional unit 241C-(N), an N+1th functional unit 241C-(N+1), .... Each function unit 241C has, for example, a flag update notification waiting function unit 261-1 (confirmation function), a lock acquisition function unit 262-1 (confirmation function), sequential operation processing 245-1, 247-1 (sequential operation processing function), an update flag setting function unit 263-1 (notification function), a lock release function unit 264-1 (notification function), a flag update notification function unit 265-1 (notification function), and a parallel operation processing 246-1 (parallel operation processing function).
[0060] 10 is a flowchart of the processing procedure of multiple functional units in the third embodiment. The variables in the shared memory 25 are update flags (..., Flag[N], Flag[N+1],...), data, and the state of the shared resources.
[0061] (Step S51) The flag update notification waiting function unit 261-(N) of the Nth function unit 241C-(N) waits until it receives a flag update notification and determines whether the received flag Flag[N] is 0 or 1. If the lock has not been acquired by another function and the flag Flag[N] is 1 (Flag[N]=1), the flag update notification waiting function unit 261-(N) performs the flag update notification waiting process again. If the lock has not been acquired by another function and the flag Flag[N] is 0 (Flag[N]=1), the flag update notification waiting function unit 261-(N) proceeds to the process of step S52. If the lock has been acquired by another function, the flag update notification waiting function unit 261-(N) waits for a notification from a flag update notification, and when the notification arrives, if the update flag Flag[N] is 1 (Flag[N]=1), it performs the flag update notification waiting process again. If the lock has been acquired by another function, the flag update notification waiting function unit 261-(N) waits for a notification from the flag update notification, and when the notification arrives, if the update flag Flag[N] is 0 (Flag[N]=0), the process proceeds to step S52.
[0062] (Step S52) The lock acquisition function unit 262-(N) of the Nth function unit 241C-(N) prevents (locks) other functions from accessing the shared memory 25 based on the state of the shared resource.
[0063] (Step S53) The sequential operation processes 245-(N) and 247-(N) of the Nth functional unit 241C-(N) perform sequential operation processes.
[0064] (Step S54) The update flag setting function unit 263-(N) of the Nth function unit 241C-(N) sets the update flag Flag[N] to 1.
[0065] (Step S55) The lock release function unit 264-(N) of the Nth function unit 241C-(N) releases the function that prevents other functions from accessing the shared memory 25 based on the state of the shared resource.
[0066] (Step S56) The flag update notification function unit 265-(N) of the Nth functional unit 241C-(N) notifies all functional units, including the N-1th functional unit 241C-(N-1) and the N+1th functional unit 241C-(N+1), that the flag Flag[N] has been updated.
[0067] (Step S57) The parallel operation processing 246-(N) of the Nth functional unit 241C-(N) performs parallel operation processing.
[0068] (Step S58) The flag update notification waiting function unit 261-(N) waits until it receives a flag update notification and determines whether the received flag Flag[N+1] is 0 or 1. If the lock has not been acquired by another function and the flag Flag[N+1] is 0 (Flag[N+1]=0), the flag update notification waiting function unit 261-(N) performs the flag update notification waiting process again. If the lock has not been acquired by another function and the flag Flag[N+1] is 1 (Flag[N+1]=1), the flag update notification waiting function unit 261-(N) proceeds to the process of step S59. If the lock has been acquired by another function, the flag update notification waiting function unit 261-(N) waits for a notification from a flag update notification, and when the notification arrives, if the update flag Flag[N+1] is 1 (Flag[N+1]=0), it performs the flag update notification waiting process again. If the lock has been acquired by another function, the flag update notification waiting function unit 261-(N) waits for a notification from the flag update notification, and when the notification arrives, if the update flag Flag[N+1] is 1 (Flag[N+1]=1), it proceeds to processing in step S59.
[0069] (Step S59) The lock acquisition function unit 262-(N) of the Nth function unit 241C-(N) prevents (locks) other functions from accessing the shared memory 25 based on the state of the shared resource.
[0070] (Step S60) The sequential operation processes 245-(N) and 247-(N) of the Nth functional unit 241C-(N) perform sequential operation processes.
[0071] (Step S61) The update flag setting function unit 263-(N) of the Nth function unit 241C-(N) sets the update flag Flag[N+1] to 0.
[0072] (Step S62) Based on the state of the shared resource, the lock release function unit 264-(N) of the Nth function unit 241C-(N) releases the function that prevents other functions from accessing the shared memory 25. After the processing, the lock release function unit 264-(N) returns to the processing of step S51.
[0073] Thus, in the third embodiment, the flag update notification waiting function unit 261-(N) (confirmation function) and lock acquisition function unit 262-(N) (confirmation function) of the Nth function unit 241C-(N) (first function unit) determine whether the update flag Flag[N] (variable) of the Nth function unit 241C-(N) (first function unit) has become data shareable, and when the update flag Flag[N] (variable) has become data shareable, prevent other function units from accessing the shared memory based on the state of the shared resource. Then, in the third embodiment, the sequential operation processing 245-(N), 247-(N) (sequential operation processing function) performs sequential operation processing after the confirmation function has performed processing. In the third embodiment, the update flag setting function unit 263-1 (notification function), the lock release function unit 262-1 (notification function), and the flag update notification function unit 265-1 (notification function) of the Nth functional unit 241C-(N) (first functional unit) set the update flag Flag[N] (variable) of the Nth functional unit 241C-(N) (first functional unit) to a state in which data is not shareable, release the function that prevents other functional units from accessing the shared memory based on the state of the shared resource, and notify the other functional units that the variable has been updated. In the third embodiment, the parallel operation processing 246-(N) (parallel operation processing function) performs parallel operation processing after the notification function has performed processing following sequential operation processing. In the third embodiment, the flag update notification waiting function unit 261-(N) (confirmation function) and lock acquisition function unit 262-(N) (confirmation function) of the Nth function unit 241C-(N) (first function unit) determine whether the update flag Flag[N+1] (variable) of the N+1th function unit 241C-(N+1) (second function unit) has become capable of sharing data, and when the update flag Flag[N+1] (variable) has become capable of sharing data, prevent other function units from accessing the shared memory based on the state of the shared resource. In the third embodiment, the sequential operation processing 245-(N), 247-(N) (sequential operation processing function) units perform sequential operation processing after the confirmation function has performed processing.In the third embodiment, the update flag setting function unit 263-1 (notification function), the lock release function unit 262-1 (notification function), and the flag update notification function unit 265-1 (notification function) of the Nth functional unit 241C-(N) (first functional unit) set the update flag Flag[N+1] (variable) of the N+1th functional unit 241C-(N+1) (second functional unit) to a state in which data is not shareable, and release the function that prevents other functional units from accessing the shared memory based on the state of the shared resource.
[0074] According to the third embodiment, through the processing of Figure 10, Flag[N] is shared between the N-1th functional unit 241C-(N-1) and the Nth functional unit 241C-(N), Flag[N+1] is shared between the N+1th functional unit 241C-(N+1) and the Nth functional unit 241C-(N), and information on whether data updates are permitted or not is shared.
[0075] As described above, in each embodiment, when accessing the shared memory 25, each functional unit checks the status of the shared resource, and if it is not being used by another function, it occupies and uses the memory for use, and then releases the occupancy after use. In each embodiment, the shared memory 25 is accessed, and both the first functional unit 241 (or 241A, 241B) and the second functional unit 242 (or 242A, 242B) check their own update flags indicating that their own updates are permitted, and after operating a function requiring serialization, the update flags are updated to indicate that their own updates are not permitted and that updates are permitted for the opposing function, thereby performing processing that enables parallel operation. In each embodiment, even when the first functional unit 241 (or 241A, 241B) and the second functional unit 242 (or 242A, 242B) operate in independent memory spaces, data update permission is similarly notified by communication of the update flag, and the data itself is also communicated between them.
[0076] As a result, according to each embodiment, it becomes possible to repeatedly perform functions that require serialization and functions that can operate in parallel between two functional units while avoiding data access conflicts and data inconsistencies that occur when processing serialization is not maintained.
[0077] All or part of the functions of the data processing device 1 may be realized using hardware such as an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array). The program may be recorded on a computer-readable recording medium. Examples of computer-readable recording media include portable media such as flexible disks, magneto-optical disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into computer systems. The program may be transmitted via a telecommunications line.
[0078] The embodiments and examples of the present invention have been described in detail above with reference to the drawings, but the specific configurations are not limited to these embodiments and examples, and include designs within the scope of the gist of the present invention. [Explanation of symbols]
[0079] 1...data processing device, 2,2-1,···,2-N...node, 21,21-1,···,21-N...CPU, 22,22-1,···,22-N...accelerator, 23,23-1,···,23-N...IF card, 24,24-1,···,24-N...software, 25,25-1,···,25-N...memory, 241,241A,241B...first functional unit, 242,242A,242B...second functional unit, 241,241A,241B,242,242A,242B,···,241C-(N-1),241C(N),241C-(N+1),···...functional unit, 245, 2 47, 245-1, 245-2, 245B-1, 245B-2, 247-1, 247-2, 247B-1, 247B-2... sequential operation processing, 246, 246-1, 246-2... parallel operation processing, 261, 261-1, 261-2, 261-(N)... flag update notification waiting function unit, 262, 262-1, 262-2, 262-(N)... lock acquisition function unit, 263, 263-1, 263-2, 263-(N)... update flag setting function unit, 264, 264-1, 264-2, 264-(N)... lock release function unit, 265, 265-1, 265-2, 265-(N)... flag update notification function unit
Claims
1. The device includes a first functional unit and a second functional unit, the first functional unit and the second functional unit share processing and data; The first functional unit is a notification function that updates whether the data can be shared and notifies the second functional unit of the result; a confirmation function for repeatedly checking variables until the data can be shared; The second functional unit is a notification function that updates whether the data can be shared and notifies the first functional unit of the result; a confirmation function that repeatedly checks variables until the data can be shared; A data processing device comprising:
2. The confirmation function is determining whether the variable has become capable of sharing the data, and when the variable has become capable of sharing the data, preventing other functional units from accessing the shared memory based on the state of the shared resource; 2. The data processing device according to claim 1.
3. The notification function is setting said variable to a state where said data is not shareable; Based on the state of the shared resource, release a function that prevents other functional units from accessing the shared memory; notifying other functional units that the variable has been updated; 2. The data processing device according to claim 1.
4. The variables of the memory shared by the first functional unit and the second functional unit are the variables, the data, and the state of a shared resource; 2. The data processing device according to claim 1.
5. a sequential operation processing function that performs sequential operation processing after the confirmation function has performed the processing; a parallel operation processing function that performs parallel operation processing after the notification function has performed the sequential operation processing; The data processing apparatus of claim 1 , comprising:
6. The first functional unit is a sequential operation processing function for performing sequential operation processing; a parallel operation processing function for performing parallel operation processing; variables of the memory shared by the first functional unit and the second functional unit are the variables, the data, and a state of a shared resource; the confirmation function of the first functional unit determines whether the variable of the first functional unit has become capable of sharing the data, and when the variable has become capable of sharing the data, prevents other functional units from accessing the shared memory based on the state of the shared resource; the sequential operation processing function performs sequential operation processing after the confirmation function has performed processing; the notification function of the first functional unit sets the variable of the first functional unit to a state in which the data is not shareable, releases a function that prevents other functional units from accessing the shared memory based on the state of the shared resource, and notifies other functional units that the variable has been updated; the parallel operation processing function performs the parallel operation processing after the sequential operation processing and the notification function has performed the processing; the confirmation function of the first functional unit determines whether the variable of the second functional unit has become capable of sharing the data, and when the variable has become capable of sharing the data, prevents other functional units from accessing the shared memory based on the state of the shared resource; the pre-sequential operation processing unit performs a sequential operation process after the confirmation function has performed the process; the notification function of the first functional unit sets the variable of the second functional unit to a state in which the data is not shareable, and releases a function that prevents other functional units from accessing the shared memory based on the state of the shared resource; 2. The data processing device according to claim 1.
7. A data processing method for a data processing device in which a first functional unit and a second functional unit share processing and data, a notification function of the first functional unit updates whether the data can be shared and notifies the second functional unit; a confirmation function of the first functional unit repeatedly confirms variables until the data can be shared; a notification function of the second functional unit updates whether the data can be shared and notifies the first functional unit; The confirmation function of the second functional unit repeatedly checks the variables until the data can be shared. Data processing methods.
8. Computer, A program for causing the data processing device according to any one of claims 1 to 6 to function.