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.
-------------------------------
Figure 3-2 shows the three main components; kernel code modules, control structures, and the control structure's associated memory structure. The control structures could be either latches or mutexes. Figure 3-2 shows that module A has acquired control structure CS101. So, module A is now free to run the kernel code that accesses memory structure MS1. Module Z has acquired control structure CS411 and is authorized to run the kernel code to access memory structure MS3. Both module B and module X are attempting to acquire control structure CS411, because they want to access memory structure MS3. However, module Z has acquired control structure CS411, and so both module B and module X must wait.
Figure 3-2. A representation of the relationships between code modules, control structures, and memory structures: Module B and module X are contending for control structure CS411, which is currently being held by module Z. Each memory structure has an associated control structure. Before a memory structure can be accessed, the code module must first acquire the associated control structure.
It is important to notice that control structure CS411 has ensured serial access to memory structure MS3. Said another way, without control structure CS411, module B, module X, and module Z could simultaneously be running and accessing memory structure MS3. If any of these three modules makes a change to the memory structure, the results could be memory corruption! As you can see, latches and mutexes play an important role in controlling and ensuring serial memory access.
©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.
|