TTTK 1153 Computer Organization & Architecture, Chapter 3: Memory and Storage System PDF

Document Details

RetractableRocket

Uploaded by RetractableRocket

Dr. Faizan Qamar

Tags

computer architecture memory systems computer organization computer science

Summary

This document provides lecture notes on computer architecture, specifically focusing on memory and storage systems. The document covers topics such as memory cells, volatile vs. nonvolatile memory, primary memory, secondary memory, memory cell operations, and different addressing methods. It also details various types of memory, like RAM and ROM, their characteristics, and their place within computer systems.

Full Transcript

TTTK 1153 Computer Organization & Architecture Chapter 3: Memory and Storage System Lecturer: Dr. Faizan Qamar 1 Designed by Ts. Dr. Mohd Nor Akmal Khalid COURSE JOURNEY ▰ Topic 1: Introduction to Computer Systems ▰ Top...

TTTK 1153 Computer Organization & Architecture Chapter 3: Memory and Storage System Lecturer: Dr. Faizan Qamar 1 Designed by Ts. Dr. Mohd Nor Akmal Khalid COURSE JOURNEY ▰ Topic 1: Introduction to Computer Systems ▰ Topic 2: Central Processing Unit ▰ Topic 3: Memory & Storage Systems ▰ Topic 4: Input/output Systems & Interconnection ▰ Topic 5: Computer Arithmetic & Instruction Set Architecture ▰ Topic 6: Data Path, Control Design, and Pipelining ▰ Topic 7: Parallel Architectures and Multicore Processors ▰ Topic 8: Advanced Memory Systems ▰ Topic 9: Assembly Language 2 Overview of Memory in Computer Systems  Memory Cell  Types of Memory:  Volatile vs Non-Volatile memory  Primary Memory  Secondary Memory  Stores data used by the processor during computations. 3 Memory Cell Operations Inputs include: Inputs include: Select: This signal is used to choose Select: This selects the specific cell to be or activate the specific cell for writing read. data. Control: This manages the reading Control: This signal manages the write process. process, allowing the cell to accept the Sense: This output signal represents the incoming data. data currently stored in the cell and is used Data in: This is the actual data to be to retrieve the information. stored in the cell. When both Select and Control signals are When the Select and Control signals activated, the data stored in the cell is sent are activated, the data provided at out through the "Sense" line, allowing it to "Data in" is written into the cell. be read. 4 Direct Physical Addressing physical addresses program addresses stack physical heap memory program Program Addresses (Virtual Memory): This left section shows different sections of a program’s memory layout: Stack: This part of memory stores temporary data needed by the program, such as function call parameters, return addresses, and local variables. The stack grows and shrinks as functions are called and return. Heap: The heap is used for dynamic memory allocation. When a program needs to allocate memory at runtime ( Program (Code/Data): This contains the code (instructions) of the program and static/global variables. This section is loaded into memory when the program starts. 5 Direct Physical Addressing physical addresses program addresses stack physical heap memory program Address Translation: The arrow from program addresses to physical addresses indicates that the program’s memory addresses are virtual addresses, not direct physical addresses. Memory Management Unit (MMU) or similar hardware/software translates these virtual addresses into physical addresses. This translation enables features like virtual memory, where programs use an abstraction of memory that might be larger than actual physical memory. 6 Direct Physical Addressing physical addresses program addresses stack physical heap memory program Physical Memory: The section on the right represents physical memory (e.g., actual RAM) in the system. Each program address, after translation, points to a specific location in physical memory. The MMU handles this mapping, allowing the system to isolate each program’s memory space and prevent direct access to raw physical memory by user programs. Physical memory holds the actual data that the CPU accesses during program execution. 7 Memory per cells (historically) Computer Bits/cell Computer Bits/cell Evolution in Computing Power: The increase in bits per cell over time Burroughs Intel Core i7 64 1 highlights the advancements in B1700 AMD Ryzen 9 64 memory technology, enabling Apple M1 64 computers to store and process larger IBM PC 8 amounts of data more efficiently. DEC PDP-8 12 NVIDIA GPU A100 64 IBM 1130 16 Intel Xeon 64-Bit Standardization: Modern 64 DEC PDP-15 18 Scalable processors have converged on 64 bits per cell as a standard, allowing XDS 940 24 IBM POWER9 64 for faster processing speeds and Electrologica X8 27 AMD EPYC 64 support for high-performance XDS Sigma 9 32 applications. Apple M2 64 Honeywell 6180 36 ARM Cortex-A76 64 Impact on Performance: Higher bits CDC 3600 48 per cell contribute to more powerful CDC Cyber 60 and capable systems, meeting the demands of today's software and computational tasks. 8 Types of Memory: Volatile vs Non-Volatile memory Volatile memory is a type of memory that requires continuous power to maintain the stored data. When the power is turned off, all information stored in volatile memory is lost. This characteristic makes volatile memory suitable for temporary data storage, where data is only needed while the device is on. Characteristics of Volatile Memory: Power Dependency: Data is lost when the power is turned off. Faster Access: Generally faster than non-volatile memory, making it suitable for tasks that require quick data retrieval and storage. Types: RAM (Random Access Memory): Both DRAM (Dynamic RAM) and SRAM (Static RAM) are types of volatile memory. Cache Memory: Often made from SRAM, it is used for high-speed access by the CPU. 9 Types of Memory: Volatile vs Non-Volatile memory Non-volatile memory is a type of memory that retains data even when power is turned off. This makes it ideal for permanent storage of data that must be preserved, like the operating system, application files, and user data. Characteristics of Non-Volatile Memory: Data Persistence: Retains data without power, allowing for long-term storage. Generally Slower: Compared to volatile memory, non-volatile memory is usually slower but is constantly improving with advancements in technology. Types: ROM (Read-Only Memory): Stores data permanently and is often used to hold firmware. Flash Memory: Used in USB drives, SSDs, and memory cards. Hard Disk Drives (HDDs): A mechanical storage option that holds large amounts of data permanently. 10 Types of Memory: Volatile vs Non-Volatile memory 11 Types of Memory: Primary vs. Secondary Memory Primary Memory Primary memory, also known as main memory or internal memory, is the computer's temporary storage area that directly interacts with the CPU. It holds data and instructions that the CPU needs to access immediately during processing. Examples: RAM (Random Access Memory): The main storage area used by the CPU for tasks in progress. It temporarily holds data and applications that the CPU is actively using. Cache Memory: A smaller, even faster type of memory located closer to the CPU. It stores frequently accessed data to speed up processing. Advantages: Speed: The direct access by the CPU makes primary memory extremely fast, providing data immediately when needed. Essential for Active Processing: It enables smooth performance and multitasking by holding data that the CPU is currently processing. Drawbacks: Volatility: Since primary memory is volatile, it loses all stored information when the computer shuts down. Limited Size: Primary memory generally has a smaller storage capacity compared to secondary memory. 12 Types of Memory: Primary vs. Secondary Memory Secondary Memory Secondary memory, also known as auxiliary or external memory, is used for long-term data storage. Unlike primary memory, secondary memory is non-volatile, meaning it retains data even when the computer is turned off. This makes it suitable for storing data permanently, such as files, programs, and the operating system. Examples: Hard Disk Drive (HDD): A traditional storage device that uses spinning disks to store data. Solid State Drive (SSD): A faster, modern storage device with no moving parts, commonly used in laptops and high-performance systems. Optical Discs (CDs, DVDs) and USB Drives: Other forms of external storage used for data portability and backup. Advantages: Persistence: Secondary memory is non-volatile, meaning it retains information without a power source, ideal for storing important data permanently. Large Storage Capacity: Secondary storage devices offer much larger storage capacity than primary memory, making it possible to store large amounts of data at a lower cost per byte. Drawbacks: Speed: Accessing data from secondary memory is slower due to indirect access through I/O channels. Cost (Speed): While cost per storage capacity is lower, the slower access speed compared to primary memory makes it unsuitable for immediate processing needs. 13 Types of Memory: Primary vs. Secondary Memory Criteria Primary Secondary Description Fast, volatile Slow, Non-volatile Storage Store temporarily Store permanently CPU Access Direct Indirect Types Main/Internal Auxiliary/External Access via Data Bus I/O Channels Example RAM, ROM, Cache Hard Disk, SSD, CDs Advantage Speed, Direct Access Persistence, Large Size Drawback Volatility, Limited Size Speed, Cost 14 Introduction to Primary Memory  Volatile  Faster  Storage for Store temporarily  Types:  RAM  ROM  Cache 15 RAM Random Access Memory (RAM) is a type of volatile memory used in computers and other digital devices to temporarily store data that the CPU needs quick access to while performing tasks. RAM is essential for system performance because it enables fast data retrieval and writing, which is crucial for running applications, multitasking, and overall system speed. Dynamic RAM (DRAM): It requires periodic refreshing to retain data, as each cell is made up of a capacitor that gradually loses charge. Common DRAM variants include DDR (Double Data Rate) RAM, with generations such as DDR2, DDR3, DDR4, and DDR5. Static RAM (SRAM): A faster, more expensive type of RAM that does not require refreshing. It is mainly used for cache memory in CPUs and other high-speed applications due to its quicker access times but lower storage density and higher cost. 16 DRAM Dynamic Random Access Memory (DRAM) It is a type of volatile memory used widely in computing devices, such as PCs, laptops, and servers. It is called "dynamic" because it requires constant refreshing to retain data. Here’s a detailed look at how DRAM works and its key characteristics: 1. DRAM is composed of tiny capacitors and transistors arranged in a grid of cells. 2. Each cell stores a single bit of data (0 or 1) using a capacitor, which can hold or release an electric charge. 3. The capacitor gradually loses its charge, so it needs to be refreshed periodically (every few milliseconds) to maintain data integrity. 17 DRAM Types of DRAM: Synchronous DRAM (SDRAM): Operates in sync with the system clock, which helps in coordinating data transfer with the CPU. Double Data Rate (DDR) SDRAM: An advanced version of SDRAM that can transfer data on both the rising and falling edges of the clock signal, effectively doubling the data rate. Common generations include DDR, DDR2, DDR3, DDR4, and DDR5. Graphics DRAM (GDDR): A specialized type of DRAM used in graphics cards, optimized for high bandwidth, making it ideal for rendering and gaming applications. 18 SRAM Static Random Access Memory (SRAM) It is a type of volatile memory used in computing devices for high-speed cache and buffer storage. Unlike DRAM, SRAM does not require constant refreshing to retain data, hence the term "static." Key Characteristics of SRAM 1. SRAM uses flip-flop circuits composed of transistors (typically 4 to 6 per cell) to store each bit of data. 2. This design allows each cell to retain its state (0 or 1) as long as power is supplied, without the need for refreshing, unlike DRAM's capacitor-based structure. 19 SRAM Types of SRAM 1. Asynchronous SRAM: Operates independently of the system clock, making it useful in applications where timing is less critical. 2. Synchronous SRAM: Works in sync with the system clock, allowing it to coordinate with the CPU for fast data access in high-speed applications. 3. Non-Volatile SRAM (nvSRAM): A special type of SRAM that combines traditional SRAM with non-volatile memory technology. It retains data even when power is lost, used in applications requiring persistent data storage. 20 SRAM vs DRAM Feature SRAM (Static RAM) DRAM (Dynamic RAM) Data Storage Uses flip-flop circuits with transistors Uses capacitors and transistors Refreshing Does not require refreshing Requires periodic refreshing to retain data Speed Faster than DRAM Slower than SRAM Density Lower density, fewer cells per unit Higher density, more cells per area unit area Cost More expensive per bit Less expensive per bit Power Consumption Lower standby power, higher active Higher standby power due to power constant refreshing Typical Use Cache memory (L1, L2, and L3 caches Main memory (RAM) in most in CPUs) computers and devices Volatility Volatile (loses data without power) Volatile (loses data without power) Lifespan Generally longer lifespan due to lack May wear out faster due to of refreshing frequent refreshing Example Applications CPU cache, high-speed buffer Primary RAM in PCs, laptops, memory and mobile devices 21 ROM MEMORY Read-Only Memory (ROM) It is a type of non-volatile memory used to store essential data and instructions that do not change frequently. Unlike RAM, which is volatile and loses data when the power is turned off, ROM retains data permanently, making it ideal for storing firmware and startup instructions that computers and devices need every time they are turned on. Key Characteristics of ROM: 1. Non-Volatile: ROM retains data even when the power is off, which is crucial for storing the instructions needed to start up a system. This characteristic makes ROM different from volatile memories like RAM, which require power to hold data. 2. Read-Only: As the name suggests, ROM is designed to be "read-only," meaning the data stored in it cannot easily be modified or erased. In some types of ROM, data can be changed or reprogrammed, but this is usually a slower and less frequent process than reading. 22 ROM MEMORY 3. Stores Firmware and BIOS: ROM is typically used to store firmware, which is the software permanently programmed into a device's hardware. In computers, ROM holds the BIOS (Basic Input/Output System), which contains the instructions necessary to initialize hardware and load the operating system during startup. 4. Durability: ROM is very durable, as data is hard-wired or programmed once and seldom needs modification. Its durability and non-volatility make ROM an excellent choice for storing critical data that the system relies on to function properly. 23 ROM MEMORY Advantages of ROM Data Persistence: Since ROM is non-volatile, it holds data even when power is off, ensuring that essential instructions are always available at startup. Reliability: ROM is reliable for critical data because it is less prone to accidental modification or loss. Low Power Consumption: ROM generally consumes less power compared to volatile memories, making it efficient for storing essential, unchanging data. Drawbacks of ROM Limited Modifiability: ROM data is usually fixed or hard to change, so it is not suitable for storing data that needs regular updates. Slower than RAM: ROM is slower to read than RAM because it doesn’t prioritize speed but rather durability and reliability. Limited Capacity: ROM typically has a small storage capacity, sufficient only for essential instructions and firmware. 24 ROM MEMORY Types of ROM: 1. Masked ROM (MROM): The earliest type of ROM, where data is programmed during manufacturing and cannot be changed. 2. Programmable ROM (PROM): Can be programmed once after manufacturing. Once written, data cannot be changed or erased. 3. Erasable Programmable ROM (EPROM): Data can be erased by exposing it to UV light and reprogrammed. 4. Electrically Erasable Programmable ROM (EEPROM): Can be erased and reprogrammed electrically, allowing for more flexibility in updating firmware without removing the chip. 25 RAM vs ROM MEMORY Feature RAM (Random Access Memory) ROM (Read-Only Memory) Data Volatility Volatile (loses data when power is off) Non-volatile (retains data without power) Primary Use Temporary storage for active data and Permanent storage for firmware and processes essential instructions Modifiability Read and write; data can be easily Typically read-only; data is pre-written modified and hard to modify Data Storage Stores data and instructions needed by Stores firmware, BIOS, and essential the CPU during operation system boot instructions Speed Faster, providing quick access to Slower than RAM, sufficient for boot and frequently accessed data initialization tasks Capacity Larger capacity (GBs), supports Smaller capacity (KBs to MBs), only stores multitasking and application storage essential data Types DRAM, SRAM MROM, PROM, EPROM, EEPROM Examples Main memory in computers and devices BIOS, firmware in embedded systems, game consoles 26 CACHE MEMORY Cache Memory It is a type of high-speed memory located close to the CPU, designed to store frequently accessed data and instructions. By holding this data, cache memory significantly improves processing speed, as it allows the CPU to access critical information faster than if it were stored in the main memory (RAM). Cache memory is typically built from SRAM (Static RAM), which is faster but more expensive than DRAM. 27 CACHE MEMORY Key Characteristics of Cache Memory 1. Location: 1. Cache memory is often located directly on the CPU chip (L1 cache) or nearby (L2 and L3 caches). 2. This proximity to the CPU minimizes data transfer times and improves overall processing speed. 2. Levels of Cache: 1. L1 Cache: The smallest and fastest cache located directly on the CPU core. Each core usually has its own L1 cache. 2. L2 Cache: Larger than L1 and a bit slower, often shared among cores in multi-core CPUs or sometimes dedicated to individual cores. 3. L3 Cache: The largest and slowest cache, shared by all CPU cores in multi-core processors. 3. Speed: 1. Cache memory is much faster than main memory (RAM) but slower than CPU registers. 2. It provides rapid access to data, allowing the CPU to retrieve frequently used information quickly without needing to go to the slower main memory. 4. Size: 1. Cache memory is small compared to RAM, typically ranging from a few kilobytes (KB) to several megabytes (MB). 2. Its limited size is due to the high cost and larger physical space required per bit of data. 28 CACHE MEMORY How Cache Memory Works Cache Hit: When the CPU requests data, it first checks if the data is in the cache. If found, it’s a "cache hit," and the data is read directly from the cache, which is much faster than accessing main memory. This is called “Word Transfer” Cache Miss: If the data is not in the cache, it’s a "cache miss," and the CPU fetches the data from main memory. The data is then stored in the cache for future access. This is called “Block Transfer” and if take from Secondary Storage that is called “Page Transfer” Replacement Policies: When the cache is full, replacement policies like Least Recently Used (LRU) or First In, First Out (FIFO) determine which data to replace with new data. 29 CACHE MEMORY Advantages of Cache Memory Improves CPU Performance: Cache memory speeds up data retrieval, reducing the time the CPU spends waiting for data. Reduces Access Time: By holding frequently used data close to the CPU, cache memory minimizes the need to access slower main memory, enhancing overall system performance. Efficiency in Multitasking: Cache memory helps in running multiple applications smoothly by keeping essential data quickly accessible. Drawbacks of Cache Memory High Cost: Cache memory, built with SRAM, is expensive per bit, which limits its size. Limited Size: Due to cost and physical space, cache memory is much smaller than RAM, which means only a subset of frequently used data can be stored. Complex Management: Managing cache memory involves complex algorithms for data replacement and organization, adding some complexity to CPU design. 30 Introduction to Secondary Memory  Non-volatile storage  Slower  Long-term data storage.  Types:  Magnetic Disks (Floppy, HDD)  SSDs  Flash Drive  Optical Storage (CD, DVD, Blu-ray)  Cloud 31 Floppy Disk  A floppy disk is an early magnetic storage medium used from the 1970s to the early 2000s, offering limited capacity (typically 1.44 MB for 3.5-inch disks).  Stores data as magnetic patterns on a flexible disk.  Low capacity (360 KB to 1.44 MB) and slow read/write speeds compared to modern storage.  Compact and easily transportable, though susceptible to dust, magnetic fields, and physical damage. Types: 8-inch: Early computers (80-256 KB) 5.25-inch: Popular in the 1980s (up to 1.2 MB) 3.5-inch: Standard in the 1990s (1.44 MB) Common Uses: Data Transfer: Moving small files between systems. Software Distribution: Early software and OS releases. Boot Disks: For system recovery and startup. 32 Magnetic Disks  Magnetic Disk Storage is a type of non-volatile secondary storage that uses magnetic surfaces to store data.  The most common example of magnetic disk storage is the Hard Disk Drive (HDD), which has been widely used in computers, servers, and data storage systems for decades.  Magnetic disks are known for their large storage capacity and relatively low cost per gigabyte, making them ideal for mass storage. Advantages of Magnetic Disk Storage High Storage Capacity: Magnetic disks offer large storage capacities at a lower cost compared to SSDs. Low Cost: Due to its relatively low cost per gigabyte, magnetic disk storage is economical for large-scale data storage. Durability for Storage: Magnetic disks are long-lasting and can retain data for years with minimal degradation when properly maintained. Disadvantages of Magnetic Disk Storage Slower Access Speed: Compared to SSDs, magnetic disks have slower read/write speeds due to mechanical moving parts. Susceptibility to Physical Damage: Magnetic disks are sensitive to physical shocks, which can cause the read/write head to scratch the platter, resulting in data loss (known as a head crash). Power Consumption: Magnetic disks consume more power than SSDs, especially when the motor spins the platters at high speeds 33 Key Components of Magnetic Disk Storage Platters: – Magnetic disks are composed of circular platters made of metal or glass, coated with a magnetic material. – Data is stored on the surface of these platters in the form of magnetic patterns that represent binary data (0s and 1s). Read/Write Heads: – Each platter has a read/write head that moves across the surface of the disk to read or write data. – The heads do not physically touch the disk but float just above it, allowing fast data access while minimizing wear on the disk surface. Spindle and Motor: – The platters are mounted on a spindle that spins them at high speeds (typically 5400 to 7200 RPM in consumer drives and up to 15,000 RPM in high-performance drives). – The motor powers this spinning, which allows the read/write heads to access different parts of the platter surface rapidly. Tracks and Sectors: – Each platter is divided into concentric circles called tracks and further subdivided into sectors. – Tracks are circular paths where data is written, and sectors are segments of these tracks. A collection of sectors forms a block of data that can be read or written together. 34 How Magnetic Disk Storage Works 1. Data Writing: – To write data, the read/write head generates a magnetic field that aligns the magnetic particles on the disk surface in a particular pattern to represent binary data. – Different alignments (magnetic orientations) indicate binary values, typically 0 and 1. 2.Data Reading: – When reading data, the read/write head detects the magnetic patterns on the disk surface. – The patterns are converted back into binary data and sent to the computer’s CPU for processing. 3.Access Mechanism: – Random Access: Magnetic disks provide random access to data, meaning the read/write head can move directly to any part of the disk without needing to read data sequentially. – Seek Time and Latency: The time it takes for the read/write head to reach the correct track (seek time) and for the platter to rotate to the correct sector WATCH VIDEO: (rotational latency) affects the overall data access https://www.youtube.com/watch?v=wteUW2sL7bc speed. 35 Disk Performance Parameters Rotational The time it takes for the delay beginning of the sector (rotational to reach the head latency): The sum of the seek time and the rotational Access time delay Time it takes to get into position to read or write Once the head is in position, the read or write operation is then Transfer time performed Data transfer portion of the operation 36 Factors that affect the performance of a magnetic disk system 1. Seek Time Definition: Time for the read/write head to reach the correct track. Impact: Shorter seek time means faster data access. 2. Rotational Latency Definition: Time for the platter to rotate the correct sector under the read/write head. Impact: Lower latency improves access speed. 3. Data Transfer Rate Definition: Speed of reading/writing data to the disk (e.g., MB/s). Impact: Higher transfer rate allows faster data movement. 4. Track Density Definition: Number of tracks per inch on a disk surface. Impact: Higher density increases storage capacity. 5. Surface Defects Definition: Flaws on the disk surface that may prevent data storage. Impact: Defects can cause errors, slowing down or corrupting data access 37 Solid State Drives (SSDs)  Solid State Drives (SSDs) are a type of non-volatile storage that uses flash memory to store data.  Unlike traditional hard disk drives (HDDs), SSDs have no moving parts, which makes them faster, more durable, and energy- efficient.  SSDs are widely used in laptops, desktops, servers, and other devices due to their superior performance and reliability. Advantages of SSDs High Speed: SSDs offer faster data access, boot times, and overall system performance. Durability: No moving parts make SSDs resistant to physical shock and vibration. Lower Power Consumption: SSDs are energy-efficient, which helps extend battery life in portable devices. Quiet Operation: SSDs are silent, as there are no mechanical parts. Disadvantages of SSDs Cost: SSDs are more expensive per gigabyte compared to HDDs. Limited Write Cycles: NAND flash memory has a limited number of write cycles, meaning SSDs can wear out over time, although wear leveling mitigates this. 38 Key Characteristics of SSDs Flash Memory-Based: SSDs use NAND flash memory to store data. This type of memory is non-volatile, meaning it retains information even when power is turned off. No Moving Parts: SSDs are composed of memory cells, not spinning platters or read/write heads, which eliminates mechanical delays and makes them more shock-resistant and quieter than HDDs. Types of SSDs: SATA SSDs: Connect via the SATA interface and offer significant speed improvements over HDDs, though slower than NVMe SSDs. NVMe SSDs: Use the PCIe interface, offering much faster data transfer speeds and lower latency. M.2 and U.2 SSDs: Compact form factors that use SATA or NVMe interfaces, commonly used in laptops and compact systems. Endurance: Each memory cell in an SSD can only be written to a certain number of times before it wears out. To manage this, SSDs use wear leveling algorithms to distribute data writes evenly across cells, prolonging the drive’s lifespan. 39 40 RAID (Redundant Array of Independent Disks)  It is a data storage technology that combines multiple physical disks into a single logical unit to improve performance, increase redundancy, or both.  RAID setups are commonly used in servers, workstations, and high- performance computers where data reliability and access speed are critical. Redundancy: RAID provides data redundancy, which means if one or more disks fail, data can still be recovered from the remaining disks, depending on the RAID level. Data Striping: In many RAID levels, data is split across multiple disks in “stripes.” This can improve read and write speeds because data is accessed from multiple disks at once. Parity: Parity is extra data calculated from the main data. It helps rebuild lost data if a disk fails. Some RAID levels (e.g., RAID 5, RAID 6) use parity for error correction. https://en.wikipedia.org/wiki/Standard_RAID_levels 41 Redundant Array of Independent Disks (RAID) Advantages of RAID Improved Performance: RAID levels with striping, like RAID 0, RAID 5, and RAID 10, improve read and write speeds by allowing data to be accessed from multiple disks at once. Data Redundancy: RAID levels with mirroring or parity, such as RAID 1, RAID 5, and RAID 6, offer redundancy, so data can be recovered if a disk fails. Scalability: RAID can be expanded by adding more disks, especially in RAID levels that use parity, such as RAID 5 and RAID 6. Disadvantages of RAID Cost: RAID requires multiple disks, which increases hardware costs, especially in levels that use mirroring. Complexity: RAID setups can be complex to configure and manage, requiring expertise and sometimes specialized hardware like RAID controllers. Potential for Data Loss in Some Levels: RAID 0 offers no redundancy, so if a single disk fails, all data is lost. 42 Redundant Array of Independent Disks (RAID) 7 LEVEL OF RAID 43 FLASH MEMORY  A flash drive memory is a portable, non-volatile storage device that uses flash memory to store data.  Flash drives are compact, durable, and connect via USB (Universal Serial Bus), making them ideal for transferring and backing up files.  Commonly known as USB drives or thumb drives, they have become a convenient, widely-used storage solution. Advantages of Flash Drives Portability: Flash drives are easy to carry and can be used on a wide variety of devices. Compatibility: They are compatible with most modern operating systems, including Windows, macOS, and Linux. Durability and Reliability: They are resilient against physical shocks and environmental factors, making them highly durable for on-the-go data storage. Low Power Consumption: Flash drives consume very little power, making them efficient for use on laptops or other battery-powered devices. Disadvantages of Flash Drives Limited Lifespan: Flash drives have a limited number of write cycles due to the nature of NAND flash memory, so they may degrade over time with excessive writing and erasing. Storage Capacity: While they have higher capacities now (ranging from a few GBs to a few TBs), flash drives are still limited compared to larger storage solutions like external SSDs or HDDs. Data Security: Flash drives can be easily lost or stolen due to their size, potentially exposing 44 sensitive data. However, encryption can help protect stored data. Key Characteristics of Flash Drive Flash Memory-Based: Flash drives use NAND flash memory, which retains data without power, allowing for persistent storage. This makes them reliable for storing files, even when they are disconnected. Portability: Flash drives are small, lightweight, and easy to carry, often fitting on a keychain. They can easily be used across different computers, laptops, and compatible devices, enabling fast and convenient file transfers. Plug-and-Play: Most flash drives are plug-and-play, meaning they don’t require any installation. When plugged into a USB port, they are immediately recognized by the device’s operating system, making them user- friendly. Durability: Flash drives have no moving parts, which makes them resistant to physical shock and wear. They can withstand being dropped or bumped without data loss, unlike traditional hard drives. 45 Flash vs SSD Aspect Similarities Differences Both use semiconductor memory with SSDs typically use NAND flash memory, but not all flash Core Technology no moving parts. memory devices are SSDs. Data on both is non-volatile, meaning it Historically, SSDs existed without flash memory, but these Non-Volatility is retained without power. were expensive and had limited viability. Both are used for data storage across a Flash memory can be found in smaller devices (USB drives, Usage variety of devices. SD cards), while SSDs are used primarily in computers. Both contribute to fast data access SSDs (especially NVMe) offer significantly faster read/write Performance speeds. speeds compared to general flash devices. No moving parts, making them durable Flash comes in many form factors (USB, SD cards), while Form Factors and reliable for various environments. SSDs have specific types (2.5” SATA, NVMe). SSDs use SATA or NVMe interfaces; flash devices have Connection Interface N/A simpler interfaces like USB. Flash is used in smaller, portable devices; SSDs are larger Size and Portability N/A and typically stay inside computers. Flash (like SD cards) is generally cheaper per unit size, Cost N/A whereas SSDs, especially NVMe, are pricier. Flash memory includes NOR (larger, older) and NAND Memory Types N/A (faster, smaller), with NAND being prevalent in SSDs. 46 Optical Storage (CD, DVD)  Optical Storage refers to data storage that uses light, usually in the form of a laser, to read and write data on a disc.  Common types of optical storage include CDs (Compact Discs), DVDs (Digital Versatile Discs), and Blu-ray Discs.  These discs are often used for multimedia, software distribution, and archival purposes due to their durability and portability. Advantages of Optical Storage Portability: Optical discs are lightweight and easy to carry, making them a convenient solution for data transfer and distribution. Durability for Archival Use: Optical discs are less affected by environmental factors, making them suitable for long-term storage and data archival. Inexpensive for Distribution: Optical media is relatively cheap for mass distribution, especially for software, music, and movies. Disadvantages of SSDs Limited Storage Capacity: Optical discs have lower storage capacities compared to modern flash and HDD/SSD storage. Slower Access Speeds: Reading and writing data on optical media is slower compared to other storage types, especially for large files. Physical Susceptibility: While durable, optical discs can still be damaged by scratches or exposure to extreme light and temperature. 47 Key Characteristics of Optical Storage (CD, DVD) 1. Laser-Based Technology: Optical storage devices use a laser to read and write data. Data is stored in the form of tiny pits (for binary 1s) and lands (for binary 0s) on the disc surface. A laser beam reads data by detecting differences in light reflection from the pits and lands. 2. Durability: Optical discs are more durable and resistant to environmental conditions than magnetic media. They are not susceptible to magnetic interference and are more resistant to physical wear than hard drives. However, they can be damaged by scratches, dust, or exposure to sunlight, which can affect data readability. 3. WORM (Write Once, Read Many): Some optical media, like CD-R and DVD-R, are write-once, read-many (WORM), meaning data can be written only once and then only read. RW discs (like CD-RW or DVD-RW) allow data to be erased and rewritten multiple times. 48 Types of Optical Storage (CD, DVD) CD (Compact Disc): Typically holds about 700 MB of data and is mainly used for audio, low-resolution video, and software. DVD (Digital Versatile Disc): Holds up to 4.7 GB for single-layer discs and 8.5 GB for dual-layer discs, commonly used for movies, software, and games. Blu-Ray Disc: Has a much higher capacity than CDs and DVDs, up to 25 GB for single-layer and 50 GB for dual-layer discs, making it suitable for high-definition video. 49 CD-R vs CD-RW CD Recordables (CD-R) CD Rewritables (CD-RW)  Write-once read-many  Can be repeatedly written and  Accommodates applications in which only overwritten one or a small number of copies of a set  Phase change disk uses a material that of data is needed has two significantly different  Disk is prepared in such a way that it can reflectivities in two different phase be subsequently written once with a laser states  Amorphous state: Molecules exhibit a random beam of modest-intensity orientation that reflects light poorly  Medium includes a dye layer which is used  Crystalline state: Has a smooth surface that to change reflectivity and is activated by a reflects light well high-intensity laser  A beam of laser light can change the  Provides a permanent record of large material from one phase to the other  Disadvantage is that the material volumes of user data eventually and permanently loses its desirable properties  Advantage is that it can be rewritten 50 CD vs DVD vs Blu-Ray 51 Cloud Memory  Cloud Memory, often referred to as Cloud Storage, is a type of data storage model in which data is stored on remote servers accessed via the internet, rather than being stored on a local or on-premises device.  Cloud memory offers scalable, on-demand access to storage and processing power, allowing users to store, retrieve, and process data from virtually anywhere with an internet. Benefits of Cloud Memory Scalability: Easily adjusts storage capacity based on demand. Accessibility: Accessible from any device with internet access. Data Redundancy: Provides backups and replication for high data availability. Cost Savings: Pay-as-you-go model reduces infrastructure costs. Automatic Maintenance: Providers handle updates and security patches. Database Accessibility: Variety of database applications without having to buy, maintain, and manage the storage assets Drawbacks of Cloud Memory Internet Dependency: Requires a stable internet connection. Security Concerns: Sensitive data can be vulnerable to breaches. Data Loss Risk: Potential for outages or provider-related issues. Hidden Costs: Unexpected expenses with heavy usage or data transfer. Privacy Compliance: May require additional measures for data protection regulations. 52 Cloud Memory 53 54 Error Detection and Correction Error Detection and Correction in memory and storage systems ensures that data remains accurate and uncorrupted, even when minor errors occur. This is crucial because memory (e.g., RAM) and storage devices (e.g., HDDs, SSDs) can experience errors due to electrical interference, cosmic rays, or physical wear over time. Error detection and correction codes help maintain data integrity, reducing the likelihood of system crashes, corrupted files, or data loss. https://data-flair.training/blogs/error-detection-and-correction-in-computer-network/ 55 Error Detection and Correction Error Detection in Memory and Storage 1. Purpose: Detect whether data has been altered or corrupted while stored in memory or on a storage device. 2. How It Works: Error detection involves adding extra bits (known as parity bits or checksums) to data. When data is read, the system recalculates these bits and checks if they match the original values. 3. Common Methods: Parity Checking: A single parity bit is added to each byte of data to make the sum of 1s even or odd. A mismatch indicates an error. Checksums and Cyclic Redundancy Check (CRC): These methods calculate a value based on the data, and any change in data causes the checksum or CRC to change, signaling corruption. 56 Error Detection and Correction Error Correction in Memory and Storage 1. Purpose: Not only detect but also fix errors automatically, allowing data to be accurately recovered even if corrupted. 2. How It Works: Error correction codes add redundant information in a way that allows the system to determine the location of an error and correct it. 3. Common Methods: 1. ECC (Error-Correcting Code) Memory: Often uses Hamming Code, which adds extra bits to data to detect and correct single-bit errors and detect double-bit errors. 2. Reed-Solomon and BCH Codes: Used in storage devices (like SSDs, CDs, and DVDs) to correct multiple-bit errors or burst errors, ensuring data integrity for long-term storage. 3. RAID with Parity: Some RAID levels (e.g., RAID 5) use parity bits across multiple drives to rebuild lost data if a disk fails. 57 Hamming Code  Specifically designed to detect and correct single-bit errors within data.  Parity Bits:  Extra bits are added to the original data bits to form a code.  These parity bits are strategically placed to create overlapping groups that allow for error detection.  Error Detection and Correction:  Detects errors by checking the parity of groups.  If an error is found, the location of the incorrect bit can be pinpointed and corrected automatically.  Example for an 8-bit data, Hamming code adds multiple parity bits (e.g., 4 bits) to create a 12- bit Hamming code. The code can identify and correct any single-bit error in the data. https://www.youtube.com/watch?v=WdmGSWrcMvM 58 Error Correction Code (ECC)  Functionality: Extends the concept of Hamming Code to handle more complex error scenarios.  Capabilities:  Can detect and correct single-bit errors.  Can detect (but not always correct) multiple-bit errors, depending on the ECC scheme used.  Applications: Widely used in memory systems, hard drives, and data communication to ensure data reliability. 59 THANK YOU! Next Lecture: Input/Output and Interconnections. 60

Use Quizgecko on...
Browser
Browser