1 / 51

Computer architecture

Computer architecture. Lecture 9: Main memory. External memory Piotr Bilski. 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. control. Data input. Read.

kalin
Download Presentation

Computer architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 control Data input Read select select cell 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

  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 RAS CAS WE OE Timing and control Control counter Row decoder Memory matrix Row address buffer A0 A1 An Column address buffer D0 Restoring circuits Data buffers Column decoder Dm

  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 transistor capacitor Bit line

  10. DRAM chip example Vss Vcc D1 D2 D4 D3 CAS WE RAS OE NC A9 A4 A10 A0 ....... A3 Vss Vcc

  11. SRAM cell scheme power T4 T3 T5 T6 T1 T2 Bit line (neg) Bit line Address line

  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 0 1 0

  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 f data (M bits) code (K bits) M + K bits data (M bits) code (K bits) f COMPARISON correction

  17. Hamming correction code 0 0 1 0 1 1 0 Parity bits Word bits 4-bit word

  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: 2k – 1  M + K

  19. Example of the correction code: 8-bit word (cont.) 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

  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 1 .... ID field Data field gap gap gap ID field: Sector number Head number Track number BS CRC 1 2 1 1 2 Data field: Data CRC BS 1 512 2

  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 • 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 15000 rev/min for HDD and 600 rev/min for FDD)

  31. Transfer time • Ts– 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 Random location Sequential location of data Ts = 4 ms Tr = 4 ms To = 0,016 ms (1 sec.) Overall: 8,016 ms Ts = 4 ms Tr = 4 ms To = 8 ms (500 sec.) Overall: 16 ms Tt = 2500  8,016 ms = 20,04 s Tt = 16 ms + 4  12 ms = 64 ms

  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 Logical disk disk 1 disk 2 disk 3 stripe 0 stripe 0 stripe 1 stripe 2 stripe 1 stripe 5 stripe 3 stripe 4 stripe 2 stripe 8 stripe 6 stripe 7 stripe 3 stripe 9 stripe10 stripe 11 stripe 4 stripe 5 stripe 6 Table management

  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 0 stripe 1 stripe 1 stripe 2 stripe 3 stripe 2 stripe 3 stripe 4 stripe 5 stripe 4 stripe 5 stripe 6 stripe 7 stripe 6 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 b2 P(b) b0 b1 P(b) = b0 b1  b2

  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

More Related