×

Realtime-safe read copy update with lock-free readers

  • US 7,395,263 B2
  • Filed: 10/12/2005
  • Issued: 07/01/2008
  • Est. Priority Date: 10/12/2005
  • Status: Active Grant
First Claim
Patent Images

1. A method for realtime-safe detection of a grace period for deferring the destruction of a shared data element until pre-existing references to the data element are removed, comprising:

  • establishing a pair of counters for each of one or more processors;

    establishing a global counter selector that determines which counter of each per-processor counter pair is a current counter;

    when reading a shared data element at a processor;

    incrementing the current counter of said processor'"'"'s counter pair that corresponds to said global counter selector;

    testing for reversal of said processor'"'"'s counter pair to ensure that the incremented counter is still the current counter corresponding to said global counter selector;

    if a counter pair reversal has occurred such that said incremented counter has become the non-current counter, incrementing the other counter of said processor'"'"'s counter pair that has become the current counter;

    referencing said shared data element; and

    decrementing whichever counter of said processor'"'"'s counter pair remains incremented;

    updating said shared data element in a manner that preserves a pre-update version of said data element;

    switching said global counter selector to establish a new current counter of each per-processor counter pair;

    testing the non-current counter of each per-processor counter pair for zero; and

    destroying said shared data element'"'"'s pre-update version upon the non-current counter of each per-processor counter pair being zero.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×