What exactly is the difference between enqueue,latch & lock

Can someone explain in simple words (with example if possible) what exactly is the difference between enqueue,latch & lock?
I have gone through documentation & other links,but just not able to figure out the exact & clear difference between these three..
Cheers,
Kunwar

In addition to links provided by Sb and nice explanations by Aman, i would like to add below :
1.Latches and enqueues are lightweight serialization devices used to coordinate multi-user access to
shared data structures, objects and files.
Latches are locks that are held for extremely short periods of time, for example the time it takes to modify
an in-memory data structure. They are used to protect certain memory structures, such as the database
block buffer cache or the library cache in the shared pool (as described in Chapter 2, Architecture). Latches
are typically requested internally in a ‘willing to wait’ mode. This means that if the latch is not available,
the requesting session will sleep for a short period of time and retry the operation later. Other latches may
be requested in an ‘immediate’ mode, meaning that the process will go do something else rather than sit
and wait for the latch to become available. Since many requestors may be waiting for a latch at the same
time, you may see some processes waiting longer than others. Latches are assigned rather randomly, based
on the ‘luck of the draw’, if you will. Whichever session asks for a latch right after it was released will get it.
There is no line of latch waiters, just a ‘mob’ of waiters constantly retrying.
Oracle uses atomic instructions like ‘test and set’ for operating on latches. Since the instructions to set
and free latches are atomic, the operating system itself guarantees that only one process gets it. Since it
is only one instruction, it can be quite fast. Latches are held for short periods of time and provide a
mechanism for clean-up in case a latch holder ‘dies’ abnormally while holding it. This cleaning up
process would be performed by PMON.
Enqueues are another, more sophisticated, serialization device, used when updating rows in a database
table, fro example. They differ from latches in that they allow the requestor to ‘queue up’ and wait for
the resource. With a latch request, the requestor is told right away whether they got the latch or not.
With an enqueue, the requestor will be blocked until they actually attain it. As such, they are not as fast
as a latch can be, but they do provided functionality over and above that which a latch can offer.
Enqueues may be obtained at various levels, so you can have many ‘share’ locks and locks with various
degrees of ‘shareability’.
Source:Expert Oracle Database Architecture by Thomas Kyte
2.Good PPT at http://nocoug.org/download/2001-05/latches.ppt
3.Good PPT by Mark bobak at http://www.mi-oaug.org/Presentations/Understanding%20Locks%20and%20Enqueues.ppt
HTH
Girish Sharma

Similar Messages

  • What exactly is the difference between these two lenses?

    CanonEF-S 55-250mm f/4-5.6 IS STM Lens  
    CanonEF-S 55-250mm f/4-5.6 IS II Lens 
    I'm stuck between a rock, and not sure what my best option would be...any help is greatly appreciated!!! 

    The difference is in the type of motor used to focus the lens. The focus motor in STM lenses are more or less silent to the camera's audio system. This is important when shooting video but not for still photography. This may help.
    http://photo.stackexchange.com/questions/24109/what-does-stm-mean-on-a-canon-lens
    "A skill is developed through constant practice with a passion to improve, not bought."

  • What exactly is the difference between the new photos app for mac and iPhoto? i'm very confused...

    Ever since i've bought my macbook pro i used iPhoto to organize my photos. Now apple added this new photos app and i don't really understand what is it meant for? can someone please explain me the difference? I'm very confused about the purposes of both apps....

    Now apple added this new photos app and i don't really understand what is it meant for? can someone please explain me the difference? I'm very confused about the purposes of both apps....
    Photos is a completely new designed photo application, designed for Yosemite and the MacOS X versions to come. Many differences are under the hood. It uses the new system libraries and frameworks for more efficient image processing on the new powerful macs, like the mac pro, it is extensible by app extensions, if other developers will add functionality, and most important, it brings integration with iCloud Photo Library. With Photos you can store your photo library in iCloud and sync it across all devices.
    Some features are still missing however, and you can continue to use iPhoto, if you like. Or create a small Photos library for testing and explore Photos, while keeping your main libraries in iPhoto.

  • What exactly is the difference between :"Refresh" and "Expand All"?

    They seem to do the same thing most of the time. What is the difference?

    Hi Dermot,
    Well, for a report that uses no expansions the time it takes for Refresh and Expand All should be about the same. Maybe a little bit faster for Refresh. But if your report does have expansions, Refresh should be significantly faster.
    Here is the list of what happens to each EVDRE in your workbook when you click the "Expand All" button: [http://help.sap.com/saphelp_bpc75_nw/helpdata/en/fb/b03d0099e8428d95eb7de2c964cf18/frameset.htm] It has 8 steps. I believe that when you click the "Refresh" button it only executes steps 3 and 4 (not completely sure about that, but you get the point - it doesn't do everything).
    Expand All can get especially problematic when you have a workbook with a large number of EVDREs. In this case, a nice option  is to right-click on the worksheet and take a look at the options under the top menu item. One of the options is to expand only the active sheet, which can save you a lot of time.
    Cheers,
    Ethan

  • What exactly it the difference between iTunes Wifi-Sync and iCloud Backup?

    Okay, i do not yet have a mac, only an iPod touch, but am (hopefully) buying a mac soon (MacBook Pro to be specific). I buy all my music etc on my iPod, and am currently use iCloud sync which i have all the buttons in the ON position. Anyway, i am rather confused after reading alot about the two methods of syncing there exact differences. When i get my mac can i use both- for reasurance or do i have to choose one? Also, does iTunes wifi sync my photos and videos (thats photos ive taken and videos ive made/filmed) and does iCloud do this. Also if i use both photostream and iCloud/iTunes for my photos, will that create double ups of all my photos?
    Thanks
    The_Ele4ant

    Wi-Fi sync works in the same way as syncing over a USB cable, albeit more slowly, and can be used when your iTunes library can see your device on your local network.
    iOS: Syncing with iTunes
    iCloud backup saves the settings and documents from your apps to the cloud instead of your own computer. It seems you either backup to your computer or to iCloud, but not both, at least not on a regular basis. You may still be able to trigger a local backup manually when using iCloud for backup.
    iCloud: Backup and restore overview
    Photostream operates independently of either of the previous features to move your pictures to your computer and other iOS devices when in range of any working Wi-Fi connection.
    iCloud: Photo Stream FAQ
    tt2

  • What exactly is the difference between...

    ....and iPad with 'retina display' and one without? Apart from the slight price difference.

    Click here for information; the page is for the third generation iPads, and there are more differences with the fourth generation ones.
    (103071)

  • HT2729 what exactly is the difference between regular video and video playback?

    i am wanting to purchase a black video playback ipod with 30 gb, the fifth generation and before i get it i would like to know all the details about video playback

    i am wanting to purchase a black video playback ipod with 30 gb, the fifth generation and before i get it i would like to know all the details about video playback
    http://support.apple.com/kb/SP41

  • Can anyone clarify what exactly is the difference between the new Airport Express and the Airport Extreme?

    The specs look virtually identical and the form factor is also much the same.
    The price is not.

    Extreme: three LAN ports, Express: one (four total Ethernet ports vs. two, respectively)
    Extreme: Gigabit Ethernet, Express: 10/100 base-T
    Only the Express can stream iTunes (AirPlay) music
    The first two limitations make it resemble the original AirPort Extreme. Dual band is a big plus though, and will go a long way toward alleviating a lot of people's problems with wireless interference.
    The form factor is different as the new Express is not designed to be mounted directly to a power receptacle. Also, the new one allegedly supports 50 clients whereas the 802.11n Express was only 10. However, those never seemed to be limitations in actual use.
    http://www.apple.com/wifi/

  • What exactly is the diff between main window and variable window

    what exactly is the diff between main window and variable window in SAP script?

    hi,
    MAIN WINDOW :- In a main window you display text and data, which can cover several pages (flow text). As soon as a main window is completely filled with text and data, the system continues displaying the text in the main window of the next page. It automatically triggers the page break.
    You can define only have one window in a form as main window.
    The main window must have the same width on each page, but can differ in height.
    A page without main window must not call itself as next page, since this would trigger an endless loop. In such a case, the system automatically terminates after three pages.
    VARIABLE WINDOW :- The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike. The only difference is that constant windows have the same size throughout the form.
    hope this will be useful.
    If useful then reward points.
    with regards,
    Syed

  • What would be the difference between sling:folder and nt:folder?

    what would be the difference between sling:folder and nt:folder?

    See,
       As Nicolas said, there are some things that you can do only in a sling:folder type of node.
       The "nt" means "Node Type", and a "node type: folder" is just a empty node that can be referenced as a organizational structure file folder. The "sling" prefix means that this one special folder belong to the type "Sling", in other words, that folder type node is built in the sling Framework structure and is constructed with some setting already, which I do not know to tell you. Take a look at "/libs/sling/nodetypes/sling.cnd" on you CRXDE Lite or CRXDE.
    (I may be wrong about some details, eveything here is what I believe myself after some research and experience)

  • What it's the difference between Power BI licenses

    What is the difference between Microsoft Power BI Information Services Plan 1 and Microsoft Power BI Reporting and Analytics Plan 1 licenses ?

    Those were experimental tests with making different licenses available. 
    Currently there is only one version of Power BI, but the pricing can vary, based on these options:
    http://www.microsoft.com/en-us/powerBI/pricing.aspx 
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • What exactly is the diff between client dependant and client independant te

    Hi gurus,
    What is the diff between client independant and client dependant term.. I initially had a confusion related to client independant and client dependant Transport requests, where else are these words applicable, do they apply to data as well, if so how? any links to help me understand the difference..
    regards,
    kishore

    Hi Kishore,
    Client Independant: These objects are not specific to any client. And it is universal which can be viewed,changed across the clients.
    Client Dependant: These are the objects can be viewed, changed for the client for which it has been assigned. Other clients do not have access on these objects.
    In SAP, all objects are finally stored as tables. "Mandt" is key field which determines whether the object is client dependant or not.
    Client Independant transport requests will make the transported objects available across the clients. and Client dependent transport request make the objects available only for the client mentioned by field "Mandt"
    Regards,
    Dinesh D

  • What is is the difference between these two command that enable Multicast?

    I see that both get used frequently. My WLC does not seem to support the top one:
    config network ap-mcast-mode multicast 239.239.239.239
    config network multicast mode multicast 239.239.239.239
    Thanks

    Yes, first one may be a old command in previous WLC code versions. No longer supported in newer codes.
    You only require 2nd command to configure a multicast group for WLC to use for CAPWAP multicast for APs.
    HTH
    Rasika
    *** Pls rate all useful responses ***

  • What's the difference between Protect and Lock tabs?

    I'd like to begin each new session with the same pinned tabs open to the landing page for each site. I'm not sure how to do that

    You may set Firefox to start with tabs from the previous session. That is in the preferences | options from the menu button .
    * See [[Startup, home page and download settings]]
    You may pin tabs from an option on right clicking them. Such pinned tabs are remembered with other tabs if you set Firefox to use the previous sessions tabs.
    You may also be interested in customising and pinning sites to the newtab page.
    * [[New Tab Page – show, hide and customize top sites]]

  • What is the difference between Mac OS in different languages?

    I am thinking about buying a Mac with the new Intel processor. Here in Japan Apple only sells Macs with MacOS X in Japanese. However, my Japanese is far from good enough to use it if it is completely in Japanese. I know that in other Apple Online stores there are several options like in Germany with German and Intl. English MacOS. This is not offered in Japan at this time.
    My question though is: I thought MacOS X can be switched to other languages. (System Preferences - International) But the distinction in the online shop made me hesitate. Is it possible to switch any Mac OS X for instance to English (and the other languages mentioned in the technical details web page of MacOSX)? Once switched would it be the same as if bought as International English?
    What exactly is the difference between the different MacOSX language versions sold in the Apple Store?
    Thx, Gerald
      Mac OS X (10.4.4)  

    If I just have to switch it I don't fully understand
    why the Apple Store does offer different options with
    different MacOSX language. In the German store for
    instance there is
    1. intl. english keyboard with intl.english macos
    2. german keyboard with german macos
    3. german keyboard with intl.english macos
    So if it is a simple OS reconfiguration it seems a
    little bit overfeatured to offer different options in
    the store just to make a little tweak...
    Because a new user needs to fill in data, etc when setting up the computer, marketing people want to make sure the user can have their native or favorite language from the first moment, even if after setup it takes about 5 seconds to switch from German to English or vice versa.
    The OS is exactly the same, as others have said, and can be switch among 15 languages in less time than it takes to write this sentence. The big difference is usually the keyboard. A German keyboard for example is a lot different than a US one (qwertz instead of qwerty).

Maybe you are looking for