SCSC 311 Information Systems hardware and software Overview of Storage Devices Storage devices consist of Storage medium: device or substance holds data Read/write mechanism: read/write data to/from the storage medium e.g. RAM, HD, magnetic tape, CD, USB flash memory … Device controller: provides the interface between the storage devices and system bus Two main types: Primary storage devices: Support immediate execution of programs Secondary storage devices Provide long-term storage of programs and data Chapter Objectives Storage device Characteristics Primary storage Magnetic storage Optical storage Different types of storage devices Q: Why do we need so many different type of storage devices? Storage Hierarchy Different storage devices have different characteristics. No single storage device fits in all purpose find an optimal mix of cost and performance for a particular purpose. a crucial decision to be made in the process of procurement of computer systems. Five Characteristics of Storage Devices 1. Speed 2. Volatility 3. Access method 4. Portability 5. Cost and capacity Characteristic 1: Speed Access time the time required to execute one complete read/write operation For some devices: access time is constant regardless storage location. (e.g. RAM) For others: access time varies with storage location. (e.g. HD) Average access time Primary storage speed Typically faster than secondary storage speed by a factor of 10^5 measured in nanoseconds (ns) Very important to overall system performance (Recall: wait state in Ch4) Secondary storage speed measured in milliseconds (ms) Important to some applications Characteristic 1: Speed Storage device speed is decided by Access time The unit of data transfer to/from the storage device For primary storage: a word For secondary storage: a block 512 bytes is typical block size Data transfer rate = 1 / access time x unit of data transfer e.g. a primary storage device with 50 ns access time, and word size is 4 bytes data transfer rate = ? e.g. a typical hard disk with 50 ms access time, and block size is 512 bytes data transfer rate = ? Characteristic 2: Volatility Primary storage are generally volatile Cannot reliably hold data for long periods Secondary storage are generally nonvolatile Hold data without loss over long periods of time Characteristic 3: Access Method The physical structure determines the ways in which data can be accessed. Serial access (linear) Random access (direct access) Access time depends on the current position of read/write mechanism and the position of the desired data item. Usually hold backup copies of data, e.g. magnetic tape Is not restricted to any specific order when accessing data Access time may or may not be constant, e.g. RAM, HD Parallel access simultaneously access multiple storage locations e.g. RAM, HD in some OS Characteristic 4: Portability Removable storage media with standardized formats e.g., compact disc, tape, USB flash memory Typically results in slower access speeds Why? Ans: Usually high-speed access requires tight control of environmental factor. e.g. In a HD, sealed enclosures minimize / eliminate dust and air density variations. Characteristic 5: Cost and Capacity Cost increases: With improved speed, volatility, or portability As access method changes serial random parallel access Cost vs. other characteristics Primary storage: expensive, high speed and combination of parallel/random access methods Secondary storage: less expensive, slower, and capacity is greater Summary: Characteristics & Cost Index Storage device Characteristics Primary storage Magnetic storage Optical storage Storing Electrical Signals Data are represent as digital electrical signals in computer system Digital electrical signals can be stored directly or indirectly Storing signal directly: using battery, capacitor Storing signal indirectly: using its energy to alter the state of a device, and an inverse process regenerates an equivalent electrical signal Storing Electrical Signals Directly Directly storing electrical power by devices such as batteries and capacitors Trade off between access speed and volatility Battery stable slow to accept / regenerate electrical current Capacitor charge / discharge faster lose charge quickly need to recharge frequently An electrochemical cell Storing Electrical Signals Indirectly Indirectly storing electrical power Uses energy to alter the state of a device, such as a mechanical switch, or a magnetic field; Inverse the process regenerates equivalent electrical signal Early computers use rings of ferrous material as primary memory (core memory) Storing data via the polarity of the magnetic field they contain. Modern computers use memory implemented with semiconductors (RAM and ROM) Random Access Memory (RAM) Primary storage must closely match CPU speed and word size to avoid wait states Characteristics of RAM Microchip implementation using semiconductors To read and write with equal speed Random access to stored bytes, words, or larger data units Basic memory types: Static RAM (SRAM) – implemented entirely with transistors flip-flop circuit (next slide) Dynamic RAM (DRAM) – uses transistors & capacitors (Details on how SRAM and DRAM work are not required.) Static RAM (SRAM) •A flip-flop circuit • 2 transistor to store one bit, and 2 - 4 transistors perform read/write • requires a continuous supply of electrical power to maintain position. Dynamic RAM (DRAM) DRAM needs 1 transistors & 1 capacitors per bit stores each bit in a separate capacitor. As real-world capacitors are not ideal and hence leak electrons, the information eventually fades unless the capacitor charge is refreshed periodically (thousands time / sec) Less complex than SRAM have higher density than SRAM Less expensive than SRAM Slower than SRAM Required refresh cycles Less efficient circuitry for accessing individual bit access time: CPU (0.2 ns) vs. SRAM 5 ns vs. DRAM 50 ns. Improve RAM Performance To bridge the performance gap between memory and CPU, three technologies are used: Read-ahead memory access Activating the read/write circuitry need extra time Programs usually access memory sequentially Activating the read/write circuitry for location n+1 during or after an access to location n Synchronous read operations (SDRAM) Write/read operation are broken into steps pipelining multiple write/read operations On-chip memory caches Enhanced DRAM (EDRAM) – Puts a small amount of SRAM in DRAM, as cache Nonvolatile Memory (NVM) NVM: random access memory with long-term or permanent data retention NVM is slower than RAM e.g. NVM is used to store system BIOS, e.g. NVM is used to store programs and data (Firmware) in portable devices (handheld computers and cell phones …) Three generations of NVM ROM: the content is permanent put into it EPROM (Erasable programmable ROM) EEPROM (Electronically Erasable programmable ROM) Common NVM Flash RAM is the most common NVM Competitive with DRAM in capacity and read performance Relatively slow write speed Limited number of write cycles (wear out) Primary used for secondary storage and for firmware that isn’t frequently updated. Other NVM technologies are under development: Ferroelectric RAM, Polymer memory, … (not required) Memory Packaging Memory circuits are embedded in chips groups of chips are packed on a small circuit board Dual in-line packages (DIPs) Early RAM and ROM circuits were packaged in DIPs Difficult to install on a circuit board Single in-line memory module (SIMM) Standard RAM package in late 1980s easy to install Double in-line memory module (DIMM) A newer packaging standard SIMM with independent electrical contacts on both sides of the module. Memory Access Physical organization of memory: a sequence of contiguous memory cells Big endian vs. little endian Addressable memory: the highest numbered storage byte can be (self-study) Computer manufactures made different design decision Big endian: the most significant byte at the lowest memory address Little endian: the other way around represent Physical memory is usually smaller than addressable memory Addressable memory is determined by the number of bits used to represent an address Q: If 32 bits are used to represent an address, what is the addressable memory? Memory Allocation Memory allocation: describes the assignment of specific memory addresses to system software, application programs, and data The program’s offset: the difference between the first address in physical memory and the address of the first program instruction Programmer can describe addresses in a program in two ways Absolute addressing Relative addressing Absolute addressing vs. Relative addressing Absolute addressing Programmer describes memory address that refers to actual physical memory address Q: What’re some disadvantages of absolute addressing? Relative addressing (a.k.a. Indirect addressing ) Each program are written as if the first programm instruction is at address 0. CPU converts this relative address into physical address through the program offset Offset register holds the offset value. OS updates offset register for each executing program. Relative addressing for Multiple Programs Index Storage device Characteristics Primary storage Magnetic storage Optical storage Magnetic Storage The duality of magnetism and electricity Converts electrical signals into magnetic charges, and captures magnetic charge on a storage medium Polarity of magnetic charge represents bit values zero and one Later regenerates electrical current from stored magnetic charge Q: How does magnetic storage device work? (next slide …) Principles of Magnetic Storage • Components • Write operation • Read operation Characteristics of Magnetic Storage Coercivity and Areal Density Coercivity: the ability of a substance or magnetic storage medium to accept and hold magnetic charges. Areal density: a function of the length and width of an individual bit area. Magnetic Tape Ribbon of plastic with a coercible (usually metallic oxide) surface coating Mounts in a tape drive for reading and writing Relatively slow serial access Compounds magnetic leakage; wraps upon itself Susceptible to stretching, friction, temperature variations Magnetic Tape Two approaches to recording data (details are not required) (a) Linear recording, (b) Helical scanning Several formats and standards (e.g., DDS [DAT], AIT, Mammoth, DLT, LTO) Magnetic Disk In magnetic disk, flat, circular platter with metallic coating that is rotated beneath read/write heads Random access device; read/write head can be moved to any location on the platter Common types: Hard disks & floppy disks Cost performance leader for general-purpose on-line secondary storage Components of a Disk Drive Tracks, Sectors and Cylinder To increase capacity per platter, disk manufacturers divide tracks into zones and vary the sectors per track in each zone. Magnetic Disk Access Time Disk Access Steps: 1. 2. 3. Switch among read/write heads Position the heads over a track Wait for the desired sector to rotate beneath the heads Disk Delay: 1. Head-to-head switching time: HTH (All heads share on set of circuit.) 2. 3. Track-to-track seek time: TTT Rotational delay Most important performance numbers Average access delay: (e.g. p196) For a large number of random accesses, the expected HTH switch time is the switching time of half of the number of recording surfaces. The expected TTT seek time is the movement time over half of the tracks. The expected rotation delay is time needed to rotate half of a track. Average access time: Average access time = average access delay + the time reading a sector Sequential access time = the time reading a sector How to minimize average access time Organize related data in sequential sectors of the same a track Equivalently positioned tracks on multiple platters De-fragmentation Index Storage device Characteristics Primary storage Magnetic storage Optical storage Optical Storage Devices In optical storage devices, bit values are stored as variations in light reflection reflecting a laser off of a recording surface and detecting changes in the reflected light compared to the original light. Higher areal density and longer data life than magnetic storage Standardized and relatively inexpensive Uses: low performance requirements, high capacity requirements, portable and in standardized format • Optical storage devices read data by shining laser beam on the disc. • Reflecting a laser off of a recording surface and detecting changes in the reflected light compared to the original light. • Photoelectric cell is positioned at a complementary angle to intercept reflected laser light. CD-ROM Read-only; data permanently embedded in durable polycarbonate disc Bit values represented as flat areas (lands) and concave dents (pits) in the reflective layer Data recorded in single continuous track that spirals outward from center of disc Popular medium for distributing software and large data sets CD-R and Magneto-Optical (self study) CD-R Uses a laser that can be switched between high and low power and a laser-sensitive dye embedded in the disc Relatively cheap Common uses: create music CDs on home computers, back up data from other storage devices, create archives of large data sets, and manufacture small quantities of identical CDs Magneto-Optical Utilize both optical and magnetic technologies. Technology peaked in the mid 1990s. It is waning. Phase-Change Optical Discs and DVD (self study) Phase-Change Optical Discs Enables nondestructive writing to optical storage media Materials change state easily from non-crystalline (amorphous), to crystalline, and then back again Example: CD-RW DVD: improves on CD and CD-RW technology Increased track and bit density: smaller wavelength lasers and more precise mechanical control Improved error correction Multiple recording sites and layers Technologies and Storage formats for Optical Storages (details are not required)