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
SRAM VS DRAM
- 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
ROM
- stores boot instructions / BIOS
- instructions stored on rom cannot be edited
- is non-volatile memory
ROM VS 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
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)
- Uses flash memory
- Data is flashed on chips
- Uses NAND/NOR technology
- Writes (and reads) sequentially
- Uses transistors/control gates/floating gates…
- …to control the flow of electrons
- It is a type of EEPROM technology
- When data is stored the transistor is converted from 1 to 0 / 0 to 1
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
- Uses magnetic fields to control magnetic dots of data
- 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
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)
Cloud Storage
- Storage consisting of servers
- … that are often in a remote location
- … that are often maintained/backed up by a third-party company
- Storage that is normally accessed using a network (often the internet)
- Physical servers and storage are needed to store data in cloud storage
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