Memory and Storage

Main Memory

When we talk about computer memory, we are often actually referring to the data that a computer stores in secondary storage. However, memory in a computer is something different.

Main Memory is what we call the main storage region of a computer that the CPU is able to directly access. It consists of both RAM and ROM.

RAM - Random Access Memory

RAM stores the data that is currently in use by the CPU, as well as programs currently running. It is a volatile memory which means that once the power is lost, the data is wiped. It is a fast memory, and the more RAM a computer has, in general the faster the computer is able to run, so people will sometimes add RAM to improve performance. It is also constantly being changed and rewritten.

ROM - Read Only Memory

ROM stores the instructions that are required to boot up the computer (known as the BIOS), and nothing else. This means that it is usually a lot smaller than RAM, although in an embedded system, there is likely to be a lot more ROM than RAM due to the functionality of the device. It is very difficult (or sometimes impossible) to change the contents of ROM. Unlike RAM, ROM is non-volatile which means that the data stored on ROM isn’t lost when the computer is switched off.

Memory and Storage, figure 1

Secondary Storage

Secondary storage refers to any other storage device that can’t be directly accessed by the CPU, but is able to store data even when the computer is switched off (non-volatile). We need to have secondary storage to be able to store files and software on them.

For example, when loading a program, the CPU will ‘fetch’ the instructions for how to load the program from secondary storage and load them into RAM, where it is then able to access it.

Types of Storage

There are lots of different types of secondary storage, but the most common are:

  1. Solid State such as Solid State Drives (SSDs), USB sticks, SD cards and other flash memory
  2. Optical such as CDs, DVDs and Blu-Rays
  3. Magnetic such as Hard-Disk Drives (HDD) and magnetic tape

Solid State

Solid state drives (SSDs) use electrical circuits to persistently store data. They have fast read and write access, and are generally robust, ____energy efficient and portable forms of storage. However, they are usually more expensive than other forms of storage so are only commonly available up to around 512GB. They are often used alongside a magnetic hard drive in a computer to help boost the amount of storage.

Optical

Optical discs make use of a laser to etch bumps (pits) into the surface of a disc. Another laser is then able to read these, along with the lands which correspond to un-etched bits of data, and read them as a binary string. A pit is a 0 and a land is a 1. They are a very cheap,__ lightweight__ way of storing data, but are susceptible to damage by scratching. They also have a limited storage capacity, with CDs able to store up to 800 MB and a Blu-Ray up to 50 GB. The other disadvantage is the need to have specialist hardware to read and write the discs, as well as most being unable to be re-written.

Magnetic

Magnetic storage uses a series of platters (disks) which have been coated in a magnetic material. Each one has data encoded in them as a series of changes of direction of magnetisation. As the discs spin, the read head is then able to recognise these changes as a string of data. Magnetic HDDs are a very reliable way to store data, although they are susceptible to magnetic fields, and due to the moving parts can be damaged by dropping them. However, they are very cheap, and often have a high capacity (200GB to 1TB are common in computers these days, although they can go to 4TB and beyond).

Cloud Storage

Cloud storage refers to the use of magnetic (and increasingly solid state) storage at a remote location to store data. This is then accessed via the internet connection on the device.

Cloud storage has grown considerably recently, and there are a number of reasons for this:

  1. Bandwidth of mobile networks has increased, including the introduction of 4G, making fast internet more readily available.
  2. Increased use of mobile devices which have less space for local storage.
  3. Great improvements in network security giving people more confidence to store their data out of sight.
  4. There is a broader range of services available, including ones with better interfaces and integration with current systems.
  5. Storage is getting increasingly cheap, so cloud computing companies are able to offer much better rates than before.
  6. Many companies have now developed models which make use of cloud computing in day-to-day work.

It has a large number of advantages and disadvantages in comparison to local storage.

Advantages

  1. Data can be accessed from any device anywhere in the world (as long as there is an internet connection).
  2. Can allow for automatic back-ups of data.
  3. Can share data with other users easily without having to wait for it to be transferred.
  4. Increases the amount of storage that is available on a device quickly and easily without the need for additional weight or bulk.
  5. Reduced cost as users don’t need to invest in local storage.

Disadvantages

  1. Increased security risks with a centralised system that is outside your control.
  2. It relies on having a high-bandwidth internet connection to be able to access the material.
  3. Whilst it avoids an initial outlay of cost for hardware it could cost more in the long-term due to monthly subscription payments.
  4. You are relying on the service who is providing the cloud storage. If they go down, your data could be lost.
  5. Potential for data privacy issues, with other people able to access your data.
ROM or RAM: Volatile (data lost when the power is off)
RAM
ROM or RAM: Rarely changed
ROM
ROM or RAM: Non-Volatile
ROM
ROM or RAM: Stores the BIOS
ROM
ROM or RAM: Regularly changed and can be upgraded
RAM
ROM or RAM: Stores currently running programs
RAM
ROM or RAM: Usually bigger (except in some embedded devices)
RAM
Optical, solid state or magnetic: Cheap form of storage that (usually) can't be rewritten.
Optical
Optical, solid state or magnetic: Makes use of magnetic fields which point in different directions.
Magnetic
Optical, solid state or magnetic: Cheap and high capacity form of storage.
Magnetic
Optical, solid state or magnetic: Uses bumps which are etched onto the surface using a laser.
Optical
Optical, solid state or magnetic: Electrical form of storage that has fast read and write speeds.
Solid State
Optical, solid state or magnetic: Fast, robust and portable storage.
Solid State