Database Reference
In-Depth Information
Chapter 5
Oracle Processes
We've reached the last piece of the architecture puzzle. We've investigated the database and the set of physical files
that constitute a database. In covering the memory used by Oracle, we've looked at one half of an instance. The last
remaining architectural issue to cover is the set of
processes
that constitute the other half of the instance.
Each process in Oracle will perform a particular task or set of tasks, and each will have internal memory
(PGA memory) allocated by it to perform its job. An Oracle instance has three broad classes of processes:
•
Server processes
: These perform work based on a client's request. We have already looked at
dedicated and shared servers to some degree. These are the server processes.
•
Background processes
: These are the processes that start up with the database and perform
various maintenance tasks, such as writing blocks to disk, maintaining the online redo log,
cleaning up aborted processes, maintaining Automatic Workload Repository (AWR) and so on.
•
Slave processes
: These are similar to background processes, but they are processes that
perform extra work on behalf of either a background or a server process.
Some of these processes, such as the database block writer (
DBWn
) and the log writer (
LGWR
), have cropped up
already, but here we'll take a closer look at the function of each, and what each does and why.
■
When I use the term
process
in this chapter, consider it to be synonymous with the term
thread
on operating
systems where Oracle is implemented with threads (such as Windows). In the context of this chapter, I use the term
process
to cover both processes and threads. If you are using an implementation of Oracle that is multiprocess, such as
you see on UNIX/Linux, the term
process
is totally appropriate. If you are using a single-process implementation of Oracle,
such as you see on Windows, the term
process
will actually mean
thread within the Oracle process
. So, for example,
when I talk about the
DBWn
process, the equivalent on Windows is the
DBWn
thread within the Oracle process.
Note
Server Processes
Server processes are those that perform work on behalf of a client session. They are the processes that ultimately
receive and act on the SQL statements our applications send to the database.