Oracle Process Architecture


The processes in an Oracle Database system can be categorized into two major groups:
          User processes that run the application or Oracle tool code.
          Oracle Database processes that run the Oracle database server code. They include server processes and background processes.

When a user runs an application program or an Oracle tool such as SQL*Plus, Oracle Database creates a user process to run the user’s application. Oracle Database also creates a server process to execute the commands issued by the user process. In addition, the Oracle server also has a set of background processes for an instance that interact with each other and with the operating system to manage the memory structures and asynchronously perform I/O to write data to disk, and perform other required tasks.

The process structure varies for different Oracle Database configurations, depending on the operating system and the choice of Oracle Database options. The code for connected users can be configured as a dedicated server or a shared server.

          With dedicated server, for each user, the database application is run by a user process that is served by a dedicated server process that executes Oracle database server code.
          A shared server eliminates the need for a dedicated server process for each connection. A dispatcher directs multiple incoming network session requests to a pool of shared server processes. A shared server process serves any client request.

Server Processes
Oracle Database creates server processes to handle the requests of user processes connected to the instance. In some situations when the application and Oracle Database operate on the same computer, it is possible to combine the user process and corresponding server process into a single process to reduce system overhead. However, when the application and Oracle Database operate on different computers, a user process always communicates with Oracle Database through a separate server process.

Server processes created on behalf of each user’s application can perform one or more of the following tasks:
          Parsing and running SQL statements issued through the application
          Reading necessary data blocks from data files on disk into the shared database buffers of the SGA, if the blocks are not already present in the SGA
          Returning results in such a way that the application can process the information

Background Processes
To maximize performance and accommodate many users, a multiprocess Oracle Database system uses some additional Oracle Database processes called background processes. An Oracle Database instance can have many background processes.

The background processes commonly seen in non-RAC non-ASM environments can include the following:
          Database Writer process (DBWn)
          Log Writer process (LGWR)
          Checkpoint process (CKPT)
          System Monitor process (SMON)
          Process Monitor process (PMON)
          Recoverer process (RECO)
          Job Queue processes
          Archiver processes (ARCn)
          Queue Monitor processes (QMNn)

Other background processes may be found in more advanced configurations such as RAC. See the V$BGPROCESS view for more information about the background processes.
On many operating systems, background processes are created automatically when an instance is started.