Data Storage - PowerPoint PPT Presentation

About This Presentation
Title:

Data Storage

Description:

Chapter 3 Data Storage Learning outcomes By the end of this Chapter you will know: The difference between electronic, magnetic and optical memory How data are stored ... – PowerPoint PPT presentation

Number of Views:309
Avg rating:3.0/5.0
Slides: 91
Provided by: lah5
Category:
Tags: data | disc | optical | storage

less

Transcript and Presenter's Notes

Title: Data Storage


1
Chapter 3
  • Data Storage

2
Learning outcomes
  • By the end of this Chapter you will know
  • The difference between electronic, magnetic and
    optical memory
  • How data are stored in these types memories
  • The main memory is made up of logic gates
  • The main memory is organised in terms of cells
    and addresses
  • memory terms
  • Memory capacity, access time, transfer rate, etc
  • How the address decoder works

3
Additional Reading
  • Essential Reading
  • Stalling (2003) Chapters 5 and 6
  • Further Reading
  • Burrell (2004) Chapters 3 and 7
  • Schneider and Gersting (2004) Chapters 4 and 5
  • Tanenbaum (1990) Chapter 3
  • White (2002) Parts 3 and 4.

4
Introduction (1)
  • Information can be stored in different ways
  • Books,
  • Films
  • Paintings,
  • It is not information if it could not used
  • Information in computers must be able to able to
    be processed by computers
  • Information must be represented in appropriate
    format
  • Information must be stored in appropriate places

5
Introduction (2)
  • Breakthrough
  • The use of the binary system (Base 2)
  • In the binary system
  • There is only two types of values, 1s and 0s.
  • It is easy to store binary information/data in
    physical media
  • It is also easy to process binary information
  • Different type of media storage
  • Electronic memory (main memory)
  • Magnetic memory
  • optical memory

6
Media Storage
  • Main memory (Electronic Memory)
  • Stores data currently being used
  • Is made of semiconductor chips.
  • Secondary Memory
  • magnetic (floppy discs, hard disc )
  • Optical (CD-ROM, DVD)

7
Main Memory (Electronic Memory)
  • Main memory stores data which are currently used
    by the CPU.
  • To run a program, it is first loaded in the main
    memory
  • Main Memory is volatile
  • Its content changes frequently
  • Data is lost when the power is off
  • It is also called electronic memory
  • Based on electronic principles.
  • Formed with logic gates
  • Group of transistors
  • Cells
  • Sequence of one-bit memories
  • Addresses
  • Each cell has a unique address

8
The physical principles of electronic memory
  • Transistor
  • The smallest unit of an electronic memory
  • Logic Gates
  • Groups of transistors
  • Flip-Flops
  • Special type of circuit

9
Logic Gates (2)
OR
AND
NOT
10
Logic Gates (3)
NAND
XOR
NOR
  • For more details see
  • Schneider and Gersting (2004 155-177)
  • Burrell (2004 43-62)

11
Flip-Flop circuits
  • Up to now the output of combinational circuits
    depends solely up the input
  • Combinational circuits has no memory
  • To build a sophisticated digital signal circuits,
    memory, we need
  • We need circuits whose output depends upon both
    the input of the circuit and its previous states.
  • In other words, we need circuit that have memory.

12
A Simple Flip-flop Circuit
  • As long as both inputs remain 0 output does
    not change
  • Temporarily placing 1 on upper input gt output
    1
  • Temporarily placing 1 on lower input gt output
    0
  • So output flip-flops between 2 values under
    external control

13
Setting the Output of a Flip-flop to 1
14
Setting the Output of a Flip-flop to 1 (contd)
15
Setting the Output of a Flip-flop to 1 (contd)
16
Controlled Flip-Flop
  • If control 0 the the flip-flop does not change
    the state
  • If control 1, then if D0 then Q 1 else Q 0

17
Clocked SR flip-flop
  • If CP 0 the output of both AND gates is 0.
  • Regardless of the values of S and R.
  • If SRCP1, then both outputs are set to 0

18
Main Memory
  • Large collection of circuits, each capable of
    storing a single bit
  • Arranged in small cells, typically of 8 bits each
    (a.k.a. byte)

19
Arrangement of Memory Cells
  • Each cell has a unique address
  • Longer strings stored by using consecutive cells

value 01101101
  • RAM (random access memory)

20
One-bit Memory
  • To write a datum (0 or 1) to this memory
  • send data to D, and at the same time
  • send a WRITE signal to CP
  • To read a datum from this memory
  • connect to Q by sending a READ signal

21
Main memory linking many flip-flops
See Burrell (2004 111-112) and Tanenbaum (1990
105-109) t
22
Memory cells
n-bit cell
  • In reality, most electronic memories have 8-bit
    cells.

Can hold mn bits
m cells
23
Accessing Data in the Main Memory
  • Instructions and data are stored in the main
    memory in a serial order.
  • CPU executes instructions one by one top down.
  • An instruction may tell the CPU
  • to jump to particular cell and execute the
    instruction held in it,
  • or fetch the data stored is that cell.
  • How is this done?

24
System Bus
  • Main memory and CPU are linked using a set of
    wire
  • Three wires
  • address lines,
  • data lines and
  • control lines.
  • Known as
  • address bus,
  • data bus and
  • control bus.

System bus
25
Main memory
CPU
Add. bus
Data bus
Control bus
26
To read data from each cell
To issue read or write signal
To identify each memory cell
Main memory
CPU
Add. bus
Data bus
Control bus
27
Address Bus
Address Of the cell To activated
Address Of the cell To activated
Main memory
CPU
Address bus
28
Binary Address Representation
  • Each cell has a unique address.
  • I.e. using 4 digit binary representation we
    have
  • 0000 cell 0
  • 0001 cell 1
  • 0010 cell 2
  • 0100 cell 3
  • How many bits are needed to represent an address?

29
Address Decoder
Unique cell Has a unique Address.
Address Of the cell To activated
Main memory
CPU
Decoder
Address bus
30
A Simple Address Decoder
Q0 00 C0
2 ad-lines
A1
Q1 01 C1
22 4 address cells
A0
Q2 10 C2
Q3 11 C3
Decoder is a device between the Main Memory and
the address lines.
31
Decoder with N Address Lines
Main Memory
00000000
a0
00000001
a1
00000010
2n add cell
n add. lines
11111111
an-1
32
Main Memory with 4 Chips
decoder
Main memory
a0 a1. . . . . . . aN-1
Chip 1
Chip 2
Chip 3
Chip 4
33
The higher 2 bits of Address line to select The
chip.
a n-1 a n-2 ....a0 0 0 0.. 0
0 0 1.. 1 0 1 0.. 0 0
1 1.. 1 1 0 0.. 0 1
0 1.. 1 1 1 0.. 0 1
1 1.. 1
Chip 1
Chip 1
Chip 2
Chip 3
Chip 4
34
Multiplexer
  • Cells form rows and columns.
  • Each cell can be identified by a row address and
    column address.
  • Each cells address uses only n/2 address lines.
  • This can be done using a multiplixed addresses.

35
Decoder with 4 Address Lines (non-multiplexed
addresses)
0000 0001 0010 0011
0100 0101 0110 0111
1000 1001 1010 1011
1100 1101 1110 1111
36
Decoder with 2 Address Lines (multiplexed
addresses)
00
01
11
10
0000 0001 0010 0011
0100 0101 0110 0111
1000 1001 1010 1011
1100 1101 1110 1111
00
01
10
11
37
Two-Input Multiplexer
  • A multiplexer is an electronic device that allows
    multiple logical signals to be transmitted
    simultaneously across a single physical channel
    (address line).

38
Example 1
  • Suppose computers Main Memory is linked to a
    decoder with 8 address lines.
  • Can 1000 memory cells be used?
  • If no what is the maximum number of addresses
    that can generated?
  • What is the maximum number of addresses that can
    be generated is multiplexed addresses are used?

39
Answer
  • Suppose computers Main Memory is linked to a
    decoder with 8 address lines.
  • Can 1000 memory cells be used?
  • If no what is the maximum number of addresses
    that can generated?
  • Answer
  • NO
  • With 8 address lines, the maximum number of
    addresses is 28256
  • 228 216

40
Example 2
  • Suppose that a computers Main Memory has 1013
    cells.
  • How many address lines are needed in order for
    all the cells to be useable? Explain your answer.

41
Answer
  • Suppose that a computers Main Memory has 1013
    cells. How many address lines are needed in order
    for all the cells to be useable? Explain your
    answer.
  • Answer
  • With N address lines a computer can have a
    maximum 2N usable cells. 29 512, 210 1024.
  • 9 address lines would not generate enough
    addresses for 1013 cells to be used. 10 address
    lines would.
  • Having more than 10 address lines would lead to
    too many addresses wasted. So the desired number
    of address lines is 10.
  • N ?log2(1050)? can be used to find the number
    of address lines.
  • If multiplexed addresses is used, then 5 address
    lines would be sufficient for 1013 cells to be
    useable.

42
What does a word mean?
  • A word is the length of instructions the CPU can
    execute at one time.
  • Some processor can handle 8-bit words others
    16-bit, 32-bit, 64-bit.
  • A cell does not necessarily store one word.
  • A word can occupy more than one cell.

43
Address Space
  • The address space of a computer is the maximum
    number of cells a computer can hold.
  • The address space is determined by the number of
    address lines used in a computer.
  • If each cell in a memory is 8-bit, then the
    memory is called byte addressable 1 byte long
    has a unique address

44
Features of the Main Memory
  • Memory Capacity.
  • Access of information
  • Access time
  • Transfer rate

45
Memory Capacity
  • Most computers memory have 8-bit (1-byte) cells.
  • In this case we have
  • 32KB, 256MB and 20GB are used to describe the
    memory capacity.

Address lines No of cells Capacity (byte)
n 2n 2n x 1
46
Capacity Units
1kB 210 1024 Byte. 1MB 1024 KB 220 Bytes 1, 048,576 B. 1GB 1024 MB 230 kB1, 073,741,824 Bytes.
47
Access Time
  • Access time is taken between the moment when the
    CPU wants the read/write from/into a cell and
    the moment when the cell is activated.
  • It is the moment that the CPU takes to activate a
    cell.
  • 60ns (10-9 sec)

48
Transfer Rate
  • Is the amount of information per second exchanged
    between the CPU and main memory.
  • If the CPU can read n cells in a second and each
    cell has m bytes then transfer rate is nm
    (bytes/s)
  • Main memory
  • electronic signals
  • Implies fast transfer rate in the scale about
    100MB/sec

49
Random Access
  • If the CPU wants to activate particular cell.
  • It does not search for the target cell from top
    to bottom.
  • It does put the address of the target cell in
    the address line, then the cell will be
    activated.
  • This type of accessing information is called
    Random Access

50
The need for other type of memories.
  • Main memory
  • Fast as all the exchange between CPU and Main
    memory is done electronically.
  • However, it is volatile.
  • Information lost when the machine is turned off.
  • The need for non-volatile memory
  • Hold information when the machine is off.
  • i.e. Magnetic disk, optical disk, magnetic tape

51
Magnetic Memory
  • Another way of storing information in the binary
    framework.
  • Magnetic memory contains a number of spots.
  • The information is stored by magnetising and
    demagnetising these spots.
  • Magnetised spot 1
  • unmagnetised spot 0
  • i.e. floppy disk

52
A Magnetic Disk Storage System
  • Each track contains same number of sectors
  • Location of tracks and sectors not permanent
    (formatting)
  • Examples hard disks, floppy disks, ...

53
Magnetic Disk Terminology
  • Platter
  • rigid metal or glass platter Coated with magnetic
    material.
  • rotating at constant angular velocity
  • Arm
  • With movable magnetic read/write heads
  • Track
  • A complete ring of data
  • The disk surface is divided into tracks
  • Sectors
  • Each track is subdivided into sectors
  • Cylinder (see slides 71-72)
  • A vertical collection of tracks at the same
    radial position

54
Data Organization and Formatting
  • Concentric rings or tracks
  • Gaps between tracks
  • Reduce gap to increase capacity
  • Same number of bits per track (variable packing
    density)
  • Constant angular velocity
  • Tracks divided into sectors
  • Minimum block size is one sector
  • May have more than one sector per block
  • See Stalling (2003) pages167-168

55
Disk Data Layout
spots
sector
56
Magnetic Disks
57
Magnetic Disks
Thus as the platter rotates under the head, a
stream of bits can be written and later read
back.
58
Read/write Head
  • A coil of wire wound onto an iron former.
  • gap.
  • If a spot on the magnetic memory passes under the
    gap then an electrical current is induced in the
    coil. And the read/write head will know that
    there is a 1 stored on that spot. Otherwise it
    is 0.
  • By passing an electric current on the wire we
    can magnetise and demagnetise spots.

Coil of wire
Iron former
59
Read and Write Mechanism (1)
  • Recording and retrieval via conductive coil
    called a head
  • May be single read/write head or separate ones
  • During read/write, head is stationary, platter
    rotates
  • Write
  • Electric Current through coil of wire produces
    magnetic field
  • Magnetic Pulses sent to the head
  • Magnetic pattern recorded on surface below
  • Read
  • Magnetised bit pattern
  • Magnetic field induces an electrical current in
    the coil
  • The bit pattern contains 1
  • Demagnetised bit pattern
  • No Magnetic field induced, hence, no electrical
    current in the coil
  • The bit pattern contains 0

60
Read and Write Mechanism (2)
1
01010
01010
1
1
61
Fixed/Movable Head Disk
  • Fixed head
  • One read/write head per track
  • Heads mounted on fixed ridged arm
  • Movable head
  • One read/write head per side
  • Mounted on a movable arm

62
Access Information on a Floppy disk
  • To access information on a floppy
  • Track number, and
  • Sector number.
  • Head moves to the target track.
  • waits for the desired sector to spin underneath
    it
  • read/write begins.

63
Seek time and average seek time
  • Seek time
  • is the time it takes, the read/write head to
    move from one track to a particular track on a
    disk
  • Average seek time
  • is the average of seek time between every pair
    of tracks.

64
Example
  • A disk has 5 tracks and the read/write head takes
    1ms to move from a track to an adjacent one
  • 1-21ms, 1-32ms, 1-43ms, 1-54ms,
    2-31ms, 2-42ms, 2-53ms, 3-41ms,
    3-52ms, 4-51ms
  • Average seek time 20/10 2ms.

65
Average latency
  • Average latency
  • is the time taken to make half a revolution.
  • Example
  • Disk rotates at a speed of 100 rev/sec
  • Average latency is 1 / 200 sec.

66
Maximum data transfer rate
  • It is the rate at which data passes under the
    read/write head (bytes/sec).
  • Number of bytes / track Number of rev / sec

67
Constant Angulair Velocity (CAV)
Variable density
68
Multiple Platter (hard disk)
  • Permanent storage that is inside of the computer,
    and NOT portable.
  • Consists of several platters which spin very fast
  • Heads are joined and aligned
  • Aligned tracks on each platter form cylinders
  • Data is striped by cylinder
  • reduces head movement
  • Increases speed (transfer rate)

69
Multiple Platters (2)
  • Disk platters speed (3600 to 10 000 rpm
    (rev/min).
  • floppy (360rpm).
  • The read data we need to specify cylinder, head,
    and sector numbers.
  • Each cylinder represents a track number.

70
Cylinders
71
Magnetic Tape (1)
  • Serial access
  • Slow
  • Very cheap
  • High capacity
  • Backup

72
Magnetic tape (2)
  • Serial access (slow)
  • Good choice for off-line data storage (archives)

73
Magnetic Tape
column
R/W head
Blocks of data
Track 1
Track 2
Track 9
A magnetic tape is a series of columns. Each
column can store a word or two. Tapes offer a
large storage capacity for backup. See Stalling
(2003) pages189-190.
74
Features of Magnetic Memory
  • Memory capacity
  • Floppy can hold 700KB 120MB.
  • Hard disk can hold dozen of GB, 10, 20,..
  • Tapes can hold 100MB- 80GB.
  • Access method
  • Floppy and hard disks is random as the main
    memory
  • Tape is serial
  • Access time
  • It is the average time taken to position the R/W
    head over the data to be read
  • For disk drives is about 10-3 sec when in MM 10-9
    sec.
  • Transfer rate is slower. It is the transfer of
    data between MM and Mag/M. Floppy (500kB-2MB)
    and hard disc (4-12MB).

75
Optical Storage CD-ROM
  • Originally for audio
  • 650 Mbytes giving over 70 minutes audio
  • Polycarbonate coated with highly reflective coat,
    usually aluminium
  • Data stored as pits
  • Read by reflecting laser
  • Constant packing density (data/surface constant)
  • More data in outer edges
  • Less data towards the centre of the disc
  • Constant linear velocity
  • The drive must adjust the disc speed (495 to 212
    rev/m) ?edges
  • Faster when reading data closer to the centre
  • Slower when reading data in outer edges

76
CD-ROMs
In recent years, optical (as opposed to magnetic)
disks have become available. They have much
higher recording densities than conventional
magnetic disks. Optical disks were originally
developed for recording television programs, but
they can be put to more esthetic use as computer
storage devices. Due to their potentially
enormous capacity, optical disks have been the
subject of a great deal of research and have gone
through an incredibly rapid evolution.
77
(No Transcript)
78
Optical Storage CD-ROM
  • Is a disc with highly reflective surface.
  • Tiny areas flat and depressed
  • Flat (land) ? strong reflection.
  • Depressed (pits) ? low reflection.
  • Laser ? land?strong reflection?photo-sensor
    generates electrical voltage?store 1s.
  • Laser (light Amplification stimulated emission
    of radiation).
  • Light?pits?low reflection? no electrical voltage
    ? stores 0s.

79
CD-ROM Operation
80
Laser
  • Monochromatic light (single wave length)
  • Coherent (photons move in the same direction)
  • Directional (very tight beam, strong
    concentrated)

81
CD/DVD Storage Format
  • Data stored by creating variations in the
    reflective surface
  • Data retrieved by means of a laser beam
  • Data stored uniformly (so CD rotation speed
    varies)
  • Random access much slower than for magnetic
    disks

82
The pits and lands are written in a single
continuous spiral starting near the hole and
working out a distance of 32 mm toward the edge.
The spiral makes 22,188 revolutions around the
disk (about 600 per mm). If unwound, it would be
5.6 km long.  
83
Constant linear velocity
sector
Constante density
centre
84
Random Access on CD-ROM
  • Difficult
  • Move head to the right position
  • Set correct speed
  • Read address
  • Adjust to required location

85
Read and Write Mechanism (1)
1
01010
01010
1
1
86
CD-ROM for against
  • Large capacity
  • Easy to mass produce
  • Removable
  • Expensive for small runs
  • Slow
  • Read only

87
Other Optical Storage
  • CD-Recordable (CD-R)
  • WORM(write once read many)
  • Compatible with CD-ROM drives
  • CD-RW
  • Erasable
  • Mostly CD-ROM drive compatible

88
DVD - whats in a name?
  • Digital Video Disk
  • Used to indicate a player for movies
  • Only plays video disks
  • Digital Versatile Disk
  • Used to indicate a computer drive
  • Will read computer disks and play video disks

89
DVD - technology
  • Multi-layer
  • Very high capacity (4.7GB per layer)
  • Full length movie on a single disk
  • Using MPEG (Moving Picture Expert Group)
    compression
  • Digital Compression of audio and video signals.
  • MPEG achieves high compression rate by storing
    only changes from one frame to another, instead
    of each entire frame.

90
Summary
  • Main memory
  • RAM
  • Low storage capacity
  • Fast (electrical signals)
  • Volatile.
  • Magnetic memory
  • Floppy disk
  • Hard disk
  • Magnetic tape
  • Optical memory
  • CD_ROM disk
  • DVD
Write a Comment
User Comments (0)
About PowerShow.com