Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Storage

  • Memory and storage devices can be split up into two distinct groups:
    • primary storage/memory
    • secondary storage

Primary storage/memory

  • Primary storage is the part of a computer system that stores data and instructions that are currently being used by the CPU.
    • It is located within the computer system.
    • It can be accessed directly by the CPU.
    • It holds data and instructions needed while programs are running.
    • It allows the CPU to retrieve data and instructions quickly for processing.

Random access memory (RAM)

  • Random access memory (RAM) is primary memory that can only be written to or read from. It temporarily stores data and instructions currently being used by the CPU.
  • RAM has these characteristics:
    • volatile; all data stored in RAM is lost once the computer switches off
    • read and write; data can be read or written to
    • temporary storage; stores programs, data and instructions in use
    • fast access; CPU can access data in RAM quickly.
  • It’s purpose is to provide temporary storage for the data and instructions the CPU needs while executing programs.
  • RAM is needed because:
    • it temporarily stores programs and data currently being used
    • it allows the CPU to access the instructions and data quickly
    • it allows data to be changed while programs are running.

Read only memory (RAM)

  • Read only memory is primary memory that cannot be written to (changed) and can only be read. They permanently store instructions needed to start up a computer.
  • ROM has these characteristics:
    • non-volatile; data stored in ROM is retained even when computer is off
    • read-only; data can be read from ROM, but can’t be written to/changed
    • permanent storage; stores instructions the computer needs to boot up
  • It’s purpose is to store the start-up instructions (firmware) that are needed when a computer is switched on.
  • ROM is needed because:
    • it stores the start-up instructions required when the computer turns on
    • it retains these instructions even when the computer is off
    • it allows the computer to begin the boot process.

Secondary storage

  • Secondary storage is non-volatile storage used to store data, programs and files permanently or for long-term use.
    • It retains data even when the computer is switched off/loses power.
    • It is used to store data and programs that are not currently being used by the CPU.
    • It usually has a much larger storage capacity than primary storage.
    • Data must be transferred from secondary storage into primary storage (RAM) before the CPU can access and process it.

Examples

  • Hard disk drive (HDD)
  • Solid state drive (SSD)
  • USB flash drive
  • Optical discs

Magnetic, optical and solid-state storage

Magnetic

  • Magnetic storage uses platters; circular disks coated with a magnetic material. Data is stored by magnetising small regions on the surface of these platters.
  • The platters are divided into two structures:
    • tracks; concentric circular paths on the surface of a platter where data is stored
    • sectors; sections into which each track is divided. Each sector stores a portion of data.
  • Data is written using electromagnets in the read/write heads.
    • The platter rotates at high speed.
    • The read/write head moves to the correct track and sector.
    • An electrical current passes through an electromagnet in the write head.
    • This creates a magnetic field that changes the magnetisation of tiny regions on the platter.
    • Different magnetic orientations represent binary data (0s and 1s).
  • A common example of magnetic storage is a Hard Disk Drive (HDD).

Optical

  • Optical storage uses lasers to create and read pits and lands on the surface of a disc.
    • pits; tiny indentations or marked areas on disc
      • Data is represented by patterns of pits and lands along a track on the disc.
    • lands; flat areas between pits
  • In order for it to read data:
    • The optical disc spins inside an optical drive.
    • A laser beam is directed onto the surface of the disc.
    • The laser light is reflected differently by pits and lands.
    • A light-sensitive detector measures the reflected light.
    • The changes in reflected light are converted into electrical signals and interpreted as binary data.
  • In order for it to write data:
    • A laser is directed onto the disc’s recording layer.
    • The laser changes the recording material to create marks representing the data.
    • These marks produce differences in how the laser light is reflected when the disc is read.
  • Common examples are Compact Discs (CD), Digital Versatile Discs (DVD) and Blu-ray discs.

Solid-state

  • Solid-state storage uses NAND or NOR technology and transistors with control gates and floating gates to store data electronically.
  • It uses transistors containing a:
    • control gate; controls the transistor and is used to apply an electrical voltage
    • floating gate; an electrically isolated part of the transistor that stores electrical charge (electrons).
  • In order for it to read data:
    • An electrical voltage is applied to the control gate.
    • The computer checks whether the transistor allows electrical current to flow.
    • The stored charge affects whether the transistor conducts.
    • The computer interprets the resulting electrical state as binary data (0s and 1s).
  • In order for it to write data:
    • An electrical voltage is applied to the control gate.
    • This causes electrons to move onto the floating gate.
    • The floating gate retains the electrical charge.
    • The stored charge changes the transistor’s electrical characteristics.
    • This change represents the data being stored.
  • In order for it to erase data:
    • An electrical process removes the stored charge from the floating gate.
    • This allows the memory cell to be used again.
  • NAND is commonly used in SSDs, USB flash drives and SD cards because it allows large amounts of data to be stored at relatively low cost.
  • NOR is commonly used in storing firmware and other code that needs to be read directly from memory.

Virtual memory

  • Virtual memory is a memory management system that makes use of secondary storage and software to enable a computer to compensate for the shortage of actual physical RAM memory.
    • It allows a computer to behave as though it has more RAM than is physically installed.
    • It is managed automatically by the operating system (OS).
    • It uses secondary storage, such as an HDD, or SSD, to temporarily store data that is not currently needed in RAM.
    • Data is transferred between RAM and virtual memory when needed.

How it is created

  1. The operating system reserves a portion of secondary storage to be used as virtual memory.
  2. This reserved area acts as an extension of RAM.
  3. The operating system manages the transfer of data between RAM and virtual memory.

How it is used

  • Virtual memory is used when RAM is full or does not have enough space for the data and instructions needed.
  • The OS transfers data between RAM and virtual memory in units called pages; a fixed-sized block of data transferred between RAM and virtual memory.
  1. RAM becomes full.
    • The computer is running several programs, and there is insufficient RAM to hold all their data and instructions.
  2. Data is selected.
    • The OS identifies pages of data that are not currently needed or have not been used recently.
  3. Data is transferred to virtual memory.
    • These pages are moved from RAM into the reserved area of secondary storage.
  4. RAM space becomes available.
    • The space occupied by the transferred pages can now be used by other programs of data,
  5. Data is transferred back when needed.
    • When a program requires a page that is currently in virtual memory, the OS transfers it back into RAM. Other pages may need to be moved out to make room.

Why it is necessary

  • To allow more programs to run simultaneously. Programs can collectively require more memory than the physical RAM available.
  • To run larger programs. Programs requiring more memory than currently available can continue running.
  • To prevent memory shortages. It helps prevent programs from failing or the system becoming unable to continue operating simply because RAM is full.
  • To make better use of available memory. Pages not currently needed can be moved out of RAM, freeing space for other data.

Cloud storage

  • Cloud storage is a method of data storage where data is stored on offsite servers; the physical storage may be on hundreds of servers in many locations.
    • It can be accessed remotely in comparison to storing data locally.

Benefits

  • Files can be accessed at any time from any device anywhere in the world, provided internet access is available.
  • Cloud storage will allow recovery of their data if the user has a failure of their storage device.
  • More than one person and device can access the files.

Drawbacks

  • If internet connection is slow/unstable, they would have problems accessing or downloading data.
  • Costs can be high if large storage capacity is required.
  • If servers or accounts are compromised, files could be accessed by unauthorised users.