Library Cache:lock, Pin and Load Lock

Source: Internet
Author: User

What is the "Library cache lock"?

This event controls the concurrency between clients of the library cache. It acquires a lock on the object handle so that either:

    • One client can prevent other clients from accessing the same object.
    • The client can maintain a dependency for a long time (for example, so and no other client can change the object).

This lock is a also obtained to locate a object in the library cache.
Library Cache lock would be obtained on database objects referenced during parsing or compiling of SQL or PL/SQL statements (table, view, procedure, function, package, package body, trigger, index, cluster, synonym). The lock'll be released at the end of the parse or compilation.

Cursors (SQL and PL $ areas), pipes and any other transient objects does not use the this lock.
The Library cache lock is a deadlock sensitive and the operation is synchronous.

Parameters:

    • Handle Address
      Address of the object being loaded.

    • Lock Address
      Address of the load lock being used. The same thing as a latch or an enqueue, it's a state Object.

    • Mode
      Indicates the data pieces of the object which need to be loaded.

    • Namespace
      The name of the object namespace as it is displayed in V$db_object_cache view

What is the "Library cache pin"?

This event manages the library cache concurrency. Pinning an object causes the heaps to is loaded into memory. If a client wants to modify or examine the object, the client must acquire a PIN after the lock. Pin can is acquired in NULL, SHARE or EXCLUSIVE modes and can be considered as a special form of lock. A wait for a "library cache pin" implies some the other session holds the PIN in an incompatible mode.

Library cache pin'll be obtained on a database object that's currently cached in the library cache (table, view, proced Ure, function, package, package body, trigger, index, cluster, synonym). In the library cache, a database object was cached in 2 parts: "Handle" and "object". The Library cache pin is a held when the ' object ' part is cached.

It isn't deadlock sensitive and the operation is synchronous

Library Cache:lock, Pin and Load Lock

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.