1-1
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-1
Mass Storage (Secondary Storage)
• On-line versus off-line• Typically much larger than main memory• Less volatile than main memory• Access much slower than main memory
1-2
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-2
Mass Storage Systems
• Magnetic Systems– Disk– Tape
• Optical Systems– CD– DVD
• Flash Drives
1-3
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-3
Figure 1.9 A magnetic disk storage system
magnetic coating
1-4
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-4
• each track is split into sectors/arcs, each sector can be accessed as an independent string of bits
• a sector could contain upto a few KB• tracks and sectors are not a permanent part of a
disk's physical structure. They are marked magnetically through formatting the disk.
• hard disks v floppy disks• capacity varies - number of disks, density of
sectors and tracks• for speed, heads might float off the disk and not
touch it. one particle of dust could jam between head and disk - head crash.
1-5
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-5
Disk performance
• Seek time – moving heads from one track to another
• Rotation delay/latency time – half the time a disk takes to rotate (the average time it takes for the desired data to rotate round to a head). Eg several thousand revs per minute
• Access time – seek time + rotation delay• Transfer rate – rate data transferred to/from disk
eg MB a second
1-6
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-6
Disk Fragmentation
• Data can become fragmented over time. • De-fragmentation: the process of re ordering
data to make storage more efficient.
1-7
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-7
Figure 1.10 Magnetic tape storage
Optical SystemsCD has reflective material covered with a clear
protective coating (600-700MB)• Data recorded by creating variations in the
reflective surfaces• Data retrieved by laser beam that monitors
irregularities on the reflective surface as it spins• A single track spirals from the middle outwards• Track divided into sectors (2KB)• Data stored at a uniform linear density over entire
track –more data on outer part of disk than innerDVDs –have multiple semi transparent layers which
are distinct surfaces when viewed by a precisely focused laser. More storage (several GB).
1-9
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-9
Figure 1.11 CD storage
1-10
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Flash Drives
• No heads or spinning or moving lasers, just electronic circuitry –fast! Not sensitive to physical shock
• Bits are stored by sending electronic signals directly to the storage medium where they cause electrons to be trapped in tiny chambers of silicon dioxide
• Repeated erasing damages the silicon dioxide chambers. So not used for main memory, used for digital cameras, PDAs
1-10
1-11
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-11
Files
• File: A unit of data stored in mass storage system– Fields and keyfields
• Physical record (eg all the data on a sector) versus Logical record (eg a staff member details)– One physical record could hold many logical– One logical record could spread over many
physical• Buffer: A memory area used for the temporary
storage of data (usually as a step in transferring the data)
1-12
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-12
Figure 1.12 Logical records versus physical records on a disk
1-13
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-13
Representing Information:Representing Text
• Each character (letter, punctuation, etc.) is assigned a unique bit pattern.– ASCII: Uses patterns of 7-bits to represent
most symbols used in written English text– Unicode: Uses patterns of 16-bits to represent
the major symbols used in languages world side
– ISO standard: Uses patterns of 32-bits to represent most symbols used in languages world wide
1-14
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-14
Figure 1.13 The message “Hello.” in ASCII
1-15
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-15
Representing Numeric Values
• Using ASCII, to store 25 need 16 bits, largest number is 99
• Binary notation: Uses bits to represent a number in base two; 16 bits could represent 0 to 65535
• Limitations of computer representations of numeric values– Overflow – occurs when a value is too big to
be represented– Truncation – occurs when a value cannot be
represented accurately
1-16
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-16
Representing Images
• Bit map techniques– Pixel: short for “picture element”– Black & white picture: 1 for black, 0 for white or 8
bits to record shades of greyness– Colour picture, two approaches:
• RGB – each pixel is 3 colours, record intensity of each colour, need 3 bytes
• Luminance (brightness- the sum of RGB components), red chrominance (difference between luminance and amount of red light in the pixel) and blue chrominance
– can’t rescale• Vector techniques – scalable egTrueType, PostScript
1-17
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-17
Representing Sound• Sampling techniques
– Eg 8000 samples/sec for long distance phone– Used for high quality recordings eg 44,100 samples/sec– Need 16 bits a sample, so each second of music is more
than a million bits– Records actual audio
• MIDI– Used in music synthesizers, video game sound,– Records “musical score” – what instrument is to play
which note and for how long. So a clarinet playing D for 2 seconds can be encoded in 3 bytes rather than over 2 million
1-18
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-18
Figure 1.14 The sound wave represented by the sequence 0, 1.5, 2.0, 1.5, 2.0, 3.0, 4.0, 3.0, 0