IP Library Granted Patent US 10,331,653
Granted Patent B2
US 10,331,653 · App. 15/193,877 · Granted Jun 25, 2019

Double-buffered locking in a database architecture

Inventors: Murray Wayne Peterson (Calgary, CA); Sheila Yvonne Stewart (Calgary, CA); Corvil Burdett Howells (Calgary, CA); Collin Miles Roth (Vancouver, CA)
Assignee: Schneider Electric Software, LLC
G06F16/2343
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,331,653
App. No.
15/193,877
Granted
Jun 25, 2019
Kind
B2
Abstract

Providing double-buffered record locking in a database architecture. Double-buffered database records enable multiple parallel read locks substantially simultaneously with one write lock to eliminate lock collisions between the read locks and the write lock.

Claims (37)

1. A real-time memory device comprising:

a first field header comprising a first buffer, wherein the first field header is in an edit state such that it is configured to have data values written thereto by a single writer thread;

a second field header comprising a second buffer, wherein the second field header includes a pointer to a current real-time data value corresponding to a process device within a continuous process, and wherein the second field header is in an active state such that it is configured to have the current real-time data values read therefrom by one or more reader threads; and

a record header comprising:

a first field pointer pointing to the first field header,

a second field pointer pointing to the second field header, and

a currently active pointer pointing to the second field pointer when the second field header is in the active state.

2. The real-time memory device of claim 1 , wherein the record header further comprises a write lock word data value to prevent more than one writer thread from writing data values to the first field header at a particular time.

3. The real-time memory device of claim 1 , wherein the first field header further comprises a read lock count data value and a number of fields data value, and wherein the second field header further comprises a read lock count data value and a number of fields data value.

4. The real-time memory device of claim 1 , wherein the first field header further comprises a pointer to a number of fields data value and a pointer to a pointer to a data value, and wherein the second field header further comprises a pointer to a number of fields data value and a pointer to a pointer to a data value.

5. The real-time memory device of claim 1 , wherein the single writer thread writes the data values to the first field header and the reader threads read the current real-time data values from the second field header substantially simultaneously.

6. A computer-implemented method comprising:

locking a first field header, the first field header being in an active state and comprising a database record corresponding to a process device within a continuous process;

identifying an active field header, wherein the active field header comprises one of the first field header and a second field header being in the active state, the second field header further comprising the database record, wherein the other of the first field header and the second field header comprises an edit field header, and wherein the active field header and the edit field header comprise a double buffer of the database record;

locking the second field header when the second field header is the active record header;

unlocking the first field header when the second field header is the active record header; and

reading a pointer value from a data field of the active field header.

7. The method of claim 6 , further comprising editing, by a writer, one or more values of the edit field header.

8. The method of claim 7 wherein said editing is substantially simultaneous with said reading.

9. The method of claim 6 , further comprising reading at least one data value from a memory location represented by the pointer value.

10. The method of claim 9 , further comprising unlocking the active field header to enable editing one or more values thereof by a writer.

11. A method comprising:

obtaining a write lock of a database record corresponding to a process device within a continuous process;

reading a first pointer to a first field header comprising the database record and a second pointer to a second field header comprising the database record;

identifying which of the first pointer and the second pointer is an active pointer, wherein the active pointer points to one of the first field header and the second field header in an active state;

identifying which of the first pointer and the second pointer is an edit pointer, wherein the edit pointer points to the other of the first field header and the second field header in an edit state;

copying data values in fields comprising the active field header into fields comprising the edit field header in response to the edit field header being unlocked; and

modifying the data values in the fields comprising the edit field header, wherein the modified data values correspond to configuration values of the process device.

12. The method of claim 11 , wherein said copying comprises shallow copying.

13. The method of claim 11 , wherein the edit field header being unlocked comprises a read lock count data value of the edit field header being equal to zero.

14. The method of claim 11 , further comprising releasing the write lock.

15. The method of claim 11 , further comprising swapping the active field header and the edit field header upon said releasing.

16. The method of claim 15 , further comprising:

unlocking the database record to enable modification of one or more values thereof by a writer; and

returning a success indicia for the unlock call.

17. The method of claim 11 , further comprising spinlocking said method until the edit field header is unlocked.

18. The method of claim 11 , further comprising reading the data values in the fields comprising the active field header substantially simultaneously with said modifying.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 27, 2017
From: INVENSYS SYSTEMS, INC.
To: SCHNEIDER ELECTRIC SOFTWARE, LLC
Reel/Frame 041383/0514 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 26, 2016
From: PETERSON, MURRAY WAYNE; STEWART, SHEILA YVONNE; HOWELLS, CORVIL BURDETT; ROTH, COLLIN MILES
To: INVENSYS SYSTEMS, INC.
Reel/Frame 039856/0151 →
Continuity (1)
Related Publication 20170371913A1 · Dec 28, 2017