FIELD: physics.
SUBSTANCE: invention relates to methods, a system and a data medium for controlling reading-writing of a shared memory resource. In the method, when a request for reading a shared memory resource or for writing to a shared memory resource occurs, performing an attempt to capture a read mutex and/or a write mutex, respectively, by performing a compare and swap (CAS) operation on the current value of the indicator, at that, upon successful execution of the CAS operation, a change in the value of the indicator tending from zero is performed, wherein, if said request, for which the CAS operation has been successfully performed, is a write request, then additionally setting the sign of the changed value of said indicator to the first sign, for each request, the value of said sign is checked and if the checked value of said sign is equal to a predetermined value, performing writing to the shared memory resource according to the write request from the author, if the checked value of the said indicator with a sign is different from the said predetermined value, performing reading from a shared memory resource according to a read request from a reader, upon completion of the write or read operation, the read mutex or the write mutex are released, respectively, by performing a CAS operation on the current value of the indicator, at which a change in the value of the indicator tending to zero is performed.
EFFECT: high efficiency of read and write operations of a shared resource.
19 cl, 4 dwg
Title | Year | Author | Number |
---|---|---|---|
REDUCING DEPENDENCE ON SYNCHRONIZATION IN GARBAGE COLLECTION TAG | 2020 |
|
RU2805768C2 |
METHOD FOR SEPARATING DATABASE OBJECTS BASED ON PRIVACY LABELS | 2017 |
|
RU2676223C1 |
SYSTEM AND METHOD OF ISOLATING RESOURCES USING RESOURCE MANAGERS | 2013 |
|
RU2571380C2 |
EXTENDED STORAGE WITHOUT LOCKS FOR MULTIPLE ACCESS METHODS | 2014 |
|
RU2672719C2 |
CONTROLLING RATE OF PROCESSING ADAPTER INTERRUPTION REQUESTS | 2010 |
|
RU2526287C2 |
METHOD AND SYSTEM FOR CALCULATING POINTER FOR SCALABLE PROGRAMMABLE CIRCULAR BUFFER | 2006 |
|
RU2395835C2 |
MEASURING TOOL FOR ADAPTER FUNCTIONS | 2010 |
|
RU2523194C2 |
METHOD OF OBTAINING WEB SERVICE INTERFACES FROM METADATA FORMS AND TABLES | 2008 |
|
RU2463653C2 |
LATE LOCK ACQUIRE MECHANISM FOR HARDWARE LOCK ELISION (HLE) | 2008 |
|
RU2501071C2 |
METHOD OF STOCHASTIC DISPATCHING OF SWITCH QUEUES, AND DEVICE ITS IMPLEMENTATION | 2017 |
|
RU2684581C2 |
Authors
Dates
2024-03-28—Published
2023-06-29—Filed