Submit Search
Upload
[개념정리] DB: Concurrency Control
•
0 likes
•
2,139 views
Kwangsik Lee
Follow
DB의 Concurrency Control에 대한 개념 정리
Read less
Read more
Technology
Report
Share
Report
Share
1 of 23
Download now
Download to read offline
Recommended
ch16
ch16
KITE www.kitecolleges.com
Real world blockchains
Real world blockchains
Dmitry Meshkov
Design Summit - Smart State Analysis, aka VM Fleecing - Rich Oliveri
Design Summit - Smart State Analysis, aka VM Fleecing - Rich Oliveri
ManageIQ
MicroKernel & NodeStore
MicroKernel & NodeStore
Jukka Zitting
Blockchain Properties
Blockchain Properties
Alex Chepurnoy
Locking base concurrency control
Locking base concurrency control
Prakash Poudel
Dbms
Dbms
kasthurimukila
.NET: Thread Synchronization Constructs
.NET: Thread Synchronization Constructs
Sasha Kravchuk
Recommended
ch16
ch16
KITE www.kitecolleges.com
Real world blockchains
Real world blockchains
Dmitry Meshkov
Design Summit - Smart State Analysis, aka VM Fleecing - Rich Oliveri
Design Summit - Smart State Analysis, aka VM Fleecing - Rich Oliveri
ManageIQ
MicroKernel & NodeStore
MicroKernel & NodeStore
Jukka Zitting
Blockchain Properties
Blockchain Properties
Alex Chepurnoy
Locking base concurrency control
Locking base concurrency control
Prakash Poudel
Dbms
Dbms
kasthurimukila
.NET: Thread Synchronization Constructs
.NET: Thread Synchronization Constructs
Sasha Kravchuk
UNIT II.pptx
UNIT II.pptx
ssuserec53e73
NIO-Grizly.pdf
NIO-Grizly.pdf
Mohit Kumar
Vani dbms
Vani dbms
SangeethaSasi1
Architectural patterns part 3
Architectural patterns part 3
assinha
Concurrency control PPT
Concurrency control PPT
ShushrutGupta
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
pgdayrussia
Concurrency control!
Concurrency control!
Ashish K
[Java concurrency]02.basic thread synchronization
[Java concurrency]02.basic thread synchronization
xuehan zhu
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
Meghaj Mallick
Concurrency control
Concurrency control
Javed Khan
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016
Aaron Hnatiw
Lock based protocols
Lock based protocols
ChethanMp7
Hands on: Hystrix
Hands on: Hystrix
Christina Rasimus
Locks In Disributed Systems
Locks In Disributed Systems
mridul mishra
Omni ledger
Omni ledger
YongraeJo
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed Databases
Meghaj Mallick
concurrency control
concurrency control
rajshreemuthiah
Java concurrency introduction
Java concurrency introduction
yangwm
Hyperledger Fabric Architecture
Hyperledger Fabric Architecture
상문 오
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
MLAAS(Machine Learning As A Service) 기술관점 분석
MLAAS(Machine Learning As A Service) 기술관점 분석
Kwangsik Lee
Azure ML Studio를 분석해보자.
Azure ML Studio를 분석해보자.
Kwangsik Lee
More Related Content
Similar to [개념정리] DB: Concurrency Control
UNIT II.pptx
UNIT II.pptx
ssuserec53e73
NIO-Grizly.pdf
NIO-Grizly.pdf
Mohit Kumar
Vani dbms
Vani dbms
SangeethaSasi1
Architectural patterns part 3
Architectural patterns part 3
assinha
Concurrency control PPT
Concurrency control PPT
ShushrutGupta
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
pgdayrussia
Concurrency control!
Concurrency control!
Ashish K
[Java concurrency]02.basic thread synchronization
[Java concurrency]02.basic thread synchronization
xuehan zhu
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
Meghaj Mallick
Concurrency control
Concurrency control
Javed Khan
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016
Aaron Hnatiw
Lock based protocols
Lock based protocols
ChethanMp7
Hands on: Hystrix
Hands on: Hystrix
Christina Rasimus
Locks In Disributed Systems
Locks In Disributed Systems
mridul mishra
Omni ledger
Omni ledger
YongraeJo
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed Databases
Meghaj Mallick
concurrency control
concurrency control
rajshreemuthiah
Java concurrency introduction
Java concurrency introduction
yangwm
Hyperledger Fabric Architecture
Hyperledger Fabric Architecture
상문 오
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
Similar to [개념정리] DB: Concurrency Control
(20)
UNIT II.pptx
UNIT II.pptx
NIO-Grizly.pdf
NIO-Grizly.pdf
Vani dbms
Vani dbms
Architectural patterns part 3
Architectural patterns part 3
Concurrency control PPT
Concurrency control PPT
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
Concurrency control!
Concurrency control!
[Java concurrency]02.basic thread synchronization
[Java concurrency]02.basic thread synchronization
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
Concurrency control
Concurrency control
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016
Lock based protocols
Lock based protocols
Hands on: Hystrix
Hands on: Hystrix
Locks In Disributed Systems
Locks In Disributed Systems
Omni ledger
Omni ledger
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed Databases
concurrency control
concurrency control
Java concurrency introduction
Java concurrency introduction
Hyperledger Fabric Architecture
Hyperledger Fabric Architecture
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
More from Kwangsik Lee
MLAAS(Machine Learning As A Service) 기술관점 분석
MLAAS(Machine Learning As A Service) 기술관점 분석
Kwangsik Lee
Azure ML Studio를 분석해보자.
Azure ML Studio를 분석해보자.
Kwangsik Lee
Amazon Personalize를 분석해보자.
Amazon Personalize를 분석해보자.
Kwangsik Lee
Supervisord 사용법을 간단히 알아보자!
Supervisord 사용법을 간단히 알아보자!
Kwangsik Lee
[개념정리] DB: Recovery
[개념정리] DB: Recovery
Kwangsik Lee
[개념정리] DB: Indexing과 Hashing
[개념정리] DB: Indexing과 Hashing
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Kwangsik Lee
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week5
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week4
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week3
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week2
Coursera Machine Learning으로 기계학습 배우기 : week2
Kwangsik Lee
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week1
Coursera Machine Learning으로 기계학습 배우기 : week1
Kwangsik Lee
CycleGAN이 무엇인지 알아보자
CycleGAN이 무엇인지 알아보자
Kwangsik Lee
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기
Kwangsik Lee
More from Kwangsik Lee
(19)
MLAAS(Machine Learning As A Service) 기술관점 분석
MLAAS(Machine Learning As A Service) 기술관점 분석
Azure ML Studio를 분석해보자.
Azure ML Studio를 분석해보자.
Amazon Personalize를 분석해보자.
Amazon Personalize를 분석해보자.
Supervisord 사용법을 간단히 알아보자!
Supervisord 사용법을 간단히 알아보자!
[개념정리] DB: Recovery
[개념정리] DB: Recovery
[개념정리] DB: Indexing과 Hashing
[개념정리] DB: Indexing과 Hashing
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week2
Coursera Machine Learning으로 기계학습 배우기 : week2
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
Coursera Machine Learning으로 기계학습 배우기 : week1
Coursera Machine Learning으로 기계학습 배우기 : week1
CycleGAN이 무엇인지 알아보자
CycleGAN이 무엇인지 알아보자
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기
Recently uploaded
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
null - The Open Security Community
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
LBM Solutions
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
null - The Open Security Community
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Neo4j
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
jimielynbastida
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
Precisely
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Hyundai Motor Group
The transition to renewables in India.pdf
The transition to renewables in India.pdf
Competition Advisory Services (India) LLP
Recently uploaded
(20)
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
The transition to renewables in India.pdf
The transition to renewables in India.pdf
[개념정리] DB: Concurrency Control
1.
DB:ConcurrencyControl개념정리 1
2.
Outline Lock‑BasedProtocols Timestamp‑BasedProtocols DeadlockHandling 2
3.
주요내용 AtomicityConsistencyIsolationDurability(ACID):Transaction이지 켜야할4가지성질 A,C,D:recoverymanage에서설명(log) I:concurrencecontrolmanager(locking) Lock허용여부:data의consistence가유지되면허용 Lock‑based/Timestamp‑BasedProtocol설명/Lock‑based는대체 적으로Deadlock을발생시킴. 3
4.
Lock‑BasedProtocols(1/3) lock메카니즘은데이터엑세스에대한동시성제어 2가지모드 Exclusivemode readx,writex Sharedmode reado,writex lock요청은concurrencycontrol매니저에게요청하는것 (트랜젝션은granted된이후진행됨) 4
5.
Lock‑BasedProtocols(2/3) Lockcompatibilitymatrix 위matrix에true일때만lock을얻을수있음 1개이상의트랜젝션이sharedlock을쥐고있을수있음 Exclusivelock은하나의트랜젝션을초과해서얻을수없음 lock을못얻으면트랜젝션은대기 5
6.
Lock‑BasedProtocols(3/3) 아래의lock은A와B사이에무언가가침투하면serializability가보장되지 않음 아래예제는잘못된locking Lock을너무빨리풀면dataconsistence가깨짐. lock프로토콜은모든트랜젝션이따라하야하는rule임 6
7.
PitfallsofLock‑BasedProtocol(1/2) T3와T4모두진행이안됨 lock‑S(B)와lock‑X(A)가각트랜젝션을wait로만들기때문 이상황을데드락이라함 T4의lock‑S(B)는이미Bdata에X‑lock이걸려있기때문에wait T3의lock‑X(A)는이미Adata에S‑lock이걸려있기때문에wait 7
8.
PitfallsofLock‑BasedProtocol(2/2) 데드락가능성은대부분은lock프로토콜에존재함 starvation은concurrencycontrol매니저가잘못설계되어있으면가능 함 트랜젝션이X‑lock을기다리는동안다른트랜젝션에S‑lock을기 다릴경우 데드락상황에서같은트랜젝션은반복적으로롤백됨 concurrencycontrol매니저를잘설계하면starvation방지가능 8
9.
Two‑PhaseLockingProtocol(1/2) conflict‑serializable스케쥴을보장 Phase1:GrowingPhase 트랜젝션이lock획득가능 트랜젝션이lockrelease불가능 Phase2:ShrinkingPhase 트랜젝션이lock획득불가능 트랜젝션에lockrelease가능 트랜젝션이각lock포인트에따라직렬화가능한것이보장됨 9
10.
Two‑PhaseLockingProtocol(2/2) two‑phaselocking은데드락방지를보장하진않음 Cascadingrollback은가능함 Strict2PL:Transaction이종료되는시점에모든x‑lock들을전부 unlock하는방법(x‑lock은종료될때까지계속유지) Rigorous2PL:x‑lock뿐만아니라s‑lock을포함한모든lock을 Transaction이종료될때까지유지 10
11.
ExampleofCascadingRollback#1 11
12.
ExampleofCascadingRollback#2 T5에Failure가발생:T5가했던변경사항을전부Rollback해야함.‑> Write(A)를원복해야함. 그러면T6의read(A)값도잘못된값을읽었기때문에Rollback됨. T7의read(A)값도잘못된값을읽었기때문에Rollback발생‑> CascadingRollback‑>치명적 12
13.
Timestamp‑BasedProtocols(1/3) 각트랜젝션이시작될때timestamp를발행 oldtransaction에우선권부여 트랜젝션매니저는아래를관리 W‑timestamp(Q)isthelargesttimestampofanytransaction thatexecutedwrite(Q)successfully R‑timestamp(Q)isthelargesttimestampofanytransaction thatexecutedread(Q)successfully 13
14.
Timestamp‑BasedProtocols(2/3) read나write연산의conflict시ts를따짐 만약Ti가read(Q)를발행한다고가정 TS(Ti)<W‑timestamp(Q)이면이미dirty된데이터를읽는다는 것이니Ti를롤백 TS(Ti)>=W‑timestamp(Q)이면read연산이수행되고R‑ timestamp(Q)가max(R‑timestamp(Q),TS(Ti))로업데이트 14
15.
Timestamp‑BasedProtocols(3/3) Ti가write(Q)를발행했다고가정 TS(Ti)<R‑timestamp(Q)이면이미읽은시간보다과거시간에 write를시도하는것이므로reject TS(Ti)<W‑timestamp(Q)이면이미써진시간보다과거에write 를시도한것이므로역시reject 위케이스가아니면write연산은수행되고W‑timestamp(Q)는 TS(Ti)로업데이트 15
16.
CorrectnessofTimestamp‑OrderingProtocol timestamp‑ordering프로토콜은serializability를보장하여 precedencegraph의cycle이없음 타임스탬프프로토콜은트랜젝션의대기가없으므로데드락이없음 하지만cascade‑free는아니며recoverable하지않음 16
17.
RecoverabilityandCascadeFreedom 타임스탬프프로토콜의문제점 Ti가abort,Tj가Ti에의해쓰여진데이터를이미읽었다가정 Tj는반드시abort되어야하지만이미commit되었다면복구불가능 나아가,Tj의값을읽은경우모두롤백되어야함 이런형태의롤백을cascadingrollback이라부름 솔루션 트랜젝션의구조화되어write가제일마지막에처리되어야함 모든쓰기트랜젝션은atomic해야함 17
18.
DeadlockHandling 모든트랜젝션이다른트랜젝션을기다리고있으면시스템이데드락됨 데드락방지프로토콜이이를막아줌 각트랜젝션이시작되기전사용되는모든데이터를lock함(pre‑ declaration) (graph‑basedprotocol) 18
19.
DeadlockHandling#2 Prevention:아예Deadlock을발생시키지않기위해까다로운제약조건 을건다. Detection:일정주기로deadlock이발생할지체크. Resolution:Cycle이구성된Transaction중하나를강제종료해서 Deadlock복구‑‑>Cycle해제(victim) “wait‑forgraph”:Dead‑lock발생여부를Check하는그래프.Cycle이 있으면Deadlock이다. 19
20.
Timeout‑BasedSchemes 롤백트랜젝션이원본타임스탬프기준으로재시작됨 오래된트랜젝션이우선함 Timeout‑Base스키마 트랜젝션은특정시간동안만기다리고이후트랜젝션이롤백됨 데드락이불가능해짐 구현이간단하지만starvation문제가능성있음 좋은timeout값을정하기어려움 20
21.
DeadlockDetection(1/2) 데드락은wait‑for그래프로탐지됨 그래프에서cycle이발생하면데드락상태임 21
22.
DeadlockDetection(2/2) 22
23.
DeadlockRecovery 데드락이탐지되면 몇몇트랜젝션은롤백되어야함 최소한의롤백비용을가지는희생자를찾아야함 롤백 전체롤백 더효과적인롤백은데드락을끊을수있는트랜젝션만롤백 같은트랜젝션이계속victim으로지정되면starvation가능성있음 롤백횟수를가중치로만들어starvation을피해야함 23
Download now