IGCSE Computer Science - Storage Devices and Compression PDF

Summary

This document is an outline of various storage devices in computer science. It details primary memory (RAM and ROM), secondary storage (magnetic, optical, and solid-state), and their characteristics. The document also includes information on file compression techniques.

Full Transcript

# IGCSE Computer Science ## Chapter 3: Storage Devices and Compression ### 1. Primary Memory *Definition:* Main memory inside the computer that is directly accessible by the CPU. ### 2. Secondary Storage *Definition:* Non-volatile storage that is not directly accessed by the CPU. **Purpose of...

# IGCSE Computer Science ## Chapter 3: Storage Devices and Compression ### 1. Primary Memory *Definition:* Main memory inside the computer that is directly accessible by the CPU. ### 2. Secondary Storage *Definition:* Non-volatile storage that is not directly accessed by the CPU. **Purpose of secondary storage:** * For permanent/non-volatile storage of data * To store data that is not currently required by the CPU * To store data to transfer it to another computer **Technologies of secondary storage:** Magnetic - Optical - Solid-state ### 3. Types of Storage | Type | Description | |---|---| | Primary Memory | RAM and ROM | | Internal Secondary Storage | Hard disk drive (HDD) and Solid state drive (SSD) | | External Secondary Storage | DVD/CD and DVD-RAM, Blu-ray disc, USB memory stick/flash memory, Removable hard drive, Offline/backing storage devices| ### 4. Primary Memory: RAM and ROM * **RAM (Random Access Memory)** - Volatile temporary memory - Can read from and written to - Used to store: * Instruction that are currently in use * Data that are currently in use * Part of an application/software currently in use * Part of the operating system currently in use * **ROM (Read Only Memory)** - Non-volatile permanent memory - Can only be read from but not written to - Stores the firmware and start-up instruction ### 5. Differences between Primary and Secondary Storage | Feature | Primary Memory | Secondary Storage | |---|---|---| | Accessible By CPU | Directly | Not directly | | Access Speed | Faster | Slower | | Purpose | Stores start-up instructions and can hold data and instructions whilst processed | Permanently stores files and software | | Volatile | Can be volatile or non-volatile | Non-volatile | | Cost | More expensive per byte | Tends to have greater storage | ### 6. Summary of the Main Differences Between RAM and ROM: | Feature | RAM | ROM | |---|---|---| | Memory Type | Temporary | Permanent | | Volatile | Volatile | Non-volatile | | Write Operation | Can be written to and read from | Data stored cannot be altered | | Purpose | Used to store data, files, programs, part of OS currently in use| Always used to store BIOS and other data needed at start up | ### 7. Example of Application: Remote-controlled toy car A remote-controlled toy car has circuitry which contains both RAM and ROM chips. The remote control is a hand-held device. **ROM** *Storing the factory settings such as remote control frequencies* *Storing the 'start-up' routines when the toy car is first switched on* *Storing of the set routines; for example, how the buttons on the hand-held device control turning left, acceleration, stopping, and so on.* **RAM** *The user may wish to program in their own routines; these new instructions would be stored in the RAM chip* *The RAM chip will store the data/instructions received from the remote control unit.* ### 8. Secondary Storage: Magnetic Storage *Magnetic storage characteristics:* * Data is stored in form of magnetic dots * Consists of several platters, where magnetic dots are stored * Magnetic dots are stored on the platters in sectors and tracks * Data is read, written or erased as the magnetic dots pass under read/write heads *Examples of magnetic storage devices:* * Hard disk drive (HDD) * Portable hard disk drive * Magnetic tape drive **How is data read from magnetic devices?** 1. Data, in form of magnetic dots, is stored on surface of multiple platters in sectors and tracks. 2. Platters are spun at a high speed. 3. A number of electromagnetic read/write heads move quickly back and forth to access all tracks and sectors. 4. Data is read as dots pass under electromagnetic read/write heads. **How is data written on magnetic devices?** 1. Data, in form of magnetic dots, is stored on surface of multiple platters in sectors and tracks. 2. Platters are spun at a high speed. 3. A number of electromagnetic read/write heads move quickly back and forth to access all tracks and sectors. 4. The electromagnetic read/write heads apply suitable magnetic field to control the magnetic dots. ### 9. Secondary Storage: Optical Storage *Optical storage media have the following in common:* * Data is represented on disks as pits and land * Optical device shines laser on the disk * An arm is used to move the optical device across the disk *Examples of optical storage devices:* * CD (ROM - R-RW) * DVD (ROM - R-RW-RAM) * Blu-ray disc **How to write/record data on an optical storage device?** 1. The disk is spun. 2. A laser beam is shone onto the surface of disk. 3. An arm moves the laser across the surface of the disk. 4. The laser burns pits onto the surface of the disk. 5. Both pits and lands represent the binary two values 1 and 0. **How to read data from an optical storage device?** 1. The disk is spun. 2. A laser beam is shone onto the surface of disk. 3. An arm moves the laser across the surface of the disk. 4. The laser is used to read the pits and lands on the surface of the disk. 5. The reflected light from the laser shining on the disk is captured by a sensor. ### 10. Secondary Storage: Solid-state Storage *Solid-state storage devices characteristics:* * Uses NAND/NOR chips are used to store data * Made of transistors that are laid out in a grid * Transistors are used as control gates and floating gates to control the flow of electrons *Examples of solid-state storage devices:* * Solid-state drive (SSD) * Portable SSD * SD Card * USB Flash Memory **How data is stored on solid-state devices?** 1. NAND/NOR chips are used that are made of transistors 2. Data is stored by flashing it onto the chips 3. The flow of electrons is controlled using transistors/gates 4. Data is stored sequentially as 0s and 1s inside the transistors **How data is read from solid-state devices?** 1. NAND/NOR chips are used that are made of transistors 2. Data is stored by flashing it onto the chips 3. The flow of electrons is controlled using transistors/gates 4. Data is stored sequentially as 0s and 1s inside the transistors 5. Data is read sequentially by retrieving the binary values of transistors ### 11. Advantages of using solid-state technology compared to magnetic technology: * Faster data access speed * No moving parts so more durable * Less power consumption * They run much cooler * They occupy less physical space * They are lighter (making them more suitable for a portable computer) * They run quieter * Not affected by magnetic fields ### Problems with solid-state drives * More expensive than magnetic devices for the same amount of storage * Solid-state devices have lower longevity for read/write operations ### 12. Volatile vs Non-volatile * **Volatile** means the content of the memory will be lost when the power to the RAM is turned off. * **Non-volatile** means the data will be stored whether the power is turned on or off. ### 13. Virtual Memory *Definition:* A memory management system that makes use of secondary storage and software extended RAM capacity. *Virtual memory is used when the Random access memory is full.* *It is created by partitioning the Hard disk drive.* *Data is divided into Pages that can be sent from RAM to the HDD to be temporarily stored until they are required.* **Draw a diagram to represent how virtual memory is created and used.** - Hard drive - Virtual Memory - RAM **How virtual memory is created and used?** 1. The hard drive is partitioned to create virtual memory 2. When RAM is full.... * pages of data that are not required... * ...are transferred from RAM to virtual memory 3. When the data is required again the pages are transferred back to RAM **Importance of using virtual memory?** * To extended RAM capacity so it reduces the need to buy and install more expensive physical RAM memory * To allow compute to process large amount of data * Stops programs from crashing when physical RAM is full * Page: block of data that can be transferred from virtual memory to RAM or vice versa. ### 14. Cloud Storage *Definition:* Online storage platform *Data is stored in a remote physical location...* *Using hundreds of interlinked data servers* **Advantages of using cloud storage compared to storing data locally:** * Data is accessible at any time, from any device, anywhere in the world provided internet access is available. * More available storage space. * Storage capacity can be increased without adding additional physical devices. * Automatic backups can be made. * Users only pay for the storage they use. * No need to carry any storage device so data will not be lost if the storage device is lost/stolen. **Disadvantages of using cloud to employees/users storage compared to storing data locally:** * Users must have an internet connection to access data. * Users must have a reliable internet connection to store data. * Cloud storage has an ongoing cost. **Security of data in the cloud:** * Loss of control over the storage of data (storage is controlled by the cloud provider) * More security issues as multiple copies of the data are stored * Easier to hack as data always available **Disadvantage to employees on a company of the company storing data in the cloud.** * Internet connection is needed/needs to be stable if it is unstable the data cannot be accessed * Employees could be pressured to work outside of hours as they can access the data from any location **Advantages for the owners of the company of storing its data in cloud storage** * The data can be accessed from any location meaning that employees can work from anywhere with a connection. * The hardware is owned/maintained by a third party meaning that the company are not responsible for maintaining or security. * Can increase the storage needed easily without needing to buy new hardware. * Do not need to house the hardware needed costs can be saved on the space saved for this. * Cloud system will back up the data meaning the company does not need to do this. **Disadvantages for the owners of the company of storing its data in cloud storage** * Expensive to setup. * Expensive to maintain. * Must take regular backup and copy the data on multiple servers. ### 15. File Compression *Smaller files = fewer packets = faster transmission* **Reasons to reduce (or compress) the size of a file:-** * To reduce storage space on disk /server * to reduce the time taken to stream a music or video file * to reduce the time taken to upload, download or transfer a file across a network * the download/upload process uses up network bandwidth * Reduced file size also reduces costs. **File compression** | Type | Description | |---|---| | Lossy | A compression algorithm is used. Data will be lost deleted permanently so original file cannot be recreated. Removes data that will not be noticed by the user. | | Lossless | Compression algorithm is used. No data will be removed so original file can be restored. Repeated patterns in the are identified. | **Lossy** * Lossy compression is the method which eliminate the data which is not noticeable. * In Lossy compression, A file does not restore or rebuilt in its original form. * In Lossy compression, Data's quality is compromised. * Lossy is used for Images, audio and video. * Lossy compression is termed as irreversible compression. **Lossless** * Lossless Compression does not eliminate the data which is not noticeable. * While in Lossless Compression, A file can be restored in its original form. * Lossless Compression does not compromise the data's quality. * Lossless Compression is used for Text or program, images and sound. * Lossless Compression is termed as reversible compression. ### 16. Lossless Compression *Definition:* * Method of compression that loses no data in the process * Used when it is essential that no data is lost during compression process, for example: * Code * Text file * Database file Lossless compression can be used on any file type. This can be done by two methods:- * Run-length encoding (RLE) * Data Dictionary **Run-length encoding (RLE)** *Definition:* * The repeated patterns of characters/pixels/samples are identified .. ... then encoded into two values: 1. The number of identical characters in the run (run count) 2. The value of pattern (run value) **Example:** *Consider the following:* 000001111222333333444444444 *It would be encoded to:* 5-0 1-1 8-2 5-39-4 **Data Dictionary** *Definition:* * The repeated characters/pixels/samples are identified.. ... then indexed (put in a table) ... and then replaced by their index * The position of repeated characters/pixels/samples in the file is stored in the table * The number of times the repeated characters/pixels/samples appear in the file is stored in the table **Example:** *Consider the following text:* THIS SECTION SHOWS YOU HOW THIS WOULD WORK *Data dictionary:* 1= THIS, 2=HOW, 3=OU *The data is encoded to:* 1 SECTION S2S Y3 2 1 W3LD WORK ### 17. Lossy Compression *Definition:* * Method of compression where redundant details are permanently removed from the file without significantly affecting the quality of the file * Used when there is no requirement for the files to be the same as original file, for Example: * Images- Audio files- Video files *Lossy compression reduces the file size more than lossless compression.* *Lossy compression lowers the quality of image/sound/video files but NOT significantly* **Advantages of compressing a file using lossy compression compared to lossless compression:** * Requires less storage space on the computer * The file is transmitted quicker over the internet * Less bandwidth is required to send the file over the internet **How to compress an image file using lossy compression:** * A compression algorithm is used.. * ..where redundant details are permanently removed * Colour depth can be reduced * Image resolution can be reduced **How to compress a sound file using lossy compression:** * A compression algorithm is used.. * ..where redundant details are permanently removed * Sampling rate can be reduced * Sampling resolution can be reduced * Unnecessary sounds can be discarded (such as removing sounds human ear can't hear)

Use Quizgecko on...
Browser
Browser