3.3 Data Storage
Primary Storage
- main memory inside a computer /directly accessed by CPU
- eg. RAM +ROM
RAM
- stores OS when running / data currently in use / instructions currently in use
- volatile memory (contents removed when device powered down)
- RAM is temporary
What is stored on RAM?
- Currently running data
- Currently running software
- Currently running instructions
- Currently running utility software
ROM
- stores boot instructions / BIOS
- instructions stored on rom cannot be edited
- is non-volatile memory
What is stored on RAM?
- Start up instructions/bootstrap instructions
- Firmware
ROM VS RAM
Static RAM VS Dynamic RAM
- ROM:
- permanent memory
- is non-volatile memory
- data on rom cannot be edited
- RAM:
- Temporary memory
- Volatile memory
- Can be read from or written to
- holds part of the OS/ applications currently in use
- DRAM :
- consists of many transistors and capacitors
- needs to be refreshed constantly
- less expensive than SRAM
- Consumes less power than SRAM
- SRAM :
- uses flip flops to hold each bit of memory
- Faster data access compared to DRAM
- CPU cache makes use of SRAM
Differences between primary and secondary storage
- Primary storage is directly accessible by the CPU
- …whereas secondary storage is not directly accessible by the CPU
- -Primary storage stores the data that is currently in use
- …whereas secondary storage stores user’s files/data
- Primary storage normally has a small capacity
- …wherease secondary storage normally has a larger capacity
- Some parts of primary storage are volatile
- …whereas secondary storage is non volatile
- some parts of primary storage the data cannot be changed
- …whereas data in secondary storage can be changed
- primary storage has faster access speeds to data
- …whereas secondary storage has slower access speeds to data
Secondary Storage
Purpose of Secondary Storage
- For non-volatile/permanent storage of files and data
- To store data that is not currently required by the CPU
- To store data to transfer it to another computer
Secondary Storage
- internal memory device not directly accessed by CPU
- non-volatile devices
- Used for long term storage of files
- eg. HDD/SSD
Solid State (SSD) (operation/description)
- Flashes data onto chips
- Uses transistors
- Uses NAND/NOR technology
- Uses control gates
- Uses flow gates
- controls the flow of electrons
Magnetic storage (operation/description)
- It has platters
- Platters/Disk divided into tracks
- Platter/Disk is spun (disks spin when in operation)
- Has read/write head that moves across storage media
- Read/Writes data using electromagnets
- Magnetic field determines binary value
- Data is read and written using electromagnets
HDD vs SSD
- SSD
- SSD: Faster transfer speeds
- SSD: Quieter operation
- SSD: More reliable due to no moving parts
- SSD: Less power required for operation
- longevity is questionable due to set read/write cycles
- HDD
- HDD: cheaper per unit of measurement
- HDD: More reliable, capable of more read and write operations
- Not reliable, susceptible to damage if moved during operation
When to use HDD or SSD
- SSD: when transfer rates/speed is a priority
- HDD: when capacity/storage requirements are high
- HDD: Typically used in large servers
Optical storage (CD/DVD) (operation/description)
- (Red) laser is used
- (Laser beams) shines onto surface of the disk
- It is rotated (at a constant speed) to be read
- Data is represented on the surface using pits and lands
- Surface is covered in a track (that spirals from the centre)
- Pits and lands represent binary values
- Pits reflect light back differently (to the area in between/land)
- Optical device can determine the binary value from the light reflection
Difference between Optical and Solid State
- Solid state has no moving parts
- …otpical does have moving parts
- Solid state is faster to access data
- …optical is slower to access data
- Solid state uses less power to operate
- … optical uses more power to operate
- solid state runs quietly
- …optical makes more noise
- solid state is more durable
- …optical is less durable
- solid state storage has a large storage capacity
- …optical has a much smaller limit to its storage capacity
- solid state is more expensive per GB of data
- …optical is cheaper per GB of data
- solid state stores data onto chips/transistors
- …optical stores data by using lasers burning pits and lands onto a disk
Virtual Memory
How is virtual memory created and used?
- The hard drive is partitioned to create virtual memory
- When RAM is full
- … pages of data that are not required …
- … are transferred from RAM to virtual memory
- When the data is required again the pages are transferred back to RAM

Explain why virtual memory is needed?
- to extend the RAM capacity
- … to stop software from freezing/crashing when the physical RAM is full
- to allow the computer to process the large amount of data required for eg.3D modelling.
Drawbacks of virtual memory
- Disk thrashing
- ..can lead to premature failure
- operations in virtual memory run slower (as data on an HDD cannot be accessed as fast as RAM)
Sample question: A computer has pages A,B and C that are stored in RAM. Page D needs to be sent to the RAM but the RAM is full. Page B is not needed immediately. Explain how Virtual memory is used in this scenario
- The secondary storage/hard drive can be partitioned to create virtual memory
- …and page B is sent to the virtual memory…
- …which makes space for page D in RAM
- …Once page A/C/D is not required/has been processed
- …page B can be sent from the virtual memory back to RAM when it is required
Cloud Storage
- A collection of servers
- …that store data in a remote location
- …that are accessed using an internet connection
Public cloud:
- storage environments where client and cloud storage provider are separate companies/organisations
Private cloud:
- storage provided by a dedicated environment behind a company firewall; client and cloud storage provider are integrated and act as a single entity
Hybrid cloud:
- a combination of public and private; some sensitive data stored on a private cloud whereas other data can be stored on a public cloud
Advantages of using cloud storage
- Cloud storage can be free (for small quantities )
- No need for separate (high capacity) storage devices // saves storage on existing devices
- Can access data from any computer with internet access
- Most cloud data services will have in-built backup/disaster recovery
- Security could be better
- Can easily increase capacity
- Data can be easily shared
Disadvantages of using cloud storage
- May be less secure// cloud server host may have a data breach
- May lose access to data stored on a cloud server if internet connection is not available
- Relies on third party maintaining the hardware
- Could incur an extra cost