DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Semaphores

  1. #1
    Join Date
    May 2009
    Posts
    32

    Semaphores

    Hi everyone,

    I need your expertise in the area of semaphore and SGA coordination. I have gone through some online docs and came to understanding that semaphores are responsible for process communication that connect to SGA. I still don't have proper understanding and conceptual idea on this area. Please help me to get a better understanding in this area. Thanks in advice for your help.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Semaphores are not an Oracle concept per-se but a concept rooted in some Unix flavors. Please note AIX which is IBM's Unix flavor relies on post-wait drivers to accomplish the same objective.

    So, why does Oracle relies on semaphores -when available? to serialize processes making sure event B happens after event A completes. This is mostly used to sync processes.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    May 2009
    Posts
    32
    Thanks for your info sir. So is it all about serialization like when one process is using DBWR other process has to wait until the first process completes or free the DBWR, did I get it right please correct me if i am wrong. Thanks in advance.

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Not a good example but that's the general idea, yes.

    Picture this. DBWR is about to write a block and detects there is an associated redo still unwritten so DBWR can't write the block, isnt' it?

    What happens then?... DBWR sends a request for service to LGWR and sets a LGWR-semaphore to Unix asking Unix to activate LGWR then DBWR orders a margarita and sits pretty waiting to see a DBWR-semaphore - DBWR is now waiting in an event, which event?... the DBWR-semaphore a.k.a. log-file-sync or something like that. On time, Unix will run LGWR which will write the offending redo then LGWR will set DBWR-semaphore which will tell DBWR to try again.

    Hope this helps.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    May 2009
    Posts
    32
    Thank you sir, your example is simply super, it gave me a clear understanding on semaphore concept. Thanks once again for your advice.

  6. #6
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Glad to help
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width