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)
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-84717/
本文详细介绍了Oracle数据库中服务器进程如何处理数据块读取及缓存管理的过程,包括使用哈希函数查找缓存中的数据块、维护LRU列表、脏块处理及DBWN进程的工作原理等。
2009

被折叠的 条评论
为什么被折叠?



