Comp 1017: Digital Technologies Session 4: Memory and Storage.

download Comp 1017: Digital Technologies Session 4: Memory and Storage.

If you can't read please download the document

description

Memory and Storage Memory: data store under the immediate control of the system clock access time measured in clock cycles Storage: data store independent of the system clock access time determined by physical factors, such as disc spin speed

Transcript of Comp 1017: Digital Technologies Session 4: Memory and Storage.

Comp 1017: Digital Technologies Session 4: Memory and Storage From Memory and Storage Memory: data store under the immediate control of the system clock access time measured in clock cycles Storage: data store independent of the system clock access time determined by physical factors, such as disc spin speed Examples of memory and storage Class input Types of computer memory medium 3 methods of storing data: Electronic Magnetic Optical Electronic data storage Often hard-wired to processor Volatile (non-permanent) or non-volatile (remains after switch- off) Used for RAM (volatile) and ROM (non- volatile) Also some game cards needing fast access Memory chip from Memory board from Magnetic storage Needs storage medium (tape or disk) and a reader May be readable (non-destructively) or re-writable (erasable) Floppy disks: physical imprecision, so low data density Hard disks: physically precise, so high data density possible Magnetic tape storage from Optical storage media Needs storage medium (disc) and a reader (usually a laser) Re-writable versions also available Image fromdix/manual_appendix_signs.htm Alternative classification of memory by function Primary: accessed directly by the processor Need to have very fast access times Secondary: used to supply primary memory Slower access times Also cache effectively part of the processor Very rapid access indeed Primary memory - RAM RAM = Random Access Memory Used for storing code and data while in use by applications easily and quickly changed by the application Electronic All volatile lost at switch-off Types of RAM DRAM (Dynamic RAM) Needs regular refreshing or contents lost ~60 ns access time SDRAM (Synchronous Dynamic RAM) synchronised to computer clock ~10 ns access time much faster access than DRAM Types of RAM (2) SRAM (Static RAM) ~10 ns: faster than DRAM no refresh needed but more expensive RDRAM (Rambus Dynamic RAM) even faster under some circumstances but even more expensive Another type of RAM from RAM capacity Measured in MB (megabytes) (Mb is megabits) Often the limiting factor in computer performance Software needs a certain amount of RAM; wont run if not available e.g. Office 2000 needs 16 MB of RAM ROM ROM = Read Only Memory cannot be over-written without special equipment (PROM = Programmable ROM) non-volatile, so always present at switch-on used for boot routines e.g. instructions on how to find and load the operating system Rom for Star Trek fans from The PROM at Saltburn from EPROM EPROM = Erasable PROM can be erased using uv light and then re-written More cost-effective than ordinary PROM but indiscriminate erasure the whole chip EEPROM Electrically Erasable PROM Erasure performed electrically much cheaper and quicker Erasure can be selective (only part of the chip) Flash memory Type of EEPROM Erased by on-board circuitry No special equipment needed Examples: memory sticks, memory cards (used in digital cameras, etc.) Memory Stick from Memory card from Cache memory Special RAM used for frequently used data and instructions (actually recently used) Speeds up processor operation by having the information readily available (especially in repeated loops) Types of cache L1 cache part of the processor chip very rapid access kB L2 cache part of RAM, but located on the same board as the processor usually 256 kB or 512 kB still very fast access compared with other types of memory A different type of cash from Characteristics of secondary memory Access time varies from 40 ns (electronic memory) to several ms (floppy disk) (compare primary memory: < 1 ns) Cost: cheap (floppy drives) through jaz drives, etc. to hard disks (expensive, but cheaper than primary memory) Characteristics of secondary memory (2) Removable storage tends to be slow and of low capacity storage medium must physically match reader difficult to achieve when not permanently mated Characteristics of secondary memory (3) Capacity: low (floppy: 1.44 MB) through CD-ROM (>600 MB) and DVD (17 GB); to hard drive (137 GB) Characteristics of secondary memory (4) Type of access available: Random (discs, disks) Sequential (tape) Some floppy disks by Salvador Dali from Floppy disks Magnetisable surface on flexible plastic substrate Surface magnetised in opposite directions to represent 0 and 1 Tracks: complete circles of different diameters on the disk surface More floppy disk jargon Sectors: parts of a track defined by the angle subtended at centre of disk 18 sectors per track standard (How many degrees per sector?) and a total of 1440 sectors at 1 kB per sector (How many tracks on a floppy disk?) Floppy disk jargon (3) Clusters or Blocks: groups of 2 or more sectors minimum size storage unit used by the operating system determined by the size of the drive a file must occupy a whole number of clusters or blocks Another floppy disc from Floppy disks (continued) Access time typically 185 ms Depends on spin speed usually constant at 300 rpm Same amount of data on each track (wasteful, since there is more physical space on tracks further from centre) Formatting Tracks and sectors need to be set up before data can be written Formatting process is different for different systems (e.g. DOS and Mac) incompatible disks From High Capacity Floppies e.g. Zip drives More memory space (up to 750 MB for Zip) Faster spin speed (2941 rpm for Zip) so faster access times (~40 ms) But no standardisation, so very little market penetration Zip disk from Hard drives Several coaxial metal or glass discs Coated with magnetic medium on both sides Series of read heads, one for each surface Heads are mechanically linked; move together along a radius Hard drive heads Heads are about 2.5 m from the surface of the disk Very sensitive to dust and shock Hard drives are sealed units Avoid moving hard drives when active Hard disk drive from Hard disk from Hard Disk from Hard drive format Tracks and sectors similar to floppy drives Sectors are of 512 bytes each of variable angle to take account of greater space available further from spindle From Cylinders A cylinder consists of all the tracks of the same radius in a hard drive Can all be read (or written) without moving the heads (improved access speed) Large files stored (as far as possible) on a single cylinder Cylinders and tracks from Numbers Spin speed: up to rpm Access times: ~10 ms Capacity: up to 137 GB (using 28-bit addressing) using 48-bit addressing: up to 144 PB (petabytes) (144 x bytes) Removable hard drives 1.Cartridge-based, e.g. Jaz drives 2-5 GB capacity used for transfer and back-up of large files 2. Frame-based actual hard drive fits into an external frame; the unit behaves like a cartridge Jaz drive from CDs Disc with reflective surface Spiral track from centre to periphery Reflective surface selectively destroyed by high-power laser CDs (continued) Destroyed sections: pits; remaining reflective areas: lands Pit = digital 0; land = digital 1 Data read by low-power laser CD surface from Formatting CDs 3234 bytes per sector; 882 bytes for control and error correction, leaving 2352 bytes for data CD-ROM only use 2048 bytes per sector (2kB) other 304 bytes for more control and address data to allow more sensitive access (individual sectors) CD Standards Red book: digital audio (CD-DA) allows 74 minutes recording time (actually up to 80 minutes possible) Yellow book: CD-ROM Green book: CD-interactive (CD-i) audio, video and picture replaced by DVD More CD standards Orange book (recordable CDs) White book (CD video) replaced by DVD Blue book (enhanced music) audio and data on the same disc Numbers Rotation speed: constant linear speed for audio so angular velocity is variable: rpm, depending on position of read head Allows data transmission at base rate of 150 kB per second More CD numbers Data CDs: variable angular speed; much faster than audio to allow greater data transmission rates (50 x is common) Often combination of CLV and constant angular velocity (CAV) up to rpm Access times: ~85 ms Capacity: 700 MB CD-R (CD-Recordable) CD-R works in the same way as normal CD, except that you can record it at home Needs pre-groove track on disc: 600 nm wide; 1600 nm pitch CD-RW (CD- rewritable) CD-RW: pits and lands created by (reversible) changes in crystalline structure of the recording layer Problem: much less contrast between pits and lands than for normal CDs cannot be read by early CD readers DVD Originally Digital Video Disc then Digital Versatile Disc now: ?? (Exercise for the student) Smaller pits and lands, so tracks closer together Two layers of dye on each side of the disc; spiral tracks in opposite directions Total capacity - up to 8.5 GB CD and DVD compared frommuenchen.de/lehre/seminare/ps_ss2000/ausarb/01/ Data densities compared Hard disk: 25 Gb per square inch (4000 Mb cm -2 ) CD: I bit per square micron (100 Mb cm -2 ) Floppy disk: 1/100 of this (1Mb cm -2 ) DVD: 7 times CD (700 Mb cm -2 ) The future? Molecular memory Nanomagnets Optical storage: spectral hole burning (data stored at different wavelengths) Electron spin HOMER SIMPSONS GUIDE TO COMPUTER MEMORY (adapted from John Price) To give a guide to the relative speed of different types of memory the following analogy might prove helpful. A CPU wanting information is like Homer Simpson wanting a Duff beer. From CPU REGISTERS: A beer is open on the table by the sofa. From L1 CACHE: Marge has got the beer out, but forgotten to open it for Homer. L2 CACHE: Homer has to get up and go all the way to the refrigerator for a beer. From PRIMARY MEMORY: The fridge has no beer in it and Homer has to get in his car and go all the way to the QuickiMart to buy more beers. SECONDARY MEMORY: The supermarket is out of beer and Homer has to put in a special order. The beer will not be delivered for two weeks. Fromp/sp.asp?PD= DOH!