Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer architecture Lecture 9: Main memory. External memory Piotr Bilski.

Similar presentations

Presentation on theme: "Computer architecture Lecture 9: Main memory. External memory Piotr Bilski."— Presentation transcript:

1 Computer architecture Lecture 9: Main memory. External memory Piotr Bilski

2 Modern main memory Basic element – memory cell Cells are grouped into words Cells are capable of representing binary numbers (two states only) Read and/or write possible control select Data input cell control select Read cell

3 Semiconductor memory types Random access memory (RAM) –Dynamic (DRAM) –Static (SRAM) Read-Only Memory (ROM) –Programmable (PROM) –Erasable (EPROM) –Flash ROM –Electrically Erasable (EEPROM)

4 Memory characteristics TypeCategoryErasable?WriteVolatile? RAMRead/writeElectricallyelectr.Yes ROMReadNoMaskNo PROMReadNoelectr.No EPROMRead most.UVelectr.No FlashRead most.Electricallyelectr.No EEPROMRead most.Electricallyelectr.No

5 Logical memory organization How many cells have the same address? Their number is determined by the logical organization of the computer data unit – word length For instance: 16 Mb  1M  16 b  0,5 M  32 b

6 DRAM memory Charge stored in the capacitor is one – its absence is zero Reading causes erasing cell content capacitor discharges with time, its content must be cyclically restored

7 DRAM module organization Timing and control Row address buffer Column address buffer Control counter Row decoder Restoring circuits Column decoder Memory matrix Data buffers RAS CAS WE OE A0A1AnA0A1An D0D0 DmDm

8 Example of DRAM module organization Memory of 16 Mb Logical organization: 4M  4b (4 modules of 2048  2048 size) To address every row and column in the module, 11 lines are required

9 DRAM cell scheme Address line Bit line capacitor transistor

10 DRAM chip example Vcc WE RAS NC Vcc A A 3 A 10 D1 D2 Vss D4 D3 CAS OE A9A4A9A4

11 SRAM cell scheme power Bit line Bit line (neg) Address line T1T1 T2T2 T4T4 T3T3 T5T5 T6T6

12 ROM memory Deploying program to memory expensive, production only of large quantities Applications: system programs (BIOS), function tables, library subroutines

13 ROM programming One time only, in production site (PROM) Read-mostly memory: –EPROM – before writing all content erased –EEPROM – before writing only requested bytes erased –flash – before writing byte blocks erased

14 ROM cell scheme Column lines Row lines

15 Error correction During memory work time errors may occur: –permanent – cell hardware failure –intermittent (random) – soft error A code based on the word content must be created to indicate error occurrence

16 Error correction scheme data (M bits) code (K bits) M + K bits data (M bits) f code (K bits) f COMPARISON correction

17 Hamming correction code 4-bit word Parity bits Word bits

18 Example of the correction code: 8-bit word Result of the code comparison is called the word-syndrome Zero in the syndrome means no-error on this position Number of the code bits is determined as: 2 k – 1  M + K

19 Example of the correction code: 8-bit word (cont.) Bit position Position number Data bit Control bit 4321 C1 = D1  D2  D4  D5  D7 C2 = D1  D3  D4  D6  D7 C3 = D2  D3  D4  D8 C4 = D5  D6  D7  D8

20 Correction codes and word length Word length Correction of 1 error Detection of 2 errors

21 RAM examples FP RAM (Fast Page RAM) EDO RAM (Extended Data Output RAM) SDRAM (Synchronous DRAM) DDR DRAM (Double Data Rate DRAM) DDR2 DRAM DDR3 DRAM RDRAM (Rambus DRAM) CDRAM (Cache DRAM)

22 External memory examples Magnetic disks – hard disks, floppy disks –IDE (PATA) –SATA (Serial ATA) Magnetic disks – tape write Optical disks –CD-ROM –DVD-ROM –CD-R, CD-RW –DVD-R, DVD-RW

23 Magnetic disk Over the magnetic material there is the conducting coil – head moves along the disk radius One-zero writing is possible by changing direction of the current flow through the coil Reading uses induction phenomenon

24 Data localization on the disk sectors track

25 Density of the data written on the disk Constant angular velocity (CAV) –All sectors contain the same amount of data –Easy access to the subsequent fragments of the disk Multi-zone write –disk is divided into zones –In the zone, density of the data is constant –Addressing more challenging

26 Format of the hard drive data track sector 0 sector gap ID field gap Data field gap ID field: BS Track number Head number Sector number CRC Data field: BS Data CRC

27 Multi-platter disks There are many platters placed on the concentric spindle There is the head over every platter All heads move in the same way

28 Cylinders All tracks residing in the same location on all platters

29 Hard disk parameters Parameter Maxtor Diamond Max 10 Seagate Barracuda 180 Seagate Cheetah X15-36LP Toshiba HDD1242 IBM Micro drive Capacity [GB]200181,636,751 Speed rev/min Avg. search time9,4 ms7,4 ms3,6 ms15 ms12 ms Avg. rotational latency [ms] 4,24,1727,148,33 transfer [MB/s] ,3 Bytes per sector512 Search time – time of the head positioning Rotational latency – time required to get to the sector Access time – sum of the above Transfer time – time required to send the data

30 Access time Consists of the initialization time and time of going through the tracks on the way. Depends on the disk size (currently typical diameter is 9 cm) Search time Rotational latency Depends on the number of revolutions per minute (from 3600 to rev/min for HDD and 600 rev/min for FDD)

31 Transfer time T s – average search time r – rotational speed b – number of the transferred bytes N – number of the bytes on the track

32 Problem of locating the data on the disk Sequential location of data T s = 4 ms T r = 4 ms T o = 8 ms (500 sec.) Overall: 16 ms Random location T s = 4 ms T r = 4 ms T o = 0,016 ms (1 sec.) Overall: 8,016 ms T t = 16 ms + 4  12 ms = 64 ms T t = 2500  8,016 ms = 20,04 s

33 RAID Redundant Array of Independent (Inexpensive) Disks Technique of using multiple disks to parallel reading and increasing effectiveness of the external memory Seven levels were proposed, differing by the way of the disk usage Data stored in stripes

34 RAID 0 No data redundancy Transfer speed optimal for small stripes application: systems of high efficiency and non-critical data

35 RAID 0 scheme disk 1 disk 2 disk 3 stripe 0 stripe 1 stripe 9 stripe 3 stripe 4 stripe 5 stripe 6 stripe 7 stripe 8 stripe 2 stripe 10 stripe 11 Logical disk Table management stripe 0 stripe 1 stripe 2 stripe 3 stripe 4 stripe 5 stripe 6

36 RAID 1 Redundancy is the mirror mapping of the data between the disks data transfer speed depends on the slowest drive application: servers, storing and processing of the critical files Low risk of data loss Main disadvantage: high cost

37 RAID 1 scheme disk 1 dysk 2 dysk 3 dysk 4 stripe 0 stripe 1 stripe 6 stripe 2 stripe 3 stripe 4 stripe 5 stripe 7 stripe 0 stripe 1 stripe 6 stripe 2 stripe 3 stripe 4 stripe 5 stripe 7

38 RAID 2 i 3 both techniques use method of the parallel access (head synchronization) stripes have small size (byte or word) in RAID 2 number of the redundant disks = log(number of the data disks) RAID 2 is useful only when multiple disk errors occur

39 RAID 3 Only one redundant disk Error correction uses parity bit for the group of bits on the same position on all disks After error detection information is restored from the subsequent disks High transfer rates

40 RAID 3 scheme disk 1 disk 2 disk 3 disk 4 b0b0 b1b1 b2b2 P(b) P(b) = b 0  b 1  b 2

41 RAID 4, 5 i 6 Use independent access method (every disk works independently) Large stripes Information on the error correction in calculated on the data blocks In RAID 4 there is one redundant disk storing information on the error correction

42 Optical memory CD – primarily used for the audio applications CD-ROM – equivalent to the CD, used as the computer data disk CD-R – one-time writable compact disk CD-RW – multiple times writable compact disk DVD –optical disk used mainly to the audio-video applications (one or two sides) DVD-R – one-time wrtiable DVD disk DVD-RW – multiple times writable DVD disk future – Blue Ray/HD-DVD?

43 Compact disks Difference between CD and CD-ROM is in the error correction Production of CD requires high-power laser, creating pits in the light-reflecting layer The written information is covered with the silver or golden layer and protection layer Data on the compact disk are located on one spiral track going from the center of the disk

44 CD scheme

45 Compact disks (cont.) Reading data from disk is possible thanks to the medium-power laser Reading speed increased from 150 KB/s (audio standard ) to 8,4 MB/s (x56 drives) Space between the scrolls of the spiral is 1,6  m minimal space between pits on a spiral is 0,824  m

46 CD-ROM block format SYNC – synchronization (identyfication of the beginning of the block) ID – head ECC – correction code

47 Writable compact disks Writing to the CD-R is possible using medium power laser targeted at the coloured layer Extensions of the CD-R standard allowed to obtain a better capacity – from 650 MB to 870 MB Writing to the CD-RW is possible through the phase change phenomenon

48 Color books Red book – physical characteristics of the CD-DA, method of the digital voice coding Yellow book – CD-ROM characteristics CD-ROM XA – extension of the yellow book, describing VideoCD i Playstation formats Green book - describes CD-I format Orange book – contains specs of the writable CD (CD-R, CD-MO, CD-RW) White book – describes VideoCD specification with extensions (Karaoke CD, VCD, SVCD) Blue book – defines Enhanced Music CD format (CD Extra) CD Graphics – extension of the red book describing representation of the graphical data and text

49 DVD disks DVD – Digital Versatile Disc Reading using red laser (wave length 650 nm) maximum capacity of the two-layer, two- sided disk is 17 GB DVD has greater data compression than CD – space between the spiral scrolls is 0,74  m; space between the dents is 0,4  m DVDs can have second layer reflecting light under the first one, which allows to double the disk capacity

50 Writable DVD DVD-R – one-time writable, only one-sided and one-layered, capacity of 4,7 GB DVD-RW – multiple times writable, also one-sided and one-layered Multiple writing standards (R+/-, RW+/-, DVD-RAM), problem of the uniform standards

51 Reading from DVD

Download ppt "Computer architecture Lecture 9: Main memory. External memory Piotr Bilski."

Similar presentations

Ads by Google