ArticleslgStudy

computer science

Snapshot (computer storage)

Snapshot (computer storage) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Snapshot (computer storage) rather than just read about it. In short: In computer systems, a snapshot is the state of a system at a particular point in time. The term was coined as an analogy to that in photography.

Snapshot (computer storage) — main illustration
Snapshot (computer storage) — illustration

Key takeaways

  • Snapshot (computer storage) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Snapshot (computer storage) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Snapshot (computer storage) from memory before moving on to harder problems.

Reference excerpt

In computer systems, a snapshot is the state of a system at a particular point in time. The term was coined as an analogy to that in photography.

Rationale A full backup of a large data set may take a long time to complete. On multi-tasking or multi-user systems, there may be writes to that data while it is being backed up. This prevents the backup from being atomic and introduces a version skew that may result in data corruption. For example, if a user moves a file into a directory that has already been backed up, then that file would be completely missing on the backup media, since the backup operation had already taken place before the addition of the file. Version skew may also cause corruption with files which change their size or contents underfoot while being read. One approach to safely backing up live data is to temporarily disable write access to data during the backup, either by stopping the accessing applications or by using the locking API provided by the operating system to enforce exclusive read access. This is tolerable for low-availability systems (on desktop computers and small workgroup servers, on which regular downtime is acceptable). High-availability 24/7 systems, however, cannot bear service stoppages. To avoid downtime, high-availability systems may instead perform the backup on a snapshot—a read-only copy of the data set frozen at a point in time—and allow applications to continue writing to their data. Most snapshot implementations are efficient and can create snapshots in O(1). In other words, the time and I/O needed to create the snapshot does not increase with the size of the data set; by contrast, the time and I/O required for a direct backup is proportional to the size of the data set. In some systems once the initial snapshot is taken of a data set, subsequent snapshots copy the changed data only, and use a system of pointers to reference the initial snapshot. This method of pointer-based snapshots consumes less disk capacity than if the data set was repeatedly cloned.

Implementations

Volume managers Some Unix systems have snapshot-capable logical volume managers. These implement copy-on-write on entire block devices by copying changed blocks‍—‌just before they are to be overwritten within "parent" volumes‍—‌to other storage, thus preserving a self-consistent past image of the block device. Filesystems on such snapshot images can later be mounted as if they were on a read-only media. Some volume managers also allow creation of writable snapshots, extending the copy-on-write approach by disassociating any blocks modified within the snapshot from their "parent" blocks in the original volume. Such a scheme could be also described as performing additional copy-on-write operations triggered by the writes to snapshots. On Linux, Logical Volume Manager (LVM) allows creation of both read-only and read-write snapshots. Writable snapshots were introduced with the LVM version 2 (LVM2).

File systems Some file systems, such as WAFL, fossil for Plan 9 from Bell Labs, and ODS-5, internally track old versions of files and make snapshots available through a special namespace. Others, like UFS2, provide an operating system API for accessing file histories. In NTFS, access to snapshots is provided by the Volume Shadow-copying Service (VSS) in Windows XP and Windows Server 2003 and Shadow Copy in Windows Vista. Melio FS provides snapshots via the same VSS interface for shared storage. Snapshots have also been available in the NSS (Novell Storage Services) file system on NetWare since version 4.11, and more recently on Linux platforms in the Open Enterprise Server product. On AIX, JFS2 supports snapshots. On macOS, APFS supports snapshots. EMC's Isilon OneFS clustered storage platform implements a single scalable file system that supports read-only snapshots at the file or directory level. Any file or directory within the file system can be snapshotted and the system will implement a copy-on-write or point-in-time snapshot dynamically based on which method is determined to be optimal for the system. On Linux, the Btrfs and OCFS2 file systems support creating snapshots (cloning) of individual files. Additionally, Btrfs also supports the creation of snapshots of subvolumes.

See also Application checkpointing Persistence (computer science) Sandbox (computer security) Storage Hypervisor System image Virtual machine

Notes

References

External links

Garimella, Neeta (2006-04-26). "Understanding and exploiting snapshot technology for data protection, Part 1: Snapshot technology overview". IBM. Harwood, Mike (2003-09-24). "Storage Basics: Backup Strategies".

Worked examples

Example 1 — a first encounter with Snapshot (computer storage)

Start with the simplest possible case. Write down what Snapshot (computer storage) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Snapshot (computer storage) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Snapshot (computer storage) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Snapshot (computer storage)

In research
Snapshot (computer storage) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Snapshot (computer storage) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Snapshot (computer storage) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Backup, Fault-tolerant computer systems, Persistence, so understanding it makes those chapters shorter.
In everyday life
Look for Snapshot (computer storage) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Snapshot (computer storage)” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Snapshot (computer storage) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Snapshot (computer storage) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Snapshot (computer storage) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Snapshot (computer storage) in simple terms?

In computer systems, a snapshot is the state of a system at a particular point in time. The term was coined as an analogy to that in photography.

Why does Snapshot (computer storage) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Snapshot (computer storage)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Snapshot (computer storage).

Tags

  • Backup
  • Fault-tolerant computer systems
  • Persistence

Keep exploring