metalink关于latch free的介绍

metalink关于latch free的介绍

ID:40562303

大小:307.00 KB

页数:41页

时间:2019-08-04

metalink关于latch free的介绍_第1页
metalink关于latch free的介绍_第2页
metalink关于latch free的介绍_第3页
metalink关于latch free的介绍_第4页
metalink关于latch free的介绍_第5页
资源描述:

《metalink关于latch free的介绍》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、文档ID:注释:34576.1主题:WAITEVENT:"latchfree"ReferenceNote类型:REFERENCE状态:PUBLISHED内容类型:TEXT/X-HTML创建日期:27-FEB-1996上次修订日期:11-NOV-2002"latchfree"ReferenceNoteThisisareferencenoteforthewaitevent"latchfree"whichincludesthefollowingsubsections:·Briefdefinition·Individualwaitdetails(eg:For

2、waitsseenin)·Systemwidewaitdetails(eg:Forwaitsseenin)·Reducingwaits/waittimesSeeforanintroductiontoWaitEvents.Definition:·Versions:7.0-9.2Documentation:9.0·Latchesarelikeshortdurationlocksthatprotectcriticalbitsofcode.This

3、waitindicatesthattheprocessiswaitingforalatchthatiscurrentlybusy(heldbyanotherprocess).IndividualWaits: Parameters:·P1=Latchaddress·P2=Latchnumber·P3=Tries·LatchaddressTheaddressofthelatchthattheprocessiswaitingfor.ThehexadecimalvalueofP1(P1RAW)canbeusedtodeterminewhichlatchisw

4、aitedforthus:SELECTname,'Child'

5、

6、child#,gets,misses,sleepsFROMv$latch_childrenWHEREaddr='&P1RAW'UNIONSELECTname,null,gets,misses,sleepsFROMv$latchWHEREaddr='&P1RAW';Thiswillshow"ChildN"inthesecondcolumnifthelatchisachildlatch.·LatchnumberThisisthelatchnumberthatindexestheV$LATC

7、HNAMEview:SELECT*FROMv$latchnameWHERElatch#=&P2;Notethatthelatchnumberforagivensetoflatchescanvarybetweenreleases/platformssoitisbesttoavoidhardcodingP2orLATCH#inSQLscripts.·TriesThisisbasicallyacounterthatcountsthenumberoftimeswetriedtogetthelatch(slowwithspinning)andtheproces

8、shadtosleep.Seethe"WaitTime"notesbelow. WaitTime:Whenasessionwaitsonlatchfreeiteffectivelysleepsforashorttimethenre-teststhelatchtoseeifitisfree.IfitstillcannotbeacquiredthenP3isincrementedandthesessionwaitsagain.Thewaittimeincreasesexponentiallyanddoesnotincludespinningonthela

9、tch(activewaiting).Themaximumwaittimedependsonthenumberoflatchesthattheprocessisholding.Thereisanexponentialbackoff(upto2seconds)betweeneachattempttogetthelatch.Forcertainlatchesawaitingsessionmaybepostedoncethelatchisfree.Oracle9iusesthis"latchposting"farmorethanOracle8i(andea

10、rlier)releases.TheSECONDS_IN_WAITfigurein

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。