Data Storage (Copy)
1. Understanding Primary Storage
- Definition:
Primary storage refers to memory that can be directly accessed by the CPU without the need for intermediate devices. It is also called main memory. - Purpose:
- Holds data and instructions currently in use.
- Provides fast access for active processes and applications.
- Works closely with the CPU to ensure efficient processing.
- Characteristics:
- Volatile in most cases (data is lost when power is switched off, except ROM).
- High speed compared to secondary storage.
- Limited capacity compared to secondary storage.
- Two main types:
- Random Access Memory (RAM):
- Volatile memory: Loses data when power is off.
- Stores data and instructions currently being processed.
- Allows both read and write operations.
- Types of RAM:
- DRAM (Dynamic RAM): Needs constant refreshing to maintain data.
- SRAM (Static RAM): Faster, does not need refreshing, but more expensive.
- Read Only Memory (ROM):
- Non-volatile memory: Data is retained even without power.
- Used to store firmware (permanent instructions like the BIOS).
- Cannot be easily modified by the user.
- Random Access Memory (RAM):
- Why both RAM and ROM are needed:
- RAM provides temporary workspace for running programs.
- ROM stores essential instructions needed to start the computer before the operating system loads.
2. Understanding Secondary Storage
- Definition:
Storage devices that are not directly accessed by the CPU and are used for long-term, permanent storage of data and programs. - Characteristics:
- Non-volatile: Data is retained without power.
- Larger capacity than primary storage.
- Slower access speed compared to RAM.
- Purpose:
- To store the operating system, software applications, and user files.
- To back up important data.
3. Types of Secondary Storage
a) Magnetic Storage
- How it works:
- Data is stored on magnetic platters that spin at high speeds.
- Platters are divided into tracks (circular paths) and sectors (segments within a track).
- Data is read/written by read/write heads that use electromagnets to change the magnetic polarity of spots on the platter.
- Examples:
- Hard Disk Drives (HDDs)
- Magnetic tape (used in backups and archiving)
- Advantages:
- High capacity.
- Relatively low cost per gigabyte.
- Disadvantages:
- Mechanical parts prone to wear and damage.
- Slower than SSDs.
- Can be damaged by magnets or shocks.
b) Optical Storage
- How it works:
- Uses lasers to read and write data.
- Data is stored as pits (indentations) and lands (flat areas) on a reflective disc surface.
- Laser light reflects differently from pits and lands, allowing data to be read.
- Examples:
- CD (Compact Disc)
- DVD (Digital Versatile Disc)
- Blu-ray Disc
- Advantages:
- Cheap to produce in bulk.
- Portable and easy to distribute.
- Disadvantages:
- Limited storage capacity (up to ~50 GB for Blu-ray).
- Slower read/write speeds compared to magnetic and solid-state storage.
- Can be easily scratched or damaged.
c) Solid-State (Flash Memory) Storage
- How it works:
- Uses NAND or NOR flash technology.
- Data stored in memory cells made from transistors.
- Each cell has:
- Control gate
- Floating gate (stores electrical charge to represent data)
- No moving parts, making it faster and more durable.
- Examples:
- Solid-State Drives (SSD)
- USB flash drives
- Memory cards (SD cards)
- Advantages:
- Very fast access times.
- Resistant to physical shock.
- Silent operation.
- Disadvantages:
- More expensive per gigabyte than HDDs.
- Limited write cycles (though modern SSDs last many years).
4. Virtual Memory
- Definition:
A section of the secondary storage (usually the hard drive or SSD) used as if it were additional RAM. - Purpose:
- To extend available memory when RAM is full.
- Allows larger programs to run when physical RAM is limited.
- How it works:
- The operating system moves pages of data between RAM and virtual memory as needed.
- This process is called paging.
- Pages in RAM not currently needed are stored temporarily in the page file or swap space on disk.
- Advantages:
- Enables running more programs than RAM alone allows.
- Disadvantages:
- Much slower than actual RAM because secondary storage is slower.
- Excessive paging leads to “disk thrashing” and performance drops.
5. Cloud Storage
- Definition:
Storage provided over the internet on remote servers managed by third-party companies. - How it works:
- Data is uploaded via the internet to physical servers located in data centers.
- Users can access their files from any device with internet access.
- Often uses multiple backups across locations for redundancy.
- Examples:
- Google Drive
- Dropbox
- iCloud
- OneDrive
6. Advantages and Disadvantages of Cloud vs Local Storage
Advantages of Cloud Storage:
- Accessible anywhere with internet.
- Easy file sharing and collaboration.
- Automatic backups and syncing.
- No need to purchase and maintain physical hardware.
Disadvantages of Cloud Storage:
- Requires internet connection for access.
- Dependent on third-party service reliability.
- Possible privacy/security risks.
- Subscription costs for large storage.
Advantages of Local Storage:
- Full control over data security.
- No dependency on internet access.
- One-time cost for hardware.
Disadvantages of Local Storage:
- Limited by hardware capacity.
- Vulnerable to physical damage, theft, or hardware failure.
- Manual backups required.
