ITPub博客

首页 > Linux操作系统 > Linux操作系统 > DBWR 写数据文件 (zt)

DBWR 写数据文件 (zt)

原创 Linux操作系统 作者:tolywang 时间:2007-06-27 00:00:00 0 删除 编辑
Server Process
1. First, the server checks whether the required block is available in the buffer cache using a hash function. If the block is found, it is moved to another point in LRU list away from the LRU end. This is a logical read, because no actual I/O took place. If the block is not found in the buffer cache, the server process has to read the block from the data file.


2. Before reading from the data file, the server process searches the LRU list for a free block.

3. While searching the LRU list, the server process moves dirty blocks to the dirty list.

4. If the dirty list exceeds its size threshold, the server signals DBWn to flush dirty blocks from the data buffer cache. If the server cannot find a free block within a search threshold, it signals DBWn to flush.

5. After a free block is found, the server reads the block from the data file into the free block in the database buffer cache. Oracle server process moves the block away from the LRU end of the LRU list.

6. If the blocks is not consistent, the server rebuilds an earlier version of the block from the current block and rollback segments.

DBWn Process
7. Dirty List Exceeds its Size Threshold: A server process finds that the dirty list has exceeded its size threshold, so it signals DBWn to flush. DBWn writes out the blocks on the dirty list.

8. Search Threshold Exceeded: A server process that cannot find a free block on the LRU list within the search threshold signals DBWn to flush dirty blocks. DBWn writes out dirty blocks directly from the LRU list.

9. Three Second Time-Out: Every three seconds, DBWn checks the dirty list for blocks to write. DBWn moves dirty blocks from the LRU list to the dirty list, so that it has enough blocks for a full write buffer. Then DBWn writes blocks on the dirty list from the buffer cache to the data files. If there is no update activity for extended periods of time, DBWn eventually writes out all of the dirty blocks during the three-second time-outs.

10. LGWR Signal a Checkpoint: When LGWR signals that a checkpoint has occurred, DBWn copies dirty blocks from the LRU to the dirty list and writes out the blocks on the dirty list.

11. Alter Tablespace Offline Temporary or Alter Tablespace Begin Backup: When a tablespace is altered offline temporary or its online backup is started, DBWn copied the dirty blocks for that tablespace from the LRU to the dirty list (step 8) and writes out the blocks on the dirty list (steps 6 and 7).

12.Drop Object: When an object is dropped, DBWn first flushes the objects dirty blocks to disk (steps 8 and 7).

13. Clean Shutdown (Normal, Immediate, or Transactional)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84717/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    13380124