You were brought to this page based on an internet search
and as a free service to Oracle DBAs.
The text below is an except from the book,
Oracle Performance Firefighting, written by
Craig Shallahamer of
OraPub, Inc.
Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click
here.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
-------------------------------
Let's look at this from more of a kernel code perspective. Figure 3-3 represents a kernel code section. When I worked for Oracle, I rarely saw pure Oracle database server kernel code. One of those rare times was when I was talking with a developer about the redo allocation process. While I don't remember the conversation details, I distinctly recall seeing code similar to Figure 3-3. There was a very simple conditional statement followed by a large chunk of highly indented code. I was shocked at the simplicity and straightforwardness of the latch request (in this situation). I asked the developer if asking for the latch is really this simple. With a puzzled look on his face, he replied, "Well yes, of course it is." Although I was a little embarrassed, it was a good lesson I'll never forget.
Figure 3-3. An obvious example showing that unless the control structure is acquired, code cannot access the memory structure associated with the control structure.
One key point to notice in Figure 3-3 is that the control structure must be acquired. There is no such thing as a valiant try or everyone is a winner when asking for the control structure. You either successfully acquire the control structure or you do not. And you cannot execute the kernel code to access the control structure's associated memory structure until you have acquired the control structure.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
|