Methods and devices for reading and updating storage region

A storage area and updated technology, applied in the computer field, can solve the problem that read and write operations cannot be executed concurrently

Active Publication Date: 2014-10-01
HUAWEI TECH CO LTD
View PDF4 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present invention provides a method and device for reading and updating a storage area to solve the defect that the read and write operations of accessing the same storage area cannot be performed concurrently

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Methods and devices for reading and updating storage region
  • Methods and devices for reading and updating storage region
  • Methods and devices for reading and updating storage region

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] figure 1 It is a flowchart of a method for reading a storage area provided by an embodiment of the present invention. Such as figure 1 As shown, the method provided in this embodiment includes:

[0033] Step 11: Read the first version identifier of the storage area, read data information from the storage area, and read the second version identifier of the storage area. Initially, the first version identification is consistent with the second version identification, and when the storage area is updated, the update of the first version identification occurs after updating the data information in the storage area, and the second version identification The updating of the identification occurs before updating the data information in the storage area.

[0034] The control information of the storage area includes: a first version identifier and a second version identifier. The version identification can be realized by integer variable int type or unsigned integer variable u...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides methods and devices for reading and updating a storage region, wherein the method for reading the storage region comprises the following steps that: a first version mark of the storage region is read; data information is read from the storage region; a second version mark of the storage region is read; if the first version mark is different from the second version mark, the occurrence of read / write conflicts in the storage region in the process from the reading of the first version mark to the reading of the second version mark is determined, and the previous steps are repeatedly executed; and no occurrence of the read / write conflicts in the storage region is determined until the previously read first version mark maintains consistent with the later read second version mark. The method for updating the storage region comprises the following steps that: the second version mark of the storage region is updated; data information stored in the storage region is updated; and the first version mark of the storage region is updated, so that the updated first version mark maintains consistent with the updated second version mark. The write concurrent execution cannot cause the system thrashing, and the concurrent execution of the read and write operation can be carried out in the same storage region.

Description

technical field [0001] The embodiment of the present invention relates to computer technology, and in particular to a method and device for reading and updating a storage area. Background technique [0002] In the multi-core era, due to the bottleneck in the increase of the main frequency of the processor, the computer mainly uses parallel computing to increase the operating speed. In the process of parallel computing, it is often necessary to perform read and write operations on the shared memory area. When two or more cores execute multiple read and write instructions on the same memory area at the same time, due to multiple read and write instructions on the system bus The write operation instructions may be executed in any combination order, which will cause the execution result of the program to be inconsistent with that of the two read and write instructions executed separately. [0003] The solutions provided by prior art 1, such as the Hibernate solution, use optimi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F3/06
Inventor 封泽希
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products