Instance Architecture   «Prev  Next»

Lesson 4 Asynchronous Process Coordination
Objective Explain how background processes run asynchronously.

Asynchronous Process Coordination run independently

Background Processes in Oracle Databases
Background processes are essential components in Oracle databases, running asynchronously to perform various tasks such as writing data to disk, managing memory, and ensuring the database remains operational and performant. The asynchronous nature of these processes allows them to work independently of user processes, improving the efficiency and scalability of database operations.
Background Processes in "Oracle 11g" For the following list of 2 numbered elements, put the numbered elements in a HTML ordered list and the child elements in an unordered list.
  1. Asynchronous Execution: In Oracle 11g, background processes such as DBWn (Database Writer), LGWR (Log Writer), CKPT (Checkpoint), SMON (System Monitor), and PMON (Process Monitor) run asynchronously. These processes operate independently to handle specific tasks:
    • DBWn writes modified (dirty) data blocks from the buffer cache to the data files on disk, allowing user transactions to continue without waiting for these writes to complete.
    • LGWR writes redo log entries from the redo log buffer to the online redo log files, ensuring data durability while still allowing transactions to proceed.
    • CKPT updates data file headers and the control file to reflect the most recent checkpoint, ensuring that recovery is efficient.
    • SMON and PMON handle system recovery and process management, respectively, ensuring the smooth functioning of the database.
  2. Event-Driven Triggers: Oracle 11g uses event-based mechanisms to trigger background processes. For example, LGWR is triggered when the redo log buffer reaches a specific size or when a user commits a transaction.

Background Processes in "Cloud-Enabled Databases (Oracle 19c and 23c)""
Oracle 19c and 23c have evolved to support cloud environments and offer more sophisticated background process management:
  1. Asynchronous Execution with Advanced Features: In addition to the traditional background processes, cloud-enabled databases introduce new processes and optimizations:
    • PDB-Level Processes: In the multi-tenant architecture, each Pluggable Database (PDB) has its own set of background processes, allowing for better isolation and resource management. The asynchronous nature of these processes ensures that multiple PDBs can operate efficiently within a single Container Database (CDB).
    • Sharding Processes: Oracle 19c and 23c support sharding, where databases are distributed across multiple shards (or instances). Background processes manage the distribution and synchronization of data across these shards asynchronously.
    • Replication and Recovery: Processes such as ARn (Archiver) and MRP (Managed Recovery Process) are optimized for asynchronous data replication and disaster recovery in cloud environments.
  2. Scalable and Resilient Design: The asynchronous design of background processes in cloud-enabled databases ensures that tasks like data replication, backup, and recovery do not impact user performance. These processes can dynamically scale based on the workload and the configuration of the cloud environment.
  3. Oracle Autonomous Features: Oracle 19c and 23c support autonomous operations, where machine learning algorithms manage and optimize background processes. For instance, tasks like database tuning, backup, and performance optimization are handled asynchronously without human intervention, ensuring high availability and performance.

Key Differences in Cloud-Enabled Databases (19c and 23c)
  1. Container and Pluggable Architecture: The multi-tenant architecture in Oracle 19c and 23c introduces more sophisticated background processes for managing multiple PDBs within a single CDB. Each PDB operates in isolation but benefits from shared resources.
  2. Advanced Automation: Oracle 19c and 23c leverage cloud capabilities for automatic scaling, patching, and self-tuning. Background processes are designed to run asynchronously, optimizing resource utilization and minimizing manual intervention.
  3. Improved Redo and Data Guard: The redo transport and Data Guard processes are enhanced for cloud deployments, ensuring data consistency and high availability across distributed cloud environments.

Summary
  • Oracle 11g: Background processes run asynchronously to handle tasks independently of user processes, ensuring efficient database operations. Processes are triggered by events or specific conditions and are limited to a single-instance architecture.
  • Oracle 19c and 23c: These cloud-enabled databases introduce additional background processes for multi-tenant architectures, sharding, and autonomous operations. The asynchronous execution model is optimized for cloud scalability, high availability, and advanced automation.

The asynchronous nature of background processes is fundamental in both traditional and cloud-enabled Oracle databases, but the latter versions include enhancements that better align with modern cloud infrastructure and database management needs.

Oracle Database Administration
The Oracle background processes all run asynchronously. Each process executes as independently as possible. For example, at the same time that the log writer is busy writing records to the redo log files, the database writer is busy writing changed buffers to disk, and the archiver is copying full redo log files to the archive log destination. Occasionally, one process does need to wait for another, but that is not usually the case. The Database Writer (DBW0), for example, will not write a modified buffer back to a datafile until the Log Writer (LGWR) process has logged all the changes for that buffer.

Advantages of Asynchronous Processes

This asynchronous behavior is part of what makes Oracle perform so well. A program can issue a query that changes a buffer without having to wait for that change to be written to disk. If the database is busy, the Database Writer doesn't need to write anything as long as enough space remains in the database buffer cache to hold the new data being read. The Log Writer process focuses only on writing the redo log files, and hopefully never needs to wait on the archiver to copy them. Figure 4-4 illustrates how each background process interacts with the different parts of an Oracle database.
Figure 4-4 Background Processes of a Multiple Process Oracle Instance
Figure 4-4 Background Processes of a Multiple Process Oracle Instance

Oracle Mandatory Background Processes

An Oracle database uses memory structures and processes to manage and access the database. All memory structures exist in the main memory of the computers that constitute the database system. Processes are jobs that work in the memory of these computers. The architectural features discussed in this section enable the Oracle database to support:
  1. Many users concurrently accessing a single database
  2. The high performance required by concurrent multiuser, multiapplication database systems
Oracle creates a set of background processes for each instance. The background processes consolidate functions that would otherwise be handled by multiple Oracle programs running for each user process. They asynchronously perform I/O and monitor other Oracle process to provide increased parallelism for better performance and reliability.
The mandatory background processes are present in all typical database configurations. These processes run by default in a database instance started with a minimally configured initialization parameter file. These are some of the mandatory background processes:
  1. Process Monitor Process (PMON)
  2. System Monitor Process (SMON)
  3. Database Writer Process (DBWn)
  4. Log Writer Process (LGWR)
  5. Checkpoint Process (CKPT)
  6. Manageability Monitor Processes (MMON and MMNL)
  7. Recoverer Process (RECO)

SEMrush Software