Shadow paging is a recovery scheme in which database is considered to be made up of number of fixed size disk pages.
Shadow Paging
• Shadow paging is a recovery scheme in which
database is considered to be made up of number of fixed size disk pages.
• A directory or a page table is constructed with n number of pages where each ith page points to the ith database page on the disk.
• The directory can be kept in the
main memory.
• When a transaction begins executing,
the current directory-whose entries point to the most recent or current
database pages on disk-is copied into a another directory called shadow
directory.
• The shadow directory is then saved on disk while
the current directory is used by the transaction.
• During the execution of transaction,
the shadow directory is never modified.
• When a write operation is to be performed then the
new copy of modified database page is created but the old copy of database page
is never overwritten. This newly created database page is written somewhere
else.
• The current directory will point to
newly modified web page and the shadow page directory will point to the old web
page entries of database disk.
• When the failure occurs then the modified database
pages and current directory is discarded.
• The state of database before the failure occurs is
now available through the shadow directory and this state can be recovered
using shadow directory pages.
Database Management System: Unit III: Transactions : Tag: : Transactions - Database Management System - Shadow Paging
Database Management System
CS3492 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation