/    /  DBMS- Buffer Management 

Buffer Management 

 

Log-record buffering : 

Here, it is required to know how the buffer management has to function which is essential to the implementation of a crash-recovery scheme that ensures data consistency and imposes a minimal amount of overhead on interactions.

 

a) Transaction Ti goes into the commit state after the <Ti commit> log record has been output to the stable storage.

 

b) Before the <Ti commit> log record can be output to stable storage, all log records concerning transaction Ti must have been output to the stable storage.

 

c) Before a block of data in the main memory can be output to the database, all log records concerned with the data in that block must have been output to the stable storage.

 

This rule is said to be the ‘write-ahead logging’ (WAL) rule.

 

Database buffering :

The system stores the database in non-volatile storage and brings the blocks of data into the main memory as required. In this process, if any block is modified in the main memory, it should be stored in disk and then that block can be used for other blocks to be overwritten.

 

One might expect that transactions would force-output all modified blocks to disk when they commit. Such a policy is called ‘force policy’. When a data block B1 wants to be output to the disk, all log records concerned with the data in B1 must be output to stable storage.

 

 

Reference Link

Buffer Management