Shadow paging

from Wikipedia, the free encyclopedia

In computer science, shadow paging is a process used to support the two ACID properties of atomicity and durability in database systems .

A page (Page) called in this context, a unit of physical memory (for example on a hard disk ), usually of the order to bytes .

Shadow paging is a copy-on-write method to avoid in-place updates on pages. Instead, if a page is to be modified, a shadow page is allocated . Since no references (from other pages) point to the shadow page, it can be modified as required without violating consistency conditions, etc. If a page is to become permanent (persistent), all pages that refer to the original are updated so that instead they refer to the new page. Since the page is only "activated" when it is ready, the process is atomic .

If the referring pages also have to be updated using shadow paging, this process can be repeated recursively , which can result in high costs. With the WAFL file system , the Write Anywhere solution is used, which makes the pages persistent only as far as is currently necessary (i.e. write-behind caching). This increases performance significantly, as it avoids many writes to hotspots high up in the referential hierarchy (e.g. the superblock of a file system ). The price is a long delay in commit .

Write ahead logging is a more popular solution that uses in-place updates.

Shadow paging is similar to the old master-new master batch processing used with databases on mainframes . In these systems, the result of each batch processing (possibly a day's work) was written to two separate hard drives (or other data storage devices ). One was kept for backup purposes and the other was used as the starting point for the next batch.

Shadow paging is also similar to purely functional data structures in that in-place updates are avoided.

Web links