Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005
CHAPTER 5 ■ ORACLE PROCESSES 171 00 LMD0 global enqueue service daemon 0 ... 00 LMS7 global cache service process 7 00 LMS8 global cache service process 8 00 LMS9 global cache service process 9 69 rows selected. Rows in this view with a PADDR other than 00 are processes (threads) configured and running on your system. There are two classes of background processes: those that have a focused job to do (as just described) and those that do a variety of other jobs (i.e., utility processes). For example, there is a utility background process for the internal job queues accessible via the DBMS_JOB package. This process monitors the job queues and runs whatever is inside them. In many respects, it resembles a dedicated server process, but without a client connection. We will examine each of these background processes now, starting with the ones that have a focused job, and then look into the utility processes. Focused Background Processes Figure 5-4 depicts the Oracle background processes that have a focused purpose. Figure 5-4. Focused background processes You may not see all of these processes when you start your instance, but the majority of them will be present. You will only see ARCn (the archiver) if you are in ARCHIVELOG mode and have enabled automatic archiving. You will only see the LMD0, LCKn, LMON, and LMSn (more
172 CHAPTER 5 ■ ORACLE PROCESSES details on those processes shortly) processes if you are running Oracle RAC, a configuration of Oracle that allows many instances on different machines in a cluster to mount and open the same physical database. ■Note For the sake of clarity, missing from Figure 5-4 are the shared server dispatcher (Dnnn) and shared server (Snnn) processes. So, Figure 5-4 depicts roughly what you might “see” if you started an Oracle instance, and mounted and opened a database. For example, on my Linux system, after starting the instance, I have the following processes: $ ps -aef | grep 'ora_.*_ora10g$' ora10g 5892 1 0 16:17 ? 00:00:00 ora_pmon_ora10g ora10g 5894 1 0 16:17 ? 00:00:00 ora_mman_ora10g ora10g 5896 1 0 16:17 ? 00:00:00 ora_dbw0_ora10g ora10g 5898 1 0 16:17 ? 00:00:00 ora_lgwr_ora10g ora10g 5900 1 0 16:17 ? 00:00:00 ora_ckpt_ora10g ora10g 5902 1 0 16:17 ? 00:00:00 ora_smon_ora10g ora10g 5904 1 0 16:17 ? 00:00:00 ora_reco_ora10g ora10g 5906 1 0 16:17 ? 00:00:00 ora_cjq0_ora10g ora10g 5908 1 0 16:17 ? 00:00:00 ora_d000_ora10g ora10g 5910 1 0 16:17 ? 00:00:00 ora_s000_ora10g ora10g 5916 1 0 16:17 ? 00:00:00 ora_arc0_ora10g ora10g 5918 1 0 16:17 ? 00:00:00 ora_arc1_ora10g ora10g 5920 1 0 16:17 ? 00:00:00 ora_qmnc_ora10g ora10g 5922 1 0 16:17 ? 00:00:00 ora_mmon_ora10g ora10g 5924 1 0 16:17 ? 00:00:00 ora_mmnl_ora10g ora10g 5939 1 0 16:28 ? 00:00:00 ora_q000_ora10g It is interesting to note the naming convention used by these processes. The process name starts with ora_. It is followed by four characters representing the actual name of the process, which are followed by _ora10g. As it happens, my ORACLE_SID (site identifier) is ora10g. On UNIX, this makes it very easy to identify the Oracle background processes and associate them with a particular instance (on Windows, there is no easy way to do this, as the backgrounds are threads in a larger, single process). What is perhaps most interesting, but not readily apparent from the preceding code, is that they are all really the same exact binary executable program—there is not a separate executable for each “program.” Search as hard as you like, but you will not find the arc0 binary executable on disk anywhere. You will not find LGWR or DBW0. These processes are all really oracle (that’s the name of the binary executable that is run). They just alias themselves upon startup to make it easier to identify which process is which. This enables a great deal of object code to be efficiently shared on the UNIX platform. On Windows, this is not nearly as interesting, as they are just threads within the process, so of course they are one big binary. Let’s now take a look at the function performed by each process, starting with the primary Oracle background processes.
- Page 166 and 167: CHAPTER 4 ■ MEMORY STRUCTURES 121
- Page 168 and 169: CHAPTER 4 ■ MEMORY STRUCTURES 123
- Page 170 and 171: CHAPTER 4 ■ MEMORY STRUCTURES 125
- Page 172 and 173: CHAPTER 4 ■ MEMORY STRUCTURES 127
- Page 174 and 175: CHAPTER 4 ■ MEMORY STRUCTURES 129
- Page 176 and 177: CHAPTER 4 ■ MEMORY STRUCTURES 131
- Page 178 and 179: CHAPTER 4 ■ MEMORY STRUCTURES 133
- Page 180 and 181: CHAPTER 4 ■ MEMORY STRUCTURES 135
- Page 182 and 183: CHAPTER 4 ■ MEMORY STRUCTURES 137
- Page 184 and 185: CHAPTER 4 ■ MEMORY STRUCTURES 139
- Page 186 and 187: CHAPTER 4 ■ MEMORY STRUCTURES 141
- Page 188 and 189: CHAPTER 4 ■ MEMORY STRUCTURES 143
- Page 190 and 191: CHAPTER 4 ■ MEMORY STRUCTURES 145
- Page 192 and 193: CHAPTER 4 ■ MEMORY STRUCTURES 147
- Page 194 and 195: CHAPTER 4 ■ MEMORY STRUCTURES 149
- Page 196 and 197: CHAPTER 4 ■ MEMORY STRUCTURES 151
- Page 198 and 199: CHAPTER 4 ■ MEMORY STRUCTURES 153
- Page 200 and 201: CHAPTER 5 ■ ■ ■ Oracle Proces
- Page 202 and 203: CHAPTER 5 ■ ORACLE PROCESSES 157
- Page 204 and 205: CHAPTER 5 ■ ORACLE PROCESSES 159
- Page 206 and 207: CHAPTER 5 ■ ORACLE PROCESSES 161
- Page 208 and 209: CHAPTER 5 ■ ORACLE PROCESSES 163
- Page 210 and 211: CHAPTER 5 ■ ORACLE PROCESSES 165
- Page 212 and 213: CHAPTER 5 ■ ORACLE PROCESSES 167
- Page 214 and 215: CHAPTER 5 ■ ORACLE PROCESSES 169
- Page 218 and 219: CHAPTER 5 ■ ORACLE PROCESSES 173
- Page 220 and 221: CHAPTER 5 ■ ORACLE PROCESSES 175
- Page 222 and 223: CHAPTER 5 ■ ORACLE PROCESSES 177
- Page 224 and 225: CHAPTER 5 ■ ORACLE PROCESSES 179
- Page 226 and 227: CHAPTER 5 ■ ORACLE PROCESSES 181
- Page 228 and 229: CHAPTER 6 ■ ■ ■ Locking and L
- Page 230 and 231: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 232 and 233: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 234 and 235: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 236 and 237: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 238 and 239: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 240 and 241: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 242 and 243: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 244 and 245: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 246 and 247: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 248 and 249: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 250 and 251: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 252 and 253: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 254 and 255: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 256 and 257: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 258 and 259: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 260 and 261: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 262 and 263: CHAPTER 6 ■ LOCKING AND LATCHING
- Page 264 and 265: CHAPTER 6 ■ LOCKING AND LATCHING
CHAPTER 5 ■ ORACLE PROCESSES 171<br />
00 LMD0 global enqueue service daemon 0<br />
...<br />
00 LMS7 global cache service process 7<br />
00 LMS8 global cache service process 8<br />
00 LMS9 global cache service process 9<br />
69 rows selected.<br />
Rows in this view with a PADDR other than 00 are processes (threads) configured <strong>and</strong> running<br />
on your system.<br />
There are two classes of background processes: those that have a focused job to do (as<br />
just described) <strong>and</strong> those that do a variety of other jobs (i.e., utility processes). For example,<br />
there is a utility background process for the internal job queues accessible via the DBMS_JOB<br />
package. This process monitors the job queues <strong>and</strong> runs whatever is inside them. In many<br />
respects, it resembles a dedicated server process, but without a client connection. We will<br />
examine each of these background processes now, starting with the ones that have a focused<br />
job, <strong>and</strong> then look into the utility processes.<br />
Focused Background Processes<br />
Figure 5-4 depicts the <strong>Oracle</strong> background processes that have a focused purpose.<br />
Figure 5-4. Focused background processes<br />
You may not see all of these processes when you start your instance, but the majority of<br />
them will be present. You will only see ARCn (the archiver) if you are in ARCHIVELOG mode <strong>and</strong><br />
have enabled automatic archiving. You will only see the LMD0, LCKn, LMON, <strong>and</strong> LMSn (more