Data Synchronization Method and Apparatus
First Claim
1. A data synchronization method, comprising:
- scanning, by a code scanning unit, a code to capture a synchronization instruction;
replacing, by the code scanning unit, the captured synchronization instruction with a trap instruction; and
when the code runs to the trap instruction, obtaining, by a distributed shared memory (DSM) unit, a code execution right, wherein the DSM unit implements a concurrent multi-write protocol, and wherein the DSM unit implements a single-write protocol when executing the synchronization instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present invention provide a data synchronization method and apparatus. The method includes: scanning a code to capture a synchronization instruction; replacing the captured synchronization instruction with a trap instruction; and when the code runs to the trap instruction, trapping a code execution right into a distributed shared memory (DSM) unit, where the DSM unit implements a concurrent multi-write protocol, but implements a single-write protocol when executing the synchronization instruction, thereby supporting the concurrent multi-write protocol and solving the synchronization problem caused by the concurrent multi-write protocol.
6 Citations
18 Claims
-
1. A data synchronization method, comprising:
-
scanning, by a code scanning unit, a code to capture a synchronization instruction; replacing, by the code scanning unit, the captured synchronization instruction with a trap instruction; and when the code runs to the trap instruction, obtaining, by a distributed shared memory (DSM) unit, a code execution right, wherein the DSM unit implements a concurrent multi-write protocol, and wherein the DSM unit implements a single-write protocol when executing the synchronization instruction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A data synchronization apparatus, comprising:
-
a code scanning unit configured to scan a code to capture a synchronization instruction, and replace the captured synchronization instruction with a trap instruction; and a distributed shared memory (DSM) unit configured to obtain a code execution right when the code runs to the trap instruction, wherein the DSM unit implements a concurrent multi-write protocol, and wherein the DSM unit implements a single-write protocol when executing the synchronization instruction. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A data processing system, comprising:
-
an operating system; and a data synchronization apparatus that runs under the operating system, wherein the data synchronization apparatus comprises; a code scanning unit configured to scan a code to capture a synchronization instruction, and replace the captured synchronization instruction with a trap instruction; and a distributed shared memory (DSM) unit configured to obtain a code execution right when the code runs to the trap instruction, wherein the DSM unit implements a concurrent multi-write protocol, and wherein the DSM unit implements a single-write protocol when executing the synchronization instruction.
-
Specification