Concept of Shadow Paging Technique
Shadow paging is an alternative to transaction-log based recovery techniques.
Here, the database considered as made up of fixed size disk blocks, called pages. These pages mapped to physical storage using a table, called page table.
The page table indexed by a page number of the database. The information about physical pages, in which database pages are stored, is kept in this page table.
This technique is similar to paging technique used by Operating Systems to allocate memory, particularly to manage virtual memory.
Execution of Transaction
During the execution of the transaction, two-page tables maintained.
Current Page Table - Used to access data items during transaction execution.
Shadow Page Table - Original page table, and not get modified during transaction execution.
At the start of the transaction, both tables same and point· to same pages.
The shadow page table never changed and used to restore the database in case of any failure occurs. However, current page table entries may change during transaction execution, as it used to record all updates made to the database.
When the transaction completes, the current page table becomes shadow page table. At this time, it considered that the transaction has committed.
As shown in this figure, two pages – page 2 & 5 – affected by a transaction and copied to new physical pages. The current page table points to these pages.
The shadow page table continues to point to old pages which are not changed by the transaction. So, this table and pages used for undoing the transaction.
IGNOU Assignment Solution
IGNOU Question Paper Solution
WHAT WE DO
Provide BCA, MCA Projects
Provide Assignment & Question Paper Solution