SlideShare a Scribd company logo
Glusterd_thread_synchronization_using_urcu_lca2016
2
Glusterd Thread Synchronization
using user space RCU
Atin Mukherjee
SSE-Red Hat
Gluster Maintainer
IRC : atinm on freenode
Twitter: @mukherjee_atin
3
Agenda
● Introduction to GlusterD
● Big lock in thread synchronization in GlusterD
● Issues with Big Lock approach
● Different locking primitives
● What is RCU
● Advantage of RCU over read-write lock
● RCU mechanisms – Insertion, Deletion, Reader
● URCU flavors
● URCU APIs
● URCU use cases
● Q&A
4
What is GlusterD
● Manages the cluster configuration for Gluster
● Responsible for
– Peer membership management
– Elastic volume management
– Configuration consistency
– Distributed command execution (orchestration)
– Service management (manages GlusterFS
daemons)
5
Thread synchronization in GlusterD
● GlusterD was initially designed as single threaded
● Single threaded → Multi threaded to satisfy usecases
like snapshot
● Big lock
– A coarse grained lock
– Only one transaction can work inside big lock
– Protects all the shared data structures
6
Issues with Big Lock
● Threads contend for even unrelated data
● Can end up in a deadlock
– RPC request's callback also needs big lock
● Shall we release big lock in between a transaction to
get rid of above deadlock? Yes we do, but….
● Here come's the problem - a small window of time
when the shared data structures are prone to updates
leading to inconsistencies
7
Different locking primitives
● Fine grained locks
– Mutex
– Read-write lock
– Spin lock
– Seq lock
– Read-Copy-Update (RCU)
8
What is RCU
● Synchronization mechanism
● Not new, added to Linux Kernel in 2002
● Allows reads to occur concurrently with update
● Maintains multiple version of objects for read
coherency
● Almost zero over heads in read side critical
section
9
Advantages of RCU over read-write
lock
● Concurrent readers & writers – writer writes, readers read
● Wait free reads
– RCU readers have no wait overhead. They can never be blocked by writers
● Existence guarantee
– RCU guarantees that RCU protected data in a readers critical section will remain
in existence till the end of the critical section
● Deadlock immunity
– RCU readers always run in a deterministic time as they never block. This means
that they can never become a part of a deadlock.
● No writer starvation
– As RCU readers don't block, writers can never starve.
10
RCU mechanism
● RCU is made up of three fundamental mechanisms
– Publish-Subscribe Mechanism (for insertion)
– Wait For Pre-Existing RCU Readers to Complete (for
deletion)
– Maintain Multiple Versions of Recently Updated Objects
(for readers)
11
Publish-Subscribe model
● rcu_assign_pointer () for publication
1 struct foo {
2 int a;
3 int b;
4 int c;
5 };
6 struct foo *gp = NULL;
7
8 /* . . . */
9
10 p = malloc (...);
11 p->a = 1;
12 p->b = 2;
13 p->c = 3;
14 gp = p;
1 struct foo {
2 int a;
3 int b;
4 int c;
5 };
6 struct foo *gp = NULL;
7
8 /* . . . */
9
10 p = malloc (...);
11 p->a = 1;
12 p->b = 2;
13 p->c = 3;
14 rcu_assign_pointer(gp, p);
● rcu_dereference () for subscription
1 p = gp;
2 if (p != NULL) {
3 do_something_with(p->a, p->b, p->c);
4 }
1 rcu_read_lock();
2 p = rcu_dereference(gp);
3 if (p != NULL) {
4 do_something_with(p->a, p->b, p->c);
5 }
6 rcu_read_unlock();
12
Publish-Subscribe Model (ii)
● rcu_assign_pointer () & rcu_dereference ()
embedded in special RCU variants of Linux's
list-manipulation API
● rcu_assign_pointer () → list_add_rcu ()
● rcu_dereference () → list_for_each_entry_rcu ()
13
Wait For Pre-Existing RCU Readers to
Complete
● Approach used for deletion
● Synchronous – synchronize_rcu ()
● Asynchronous – call_rcu ()
q = malloc(...);
*q = *p;
q->b = 2;
q->c = 3;
list_replace_rcu(&p->list, &q->list);
synchronize_rcu();
free(p)
q = malloc(...);
*q = *p;
q->b = 2;
q->c = 3;
list_replace_rcu(&p->list, &q->list);
call_rcu (&p->list, cbk); /* cbk will free p */
14
Maintain multiple version objects
● Used for existence gurantee
1. p = search(head, key);
2. list_del_rcu(&p->list);
3. synchronize_rcu();
4. free (p);
1. p = search(head, key);
2. list_del_rcu(&p->list);
3. synchronize_rcu();
4. free (p);
1. p = search(head, key);
2. list_del_rcu(&p->list);
3. synchronize_rcu();
4. free (p);
Maintain multiple version objects
● Used for existence gurantee
1. p = search(head, key);
2. list_del_rcu(&p->list);
3. synchronize_rcu();
4. free (p);
1. p = search(head, key);
2. list_del_rcu(&p->list);
3. synchronize_rcu();
4. free (p);
1. p = search(head, key);
2. list_del_rcu(&p->list);
3. synchronize_rcu();
4. free (p);
15
URCU flavors
● QSBR (quiescent-state-based RCU)
– each thread must periodically invoke rcu_quiescent_state()
– Thread (un)registration required
● Memory-barrier-based RCU
– Preemptible RCU implementation
– Introduces memory barrier in read critical secion, hence high read side
overhead
● “Bullet-proof” RCU (RCU-BP)
– Similar like memory barrier based RCU but thread (un)registration is taken
care
– Primitive overheads but can be used by application without worrying about
thread creation/destruction
16
URCU flavors (ii)
● Signal-based RCU
– Removes memory barrier
– Can be used by library function
– requires that the user application give up a POSIX signal to be
used by synchronize_rcu() in place of the read-side memory
barriers.
– Requires explicit thread registration
● Signal-based RCU using an out-of-tree sys_membarrier() system call
– sys_membarrier() system call instead of POSIX signal
17
URCU APIs
● Atomic-operation and utility APIs
– caa_: Concurrent Architecture Abstraction.
– cmm_: Concurrent Memory Model.
– uatomic_: URCU Atomic Operation.
– https://lwn.net/Articles/573435/
● The URCU APIs
– https://lwn.net/Articles/573439/
● RCU-Protected Lists
– https://lwn.net/Articles/573441
18
When is URCU useful
19
References
● https://lwn.net/Articles/262464/
● https://lwn.net/Articles/263130/
● https://lwn.net/Articles/573424/
● http://www.efficios.com/pub/lpc2011/Presentation-
lpc2011-desnoyers-urcu.pdf
● http://www.rdrop.com/~paulmck/RCU/RCU.IISc-
Bangalore.2013.06.03a.pdf
● http://urcu.so/
20
References
Q&A

More Related Content

What's hot (20)

PDF
Glusterfs session #13 replication introduction
Pranith Karampuri
 
PDF
Clojure concurrency overview
Sergey Stupin
 
PPTX
UDPSRC GStreamer Plugin Session VIII
NEEVEE Technologies
 
PPTX
Disruptor
Larry Nung
 
PDF
Glusterfs session #10 locks xlator inodelks
Pranith Karampuri
 
PDF
Fun with Network Interfaces
Kernel TLV
 
PPTX
grsecurity and PaX
Kernel TLV
 
PPTX
Highload осень 2012 лекция 1
Technopark
 
PDF
Open Social Data (Jaca), Alejandro Rivero
Aragón Open Data
 
PDF
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
Kevin Lo
 
PPTX
MessagePack - An efficient binary serialization format
Larry Nung
 
PPT
Cuda 2
Anshul Sharma
 
ODP
Introduction to Redis
Knoldus Inc.
 
PDF
EROSについて
stibear (stibear1996)
 
PPT
More than UI
Sujith Krishnan
 
PDF
Non-DIY* Logging
ESUG
 
PDF
Introduction to Rust
João Oliveira
 
PPTX
Parallel computing in bioinformatics t.seemann - balti bioinformatics - wed...
Torsten Seemann
 
PPT
RCU
bergwolf
 
PDF
Userfaultfd: Current Features, Limitations and Future Development
Kernel TLV
 
Glusterfs session #13 replication introduction
Pranith Karampuri
 
Clojure concurrency overview
Sergey Stupin
 
UDPSRC GStreamer Plugin Session VIII
NEEVEE Technologies
 
Disruptor
Larry Nung
 
Glusterfs session #10 locks xlator inodelks
Pranith Karampuri
 
Fun with Network Interfaces
Kernel TLV
 
grsecurity and PaX
Kernel TLV
 
Highload осень 2012 лекция 1
Technopark
 
Open Social Data (Jaca), Alejandro Rivero
Aragón Open Data
 
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
Kevin Lo
 
MessagePack - An efficient binary serialization format
Larry Nung
 
Introduction to Redis
Knoldus Inc.
 
EROSについて
stibear (stibear1996)
 
More than UI
Sujith Krishnan
 
Non-DIY* Logging
ESUG
 
Introduction to Rust
João Oliveira
 
Parallel computing in bioinformatics t.seemann - balti bioinformatics - wed...
Torsten Seemann
 
Userfaultfd: Current Features, Limitations and Future Development
Kernel TLV
 

Viewers also liked (15)

PDF
EFG Product News 2015
geoff demarco
 
DOCX
Carta eliana
Eliana M
 
PPTX
A aicep Portugal Global | Sessão informativa 'Internacionalizar e as Empresas...
Município de Ponte de Lima
 
PPTX
Estado de espirito
Fer Nanda
 
PPTX
Johnnie walker
santiago beltran
 
PPT
Slideshare#1
assiley
 
DOCX
Gracious city 2
Baburaj Patel
 
PPTX
Firme fundamento
Fer Nanda
 
DOCX
Certificado(ensayo)
Eliana M
 
PDF
Imagen 1
charlyugm
 
PPT
INSEME Séniors et numérique
Eric Ferrari
 
PPT
Atelier Monnaies Complémentaires - Rencontres de Babyloan 2010
Baby Loan
 
PDF
PancreasCenterNews_spring2016
Arnetha Whitmore
 
PDF
ΠΛΗ20 ΤΕΣΤ 22
Dimitris Psounis
 
EFG Product News 2015
geoff demarco
 
Carta eliana
Eliana M
 
A aicep Portugal Global | Sessão informativa 'Internacionalizar e as Empresas...
Município de Ponte de Lima
 
Estado de espirito
Fer Nanda
 
Johnnie walker
santiago beltran
 
Slideshare#1
assiley
 
Gracious city 2
Baburaj Patel
 
Firme fundamento
Fer Nanda
 
Certificado(ensayo)
Eliana M
 
Imagen 1
charlyugm
 
INSEME Séniors et numérique
Eric Ferrari
 
Atelier Monnaies Complémentaires - Rencontres de Babyloan 2010
Baby Loan
 
PancreasCenterNews_spring2016
Arnetha Whitmore
 
ΠΛΗ20 ΤΕΣΤ 22
Dimitris Psounis
 
Ad

Similar to Glusterd_thread_synchronization_using_urcu_lca2016 (20)

ODP
Gluster d thread_synchronization_using_urcu_lca2016
Gluster.org
 
ODP
Thread synchronization in GlusterD using URCU
Atin Mukherjee
 
PDF
Introduction to RCU
Kernel TLV
 
PDF
Linux Synchronization Mechanism: RCU (Read Copy Update)
Adrian Huang
 
PDF
Yet another introduction to Linux RCU
Viller Hsiao
 
PDF
rcu dan porter read update linux copy.pdf
Rajeshravi49
 
PDF
Kernel Recipes 2019 - RCU in 2019 - Joel Fernandes
Anne Nicolas
 
PDF
Userspace RCU library : what linear multiprocessor scalability means for your...
Alexey Ivanov
 
PPTX
Operating System Assignment Help
Programming Homework Help
 
PPT
Synchronization linux
Susant Sahani
 
PDF
Lockless
Sandeep Joshi
 
PPTX
How to Avoid Learning the Linux-Kernel Memory Model
ScyllaDB
 
PDF
AOS Lab 4: If you liked it, then you should have put a “lock” on it
Zubair Nabi
 
PDF
Range reader/writer locking for the Linux kernel
Davidlohr Bueso
 
PDF
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
ITIIIndustries
 
ODP
Concurrent Programming with Ruby and Tuple Spaces
luccastera
 
PPT
10 Multicore 07
timcrack
 
PDF
Programming Language Memory Models: What do Shared Variables Mean?
greenwop
 
PDF
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
LinkedIn
 
PDF
Lect04
Vin Voro
 
Gluster d thread_synchronization_using_urcu_lca2016
Gluster.org
 
Thread synchronization in GlusterD using URCU
Atin Mukherjee
 
Introduction to RCU
Kernel TLV
 
Linux Synchronization Mechanism: RCU (Read Copy Update)
Adrian Huang
 
Yet another introduction to Linux RCU
Viller Hsiao
 
rcu dan porter read update linux copy.pdf
Rajeshravi49
 
Kernel Recipes 2019 - RCU in 2019 - Joel Fernandes
Anne Nicolas
 
Userspace RCU library : what linear multiprocessor scalability means for your...
Alexey Ivanov
 
Operating System Assignment Help
Programming Homework Help
 
Synchronization linux
Susant Sahani
 
Lockless
Sandeep Joshi
 
How to Avoid Learning the Linux-Kernel Memory Model
ScyllaDB
 
AOS Lab 4: If you liked it, then you should have put a “lock” on it
Zubair Nabi
 
Range reader/writer locking for the Linux kernel
Davidlohr Bueso
 
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
ITIIIndustries
 
Concurrent Programming with Ruby and Tuple Spaces
luccastera
 
10 Multicore 07
timcrack
 
Programming Language Memory Models: What do Shared Variables Mean?
greenwop
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
LinkedIn
 
Lect04
Vin Voro
 
Ad

More from Atin Mukherjee (7)

ODP
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
Atin Mukherjee
 
ODP
Ready to go
Atin Mukherjee
 
ODP
Gluster d2.0
Atin Mukherjee
 
ODP
Manging scalability of distributed system
Atin Mukherjee
 
ODP
GlusterD - Daemon refactoring
Atin Mukherjee
 
ODP
Consensus algo with_distributed_key_value_store_in_distributed_system
Atin Mukherjee
 
PDF
Gluster fs architecture_&_roadmap_atin_punemeetup_2015
Atin Mukherjee
 
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
Atin Mukherjee
 
Ready to go
Atin Mukherjee
 
Gluster d2.0
Atin Mukherjee
 
Manging scalability of distributed system
Atin Mukherjee
 
GlusterD - Daemon refactoring
Atin Mukherjee
 
Consensus algo with_distributed_key_value_store_in_distributed_system
Atin Mukherjee
 
Gluster fs architecture_&_roadmap_atin_punemeetup_2015
Atin Mukherjee
 

Recently uploaded (20)

PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Day2 B2 Best.pptx
helenjenefa1
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Design Thinking basics for Engineers.pdf
CMR University
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 

Glusterd_thread_synchronization_using_urcu_lca2016

  • 2. 2 Glusterd Thread Synchronization using user space RCU Atin Mukherjee SSE-Red Hat Gluster Maintainer IRC : atinm on freenode Twitter: @mukherjee_atin
  • 3. 3 Agenda ● Introduction to GlusterD ● Big lock in thread synchronization in GlusterD ● Issues with Big Lock approach ● Different locking primitives ● What is RCU ● Advantage of RCU over read-write lock ● RCU mechanisms – Insertion, Deletion, Reader ● URCU flavors ● URCU APIs ● URCU use cases ● Q&A
  • 4. 4 What is GlusterD ● Manages the cluster configuration for Gluster ● Responsible for – Peer membership management – Elastic volume management – Configuration consistency – Distributed command execution (orchestration) – Service management (manages GlusterFS daemons)
  • 5. 5 Thread synchronization in GlusterD ● GlusterD was initially designed as single threaded ● Single threaded → Multi threaded to satisfy usecases like snapshot ● Big lock – A coarse grained lock – Only one transaction can work inside big lock – Protects all the shared data structures
  • 6. 6 Issues with Big Lock ● Threads contend for even unrelated data ● Can end up in a deadlock – RPC request's callback also needs big lock ● Shall we release big lock in between a transaction to get rid of above deadlock? Yes we do, but…. ● Here come's the problem - a small window of time when the shared data structures are prone to updates leading to inconsistencies
  • 7. 7 Different locking primitives ● Fine grained locks – Mutex – Read-write lock – Spin lock – Seq lock – Read-Copy-Update (RCU)
  • 8. 8 What is RCU ● Synchronization mechanism ● Not new, added to Linux Kernel in 2002 ● Allows reads to occur concurrently with update ● Maintains multiple version of objects for read coherency ● Almost zero over heads in read side critical section
  • 9. 9 Advantages of RCU over read-write lock ● Concurrent readers & writers – writer writes, readers read ● Wait free reads – RCU readers have no wait overhead. They can never be blocked by writers ● Existence guarantee – RCU guarantees that RCU protected data in a readers critical section will remain in existence till the end of the critical section ● Deadlock immunity – RCU readers always run in a deterministic time as they never block. This means that they can never become a part of a deadlock. ● No writer starvation – As RCU readers don't block, writers can never starve.
  • 10. 10 RCU mechanism ● RCU is made up of three fundamental mechanisms – Publish-Subscribe Mechanism (for insertion) – Wait For Pre-Existing RCU Readers to Complete (for deletion) – Maintain Multiple Versions of Recently Updated Objects (for readers)
  • 11. 11 Publish-Subscribe model ● rcu_assign_pointer () for publication 1 struct foo { 2 int a; 3 int b; 4 int c; 5 }; 6 struct foo *gp = NULL; 7 8 /* . . . */ 9 10 p = malloc (...); 11 p->a = 1; 12 p->b = 2; 13 p->c = 3; 14 gp = p; 1 struct foo { 2 int a; 3 int b; 4 int c; 5 }; 6 struct foo *gp = NULL; 7 8 /* . . . */ 9 10 p = malloc (...); 11 p->a = 1; 12 p->b = 2; 13 p->c = 3; 14 rcu_assign_pointer(gp, p); ● rcu_dereference () for subscription 1 p = gp; 2 if (p != NULL) { 3 do_something_with(p->a, p->b, p->c); 4 } 1 rcu_read_lock(); 2 p = rcu_dereference(gp); 3 if (p != NULL) { 4 do_something_with(p->a, p->b, p->c); 5 } 6 rcu_read_unlock();
  • 12. 12 Publish-Subscribe Model (ii) ● rcu_assign_pointer () & rcu_dereference () embedded in special RCU variants of Linux's list-manipulation API ● rcu_assign_pointer () → list_add_rcu () ● rcu_dereference () → list_for_each_entry_rcu ()
  • 13. 13 Wait For Pre-Existing RCU Readers to Complete ● Approach used for deletion ● Synchronous – synchronize_rcu () ● Asynchronous – call_rcu () q = malloc(...); *q = *p; q->b = 2; q->c = 3; list_replace_rcu(&p->list, &q->list); synchronize_rcu(); free(p) q = malloc(...); *q = *p; q->b = 2; q->c = 3; list_replace_rcu(&p->list, &q->list); call_rcu (&p->list, cbk); /* cbk will free p */
  • 14. 14 Maintain multiple version objects ● Used for existence gurantee 1. p = search(head, key); 2. list_del_rcu(&p->list); 3. synchronize_rcu(); 4. free (p); 1. p = search(head, key); 2. list_del_rcu(&p->list); 3. synchronize_rcu(); 4. free (p); 1. p = search(head, key); 2. list_del_rcu(&p->list); 3. synchronize_rcu(); 4. free (p); Maintain multiple version objects ● Used for existence gurantee 1. p = search(head, key); 2. list_del_rcu(&p->list); 3. synchronize_rcu(); 4. free (p); 1. p = search(head, key); 2. list_del_rcu(&p->list); 3. synchronize_rcu(); 4. free (p); 1. p = search(head, key); 2. list_del_rcu(&p->list); 3. synchronize_rcu(); 4. free (p);
  • 15. 15 URCU flavors ● QSBR (quiescent-state-based RCU) – each thread must periodically invoke rcu_quiescent_state() – Thread (un)registration required ● Memory-barrier-based RCU – Preemptible RCU implementation – Introduces memory barrier in read critical secion, hence high read side overhead ● “Bullet-proof” RCU (RCU-BP) – Similar like memory barrier based RCU but thread (un)registration is taken care – Primitive overheads but can be used by application without worrying about thread creation/destruction
  • 16. 16 URCU flavors (ii) ● Signal-based RCU – Removes memory barrier – Can be used by library function – requires that the user application give up a POSIX signal to be used by synchronize_rcu() in place of the read-side memory barriers. – Requires explicit thread registration ● Signal-based RCU using an out-of-tree sys_membarrier() system call – sys_membarrier() system call instead of POSIX signal
  • 17. 17 URCU APIs ● Atomic-operation and utility APIs – caa_: Concurrent Architecture Abstraction. – cmm_: Concurrent Memory Model. – uatomic_: URCU Atomic Operation. – https://lwn.net/Articles/573435/ ● The URCU APIs – https://lwn.net/Articles/573439/ ● RCU-Protected Lists – https://lwn.net/Articles/573441
  • 18. 18 When is URCU useful
  • 19. 19 References ● https://lwn.net/Articles/262464/ ● https://lwn.net/Articles/263130/ ● https://lwn.net/Articles/573424/ ● http://www.efficios.com/pub/lpc2011/Presentation- lpc2011-desnoyers-urcu.pdf ● http://www.rdrop.com/~paulmck/RCU/RCU.IISc- Bangalore.2013.06.03a.pdf ● http://urcu.so/