Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Data Storage 22/02/2019 CIS110.

Similar presentations


Presentation on theme: "Chapter 3 Data Storage 22/02/2019 CIS110."— Presentation transcript:

1 Chapter 3 Data Storage 22/02/2019 CIS110

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 22/02/2019 CIS110

3 Additional Reading Essential Reading Further 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. 22/02/2019 CIS110

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 22/02/2019 CIS110

5 Introduction (2) Breakthrough: Different type of media storage
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 22/02/2019 CIS110

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

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 22/02/2019 CIS110

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 22/02/2019 CIS110

9 Logic Gates (2) AND OR NOT ¬ a. a b a.b 0 0 0 0 1 0 1 0 0 1 1 1 a 0 1
a ¬ a. 0 1 1 0 a b a.b 22/02/2019 CIS110

10 Logic Gates (3) NAND NOR XOR For more details see
a b a.b a b a.b a b a.b For more details see Schneider and Gersting (2004: ) Burrell (2004: 43-62) 22/02/2019 CIS110

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. 22/02/2019 CIS110

12 A Simple Flip-flop Circuit
As long as both inputs remain 0: output does not change Temporarily placing 1 on upper input => output = 1 Temporarily placing 1 on lower input => output = 0 So: output flip-flops between 2 values under external control 22/02/2019 CIS110

13 Setting the Output of a Flip-flop to 1
22/02/2019 CIS110

14 Setting the Output of a Flip-flop to 1 (cont’d)
22/02/2019 CIS110

15 Setting the Output of a Flip-flop to 1 (cont’d)
22/02/2019 CIS110

16 Controlled Flip-Flop If control = 0 the the flip-flop does not change the state If control = 1, then if D=0 then Q =1 else Q = 0 22/02/2019 CIS110

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 S=R=CP=1, then both outputs are set to 0 22/02/2019 CIS110

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) 22/02/2019 CIS110

19 Arrangement of Memory Cells
Each cell has a unique address Longer strings stored by using consecutive cells value = RAM (random access memory) 22/02/2019 CIS110

20 Q One-bit Memory CP 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 22/02/2019 CIS110

21 Main memory = linking many flip-flops
See Burrell (2004: ) and Tanenbaum (1990: ) t 22/02/2019 CIS110

22 Memory cells n-bit cell Can hold m*n bits m cells
In reality, most electronic memories have 8-bit cells. Can hold m*n bits m cells 22/02/2019 CIS110

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? 22/02/2019 CIS110

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 22/02/2019 CIS110

25 Main memory CPU Add. bus Data bus Control bus 22/02/2019 CIS110

26 To identify each memory
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 22/02/2019 CIS110

27 Address Bus Address Address Of the cell Of the cell To activated Main
memory CPU Address bus 22/02/2019 CIS110

28 Binary Address Representation
Each cell has a unique address. I.e. using 4 digit binary representation we have: cell 0 cell 1 cell 2 cell 3 How many bits are needed to represent an address? 22/02/2019 CIS110

29 Address Decoder Unique cell Has a unique Address. Address Of the cell
To activated Main memory CPU Decoder Address bus 22/02/2019 CIS110

30 A Simple Address Decoder
Q C0 2 ad-lines A1 Q C1 22 = 4 address cells A0 Q C2 Q C3 Decoder is a device between the Main Memory and the address lines. 22/02/2019 CIS110

31 Decoder with N Address Lines
Main Memory 0000…0000 a0 a1 0000…0001 0000…0010 2n add cell n add. lines 1111…1111 an-1 22/02/2019 CIS110

32 Main Memory with 4 Chips a0 a1. . aN-1 decoder Main memory Chip 1
22/02/2019 CIS110

33 0 0 0………….. 0 0 0 1………….. 1 Chip 1 0 1 0………….. 0 Chip 1 0 1 1………….. 1
The higher 2 bits of Address line to select The chip. a n a n-2 …..………..a0 ………….. 0 ………….. 1 ………….. 0 ………….. 1 ………….. 0 ………….. 1 ………….. 0 ………….. 1 Chip 1 Chip 1 Chip 2 Chip 3 Chip 4 22/02/2019 CIS110

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. 22/02/2019 CIS110

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 22/02/2019 CIS110

36 Decoder with 2 Address Lines (multiplexed addresses)
00 01 10 11 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 00 01 10 11 22/02/2019 CIS110

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). 22/02/2019 CIS110

38 Example 1 Suppose computer’s 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? 22/02/2019 CIS110

39 Answer Suppose computer’s 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 28=256 22*8 = 216 22/02/2019 CIS110

40 Example 2 Suppose that a computer’s Main Memory has 1013 cells.
How many address lines are needed in order for all the cells to be useable? Explain your answer. 22/02/2019 CIS110

41 Answer Suppose that a computer’s 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 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. 22/02/2019 CIS110

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. 22/02/2019 CIS110

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 22/02/2019 CIS110

44 Features of the Main Memory
Memory Capacity. Access of information Access time Transfer rate 22/02/2019 CIS110

45 Memory Capacity Most computer’s 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 22/02/2019 CIS110

46 Capacity Units 1kB = 210 = 1024 Byte.
1MB =1024 KB = 220 Bytes= 1, 048,576 B. 1GB =1024 MB = 230 kB=1, 073,741,824 Bytes. 22/02/2019 CIS110

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) 22/02/2019 CIS110

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 n*m (bytes/s) Main memory electronic signals Implies fast transfer rate in the scale about 100MB/sec 22/02/2019 CIS110

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 22/02/2019 CIS110

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 22/02/2019 CIS110

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 22/02/2019 CIS110

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, ... 22/02/2019 CIS110

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 22/02/2019 CIS110

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) pages: 22/02/2019 CIS110

55 Disk Data Layout spots sector 22/02/2019 CIS110

56 Magnetic Disks 22/02/2019 CIS110

57 Magnetic Disks Thus as the platter rotates under the head, a stream of bits can be written and later read back. 22/02/2019 CIS110

58 Read/write Head Coil of wire 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 22/02/2019 CIS110

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 22/02/2019 CIS110

60 Read and Write Mechanism (2)
Add. bus Data bus Control bus CPU 1 01010 01010 1 1 22/02/2019 CIS110

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 22/02/2019 CIS110

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. 22/02/2019 CIS110

63 Seek time and average 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. 22/02/2019 CIS110

64 Example A disk has 5 tracks and the read/write head takes 1ms to move from a track to an adjacent one 1-2:1ms, 1-3:2ms, 1-4:3ms, 1-5:4ms, :1ms, 2-4:2ms, 2-5:3ms, 3-4:1ms, :2ms, 4-5:1ms Average seek time: 20/10= 2ms. 22/02/2019 CIS110

65 Average latency Average latency : Example:
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. 22/02/2019 CIS110

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 22/02/2019 CIS110

67 Constant Angulair Velocity (CAV)
Variable density 22/02/2019 CIS110

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) 22/02/2019 CIS110

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

70 Cylinders 22/02/2019 CIS110

71 Magnetic Tape (1) Serial access Slow Very cheap High capacity Backup
22/02/2019 CIS110

72 Magnetic tape (2) Serial access (slow)
Good choice for off-line data storage (archives) 22/02/2019 CIS110

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) pages: 22/02/2019 CIS110

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). 22/02/2019 CIS110

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 22/02/2019 CIS110

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. 22/02/2019 CIS110

77 22/02/2019 CIS110

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. 22/02/2019 CIS110

79 CD-ROM Operation 22/02/2019 CIS110

80 Laser 22/02/2019 CIS110 Monochromatic light (single wave length)
Coherent (photons move in the same direction) Directional (very tight beam, strong concentrated) 22/02/2019 CIS110

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 22/02/2019 CIS110

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.   22/02/2019 CIS110

83 Constant linear velocity
sector Constante density edges rev/m centre 22/02/2019 CIS110

84 Random Access on CD-ROM
Difficult Move head to the right position Set correct speed Read address Adjust to required location 22/02/2019 CIS110

85 Read and Write Mechanism (1)
head Read and Write Mechanism (1) 1 Add. bus Data bus Control bus CPU Head 01010 01010 1 1 22/02/2019 CIS110

86 CD-ROM for & against Large capacity Easy to mass produce Removable
Expensive for small runs Slow Read only 22/02/2019 CIS110

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

88 DVD - what’s in a name? Digital Video Disk Digital Versatile 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 22/02/2019 CIS110

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. 22/02/2019 CIS110

90 Summary Main memory Magnetic memory Optical memory RAM
Low storage capacity Fast (electrical signals) Volatile. Magnetic memory Floppy disk Hard disk Magnetic tape Optical memory CD_ROM disk DVD 22/02/2019 CIS110


Download ppt "Chapter 3 Data Storage 22/02/2019 CIS110."

Similar presentations


Ads by Google