본문 바로가기
OS-OE Knowledge/Linux-Unix KB

What is RCU(Read-copy-update) and RCU stall?

by 스쳐가는인연 2014. 12. 9.

RCU(Read-copy-update)는 IO 가 Read에 비정상(?)적으로 집중되는 시스템에서 데이터의 무결성(?)을 보존하기 위한 기법으로 lock(R/W 모두 hold하기 때문에 IO 병목 유발) 알고리즘 대신 사용하는 기술(Read는 필요할 때 지속 수행, Write를 RCU가 모니터링 하다가 기회가 생길때 수행되며, Read 작업으로 인해 여러개 버전의 데이터가 생성될 수 있고, 구 버전은 데이터의 사용이 만료될 때 삭제됨)이다.


RCU Stall이라 함은, 위의 RCU 엔진이 어떠한 원인으로 먹통(stall)이 되는 경우로, 일반적으로 CPU 사용율이 비정상적으로 높아(100%) 다른 업무 수행이 불가능할 때 등에 발생.

 

In computer operating systems, read-copy-update (RCU) is a synchronization mechanism implementing a kind of mutual exclusion that can sometimes be used as an alternative to a readers-writer lock. It allows extremely low overhead, wait-free reads. However, RCU updates can be expensive, as they must leave the old versions of the data structure in place to accommodate pre-existing readers. These old versions are reclaimed after all pre-existing readers finish their accesses.

 

RCU is made up of three fundamental mechanisms, the first being used for insertion, the second being used for deletion, and the third being used to allow readers to tolerate concurrent insertions and deletions. These mechanisms are described in the following sections, which focus on applying RCU to linked lists:
1. Publish-Subscribe Mechanism (for insertion)
2. Wait For Pre-Existing RCU Readers to Complete (for deletion)
3. Maintain Multiple Versions of Recently Updated Objects (for readers)

 

참고자료.

http://en.wikipedia.org/wiki/Read-copy-update
https://www.kernel.org/doc/Documentation/RCU/stallwarn.txt
http://www.rdrop.com/users/paulmck/RCU/whatisRCU.html
http://www2.rdrop.com/users/paulmck/RCU/
http://lwn.net/Articles/262464/

반응형