Page 198 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 198

Unit 11: Recovery System




          Database buffers are generally implemented in virtual memory in spite of drawbacks. When an  Notes
          operating system needs to evict a page that has been modified, to make space for another page,
          the page is written to swap space on disk. When the database decides to write buffer page to disk,
          buffer page may be in swap space, and may have to be read from swap space on disk and output
          to the database on disk, resulting in extra I/O, Known as dual paging problem. Ideally when
          swapping out a database buffer page, the operating system should handover the control to the
          database, which in turn outputs page to database instead of to swap space (making sure to output
          log records  first) dual paging can thus be avoided, but common operating  systems do  not
          support such functionality.

          11.8 Failure with Loss of Non-volatile Storages

          Recall that the responsibility for the atomicity and durability properties of ACID transaction
          lies in the recovery component of the DBMS. For recovery purpose it is necessary to distinguish
          between two types of storage:
          1.   Volatile storage

          2.   Non-volatile storage
          Volatile Storage: Volatile storage such as main memory, whose state is lost in the event of a
          system crash or power outage.

          Non-volatile storage: Non-volatile storage such as magnetic disks or tapes, whose contents
          persists across such events.
          The recovery  subsystem is relied upon to ensure correct operation in the presence of three
          different types of failures.
          1.   Transaction Failure: When a transaction that is in progress reaches a state from which it
               cannot successfully commit, all updates that it made must be removed from the database
               in order to preserve the atomicity property. This is known as transaction rollback.
          2.   System Failure: If the system fails in a way that causes the loss of volatile memory contents.
               Recovery must ensure that:
               (a)  The updates of all transactions that had committed prior to the crash are reflected in
                    the database.
               (b)  All updates of other transactions are removed from the database.
          3.   Media Failure: In the event that data is lost corrupted on the non-volatile storage (e.g., due
               to a disk head crash) then the on-line version of data is lost. In this case the database must
               be restored from an archival version of the database and brought upto date using operation
               logs.




              Task       Suppose buffer is full after that what the process to store data.
















                                           LOVELY PROFESSIONAL UNIVERSITY                                   191
   193   194   195   196   197   198   199   200   201   202   203