zoukankan      html  css  js  c++  java
  • 实例之进程体系结构

    进程:Oracle的进程体系有三种:用户进程、服务进程、后台进程

    后台进程

    1. DBWn(database writer process):数据库写进程,12C版本最大的进程为100个(DBWa-DBWz,DBW0-DBW9,BW36-BW99),DBWR在写之前,一定会让LGWR 先写,要做到日志先行。注意:commit操作和DBWR之间没有任何关系,commit触发的是LGWR进程
    发生作用于:
    CKPT触发
    脏块太多(阈值)
    db_buffer 自由空间不够时
    表空间 read only (norma tablespac)/ offline(normal or temp tablespace ) / backcup(normal tablespace )
    表 drop 或 truncate
    3秒检查

    2. CKPT(checkpoint process):执行CKPT后,会触发DBWR把内存中的数据写入数据库中 .dbf 数据文件中。(完全检查点,局部检查点,增量检查点)作用:通知或督促 DBWR 进程写脏块,将数据缓冲区数据写入磁盘。

    The checkpoint process (CKPT) updates the control file and data file headers with checkpoint information and signals DBW to write blocks to disk.

    Checkpoint information includes the checkpoint position, SCN, and location in online redo log to begin recovery.

    CKPT does not write data blocks to data files or redo blocks to online redo log files.


    3. SMON(system monitor process):系统监控进程,作用是对非干净一致关闭(shutdown abort)的数据库进行实例恢复。干净一致的关闭(shutdown immediate)。

    Duties assigned to SMON include:

    • Performing instance recovery, if necessary, at instance startup. 

    • Recovering terminated transactions that were skipped during instance recovery because of file-read or tablespace offline errors. SMON recovers the transactions when the tablespace or file is brought back online.

    • Cleaning up unused temporary segments. For example, Oracle Database allocates extents when creating an index. If the operation fails, then SMON cleans up the temporary space.

    • Coalescing contiguous free extents within dictionary-managed tablespaces. 合并连续的空闲区

    4. PMON(process monitor process):进程监控进程,11g 监听实例的动态注册,当 user process 失败时,清理出现故障的进程。 释放所有当前挂起的锁,释放服务器端使用的资源;
    5. LREG(listener registration process): 监听注册进程,12c 的监听注册是由LREG主导的。
    6. LGWR(log writer process):日志写进程,作用:从 redo log buffer 到 redo logfile (必须在 dbwr 写脏块之前写入日志)
    发生作用于:
    执行 COMMIT;
    日志缓冲区满三分之一或1M;
    DBWR在写之前触发;

    Before DBW can write a dirty buffer, the database must write to disk the redo records associated with changes to the buffer. If DBW discovers that some redo records have not been written, it signals LGWR to write the records to disk, and waits for LGWR to complete before writing the data buffers to disk.

    三秒超时 相对于DBWn三秒检查

    在线重做日志切换

    7. ARCH(archiver process):归档进程,只有在数据库开启归档模式和启动归档开启时才有此进程

    ARCn processes exist only when the database is in ARCHIVELOG MODE and automatic archiving is enabled.

  • 相关阅读:
    C++Primer第5版学习笔记(三)
    C++Primer第5版学习笔记(二)
    C++Primer第5版学习笔记(一)
    A*寻路算法的探寻与改良(三)
    A*寻路算法的探寻与改良(二)
    A*寻路算法的探寻与改良(一)
    html5页面js判断是否安装app,以及判断是否在app内部打开html5页面
    结合prototype和xmlhttprequest封装ajax请求
    前端常见的性能优化和浏览器兼容性问题
    常见的HTTP状态码
  • 原文地址:https://www.cnblogs.com/eniniemand/p/14069058.html
Copyright © 2011-2022 走看看