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.
-------------------------------
The mutex, short for mutual exclusion, is not an Oracle invention. Just like the readv and select system calls, mutexes are available to programmers. A simple Linux manual page request for mutex (man 9 mutex) will return a number of mutex-related calls.
Developed for fine-grained and high-concurrency thread control, mutexes are implemented at a very low system call level, whereas latches rely more on Oracle kernel code. Each mutex call starts with the mutex abbreviation mtx, and the call names should come as no surprise. Here is a partial list of mutex calls: initialization (mtx_init), destruction (mtx_destroy), spinning (mtx_lock_spin, mtx_unlock_spin), and sleeping (mtx_sleep).
Because mutexes are based on standard system calls, they form a base functionality on which Oracle can build to meet its specific objectives. For example, suppose Oracle wants greater control then the standard mutex spin call provides. Instead of using only the mutex spin request call, Oracle can add code to meet its objectives. This gives Oracle a tremendous amount of flexibility, and also allows Oracle to more easily integrate new facilities, like mutexes, into its existing code base.
©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.
|