1 / 13

Chap 20. Lock Architecture

Chap 20. Lock Architecture. Written by Yong-soon Kwon Summerized By Sungchan Park @ IDS Lab. 2008-07-25. Lock. Lock Ensure data consistency all resources in DB in parallel or concurrent executing environment Enqueue Long term lock mechanism(table, …) Latch

spike
Download Presentation

Chap 20. Lock Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chap 20. Lock Architecture Written by Yong-soon Kwon Summerized By Sungchan Park @ IDS Lab. 2008-07-25

  2. Lock • Lock • Ensure data consistency all resources in DB • in parallel or concurrent executing environment • Enqueue • Long term lock mechanism(table, …) • Latch • Short term lock mechanism(memory, …) Center for E-Business Technology

  3. Enqueue • Enqueue • Acquires lock for long time • Used in managing shared resources • Served by Oracle kernel • Enqueue types • Managed Enqueue • Oracle DB level • Client Enqueue • DML • Type • TM : table level lock • TX : row level lock Center for E-Business Technology

  4. Enqueue: Enqueue Mode • Enqueue Mode • RS : Lmode 2 • Lock for rows selected by query • RX : Lmode 3 • Table lock when DML • S : Lmode 4 • Lock for reference integrity • SRX : Lmode 5 • On delete cascade • X : Lmode 6 • Row lock when DML Center for E-Business Technology

  5. Enqueue Mode Compatibility Center for E-Business Technology

  6. Resource Table Center for E-Business Technology

  7. Resource Structure • Resource Structure • Identifier • <Enqueue Type-ID1-ID2> • Owner • Sessions own this resource • Waiter • Sessions wait this resource • Converter Center for E-Business Technology

  8. Enqueue Operation Scenario Center for E-Business Technology

  9. Checking Enqueue Center for E-Business Technology

  10. Latch • Latch • Acquires lock for short time • Ensure data consistency on memory • Fast, low cost • Type • Solitary latch • Latch set • Parent latch + Child latch Center for E-Business Technology

  11. Acquiring Latch • Acquring latch • Willing to wait • No wait • Latch spin • Yield CPU to other process • not deleting process context(sleeping) Center for E-Business Technology

  12. Latch Scenario Center for E-Business Technology

  13. Checking Latch with Contention Center for E-Business Technology

More Related