Data reading and writing method and device of shared memory

Embodiments of the invention provide a data reading and writing method and device of a shared memory. The shared memory comprises a first entity object and a second entity object. The method comprisesthe following steps of: obtaining a first index value by the first entity object; judging whether a...

Full description

Saved in:
Bibliographic Details
Main Authors YANG HUANJUN, LI PUJUN
Format Patent
LanguageChinese
English
Published 26.01.2018
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:Embodiments of the invention provide a data reading and writing method and device of a shared memory. The shared memory comprises a first entity object and a second entity object. The method comprisesthe following steps of: obtaining a first index value by the first entity object; judging whether a cache area corresponding to the first index has data or not by the first entity object, wherein thecache area comprises a plurality of data blocks; if the judging result is positive, writing the data into the data blocks by the first entity object; and reading the data from the data blocks by thesecond entity object. According to the method and device, the problem that data reading and writing only can be carried out in shared memories on the basis of exclusive locks in the prior art is solved; and meanwhile, through a corresponding relationship between index values and data blocks, the reading and writing operations of data can be completed in appointed data blocks after entity objects obtain corresponding index v
Bibliography:Application Number: CN20161566474