User-level read-copy update that does not require disabling preemption or signal handling
First Claim
1. A user-level read-copy update (RCU) method, comprising:
- establishing a user-level RCU subsystem that executes within threads of a user-level multithreaded application;
said multithreaded application comprising one or more reader threads that read RCU-protected data elements in a shared memory;
said multithreaded application comprising one or more updater threads that update said RCU-protected data elements in said shared memory;
said reader threads and said updater threads being preemptible and comprising signal handlers that process signals;
implementing a reader registration component in said RCU subsystem that registers said reader threads for RCU critical section processing, said reader registration component performing reader registration while said reader threads remain preemptible and with their signal handlers being operational;
implementing a reader unregistration component in said RCU subsystem that unregisters said reader threads from RCU critical section processing, said reader unregistration component performing reader unregistration while said reader threads remain preemptible and their signal handlers are operational; and
implementing a grace period detection component in said RCU subsystem that considers a registration status of said reader threads and determines when it is safe to perform RCU second-phase update processing to remove stale versions of updated data elements that are being referenced by said reader threads, or take other RCU second-phase update processing actions.
1 Assignment
0 Petitions
Accused Products
Abstract
A user-level read-copy update (RCU) technique. A user-level RCU subsystem executes within threads of a user-level multithreaded application. The multithreaded application may include reader threads that read RCU-protected data elements in a shared memory and updater threads that update such data elements. The reader and updater threads may be preemptible and comprise signal handlers that process signals. Reader registration and unregistration components in the RCU subsystem respectively register and unregister the reader threads for RCU critical section processing. These operations are performed while the reader threads remain preemptible and with their signal handlers being operational. A grace period detection component in the RCU subsystem considers a registration status of the reader threads and determines when it is safe to perform RCU second-phase update processing to remove stale versions of updated data elements that are being referenced by the reader threads, or take other RCU second-phase update processing actions.
-
Citations
20 Claims
-
1. A user-level read-copy update (RCU) method, comprising:
-
establishing a user-level RCU subsystem that executes within threads of a user-level multithreaded application; said multithreaded application comprising one or more reader threads that read RCU-protected data elements in a shared memory; said multithreaded application comprising one or more updater threads that update said RCU-protected data elements in said shared memory; said reader threads and said updater threads being preemptible and comprising signal handlers that process signals; implementing a reader registration component in said RCU subsystem that registers said reader threads for RCU critical section processing, said reader registration component performing reader registration while said reader threads remain preemptible and with their signal handlers being operational; implementing a reader unregistration component in said RCU subsystem that unregisters said reader threads from RCU critical section processing, said reader unregistration component performing reader unregistration while said reader threads remain preemptible and their signal handlers are operational; and implementing a grace period detection component in said RCU subsystem that considers a registration status of said reader threads and determines when it is safe to perform RCU second-phase update processing to remove stale versions of updated data elements that are being referenced by said reader threads, or take other RCU second-phase update processing actions. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A data processing system for implementing user-level read-copy update (RCU), comprising:
-
one or more processors; a memory coupled to said one or more processors, said memory including a machine-readable medium tangibly embodying at least one program of instructions executable by said processor to perform operations, comprising; establishing a user-level RCU subsystem that executes within threads of a user-level multithreaded application; said multithreaded application comprising one or more reader threads that read RCU-protected data elements in a shared memory; said multithreaded application comprising one or more updater threads that update said RCU-protected data elements in said shared memory; said reader threads and said updater threads being preemptible and comprising signal handlers that process signals; implementing a reader registration component in said RCU subsystem that registers said reader threads for RCU critical section processing, said reader registration component performing reader registration while said reader threads remain preemptible and with their signal handlers being operational; implementing a reader unregistration component in said RCU subsystem that unregisters said reader threads from RCU critical section processing, said reader unregistration component performing reader unregistration while said reader threads remain preemptible and their signal handlers are operational; and implementing a grace period detection component in said RCU subsystem that considers a registration status of said reader threads and determines when it is safe to perform RCU second-phase update processing to remove stale versions of updated data elements that are being referenced by said reader threads, or take other RCU second-phase update processing actions. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer program product, comprising:
-
one or more non-transitory machine-readable media tangibly embodying at least one program of instructions executable by a processor to perform operations for programming a data processing platform to implement user-level read-copy update (RCU), comprising; establishing a user-level RCU subsystem that executes within threads of a user-level multithreaded application; said multithreaded application comprising one or more reader threads that read RCU-protected data elements in a shared memory; said multithreaded application comprising one or more updater threads that update said RCU-protected data elements in said shared memory; said reader threads and said updater threads being preemptible and comprising signal handlers that process signals; implementing a reader registration component in said RCU subsystem that registers said reader threads for RCU critical section processing, said reader registration component performing reader registration while said reader threads remain preemptible and with their signal handlers being operational; implementing a reader unregistration component in said RCU subsystem that unregisters said reader threads from RCU critical section processing, said reader unregistration component performing reader unregistration while said reader threads remain preemptible and their signal handlers are operational; and implementing a grace period detection component in said RCU subsystem that considers a registration status of said reader threads and determines when it is safe to perform RCU second-phase update processing to remove stale versions of updated data elements that are being referenced by said reader threads, or take other RCU second-phase update processing actions. - View Dependent Claims (14, 15, 16, 17, 18)
-
-
19. A user-level read-copy update (RCU) method, comprising:
-
establishing a global grace period variable in a shared memory that is shared with a user-level multithreaded application; said global variable maintaining a global grace period number and a global reference state, and being writable on behalf of an updater thread in said multithreaded application that needs to update an RCU protected data element in said shared memory; establishing a per-reader grace period variable for any reader thread in said multithreaded application that needs to access said RCU-protected data element in said shared memory; when one of said reader threads (active reader) needs to enter an RCU-protected critical section to access one of said data elements, performing reader registration, as by; setting said active reader'"'"'s per-reader variable to indicate a per-reader status that includes a per-reader grace period value and a per-reader state that indicate said active reader is in an RCU-protected critical section; executing a memory barrier to ensure that setting of said active reader'"'"'s per-reader variable can be seen by other threads before said active reader commences critical section processing; when said active reader needs to exit said RCU-protected critical section after accessing one of said data elements, performing reader unregistration, as by; executing a memory barrier to ensure that said active reader'"'"'s critical section processing has completed before any further manipulation of said active reader'"'"'s per-reader variable value can be seen by other threads; resetting said active reader'"'"'s per-reader variable to indicate a per-reader status that includes a current per-reader grace period value and a per-reader state that indicates said active reader is not in an RCU-protected critical section; when said updater thread needs to free a stale data element due to a data element update, or take other RCU second-phase update processing actions, performing grace period detection processing, as by; executing a memory barrier to ensure that said data element update is seen by other threads as occurring before said grace period detection processing; setting said global variable to a value that indicates a new grace period and said global reference state; executing a memory barrier to ensure that said setting of said global variable is seen by other threads as occurring before further grace period detection processing; inspecting said per-reader variables to determine per-reader status by comparing said per-reader grace period value and per-reader state to said global grace period value and global reference state until it is determined that none of said reader threads are within an RCU-protected critical section that was entered during a previous grace period; and executing a memory barrier to ensure that said stale data element is not freed until said inspecting is seen by other threads as being completed. - View Dependent Claims (20)
-
Specification