1 / 46

CS 2 Main Memory and Backing Store

CS 2 Main Memory and Backing Store. Memory address (1). Memory is “place’ to store digital signals (0 1). 0100 1000. Memory address (2). 0100 1000. 0111 1100. 0110 1010. …. …. 0000 1010. Memory can allowed Read / Write. Memory. Address = location. 0000 0000. 0000 0001. 0000 0010.

maxine
Télécharger la présentation

CS 2 Main Memory and Backing Store

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. CS 2 Main Memory and Backing Store

  2. Memory address (1) Memory is “place’ to store digital signals (0 1) 0100 1000

  3. Memory address (2) 0100 1000 0111 1100 0110 1010 …. …... 0000 1010 Memory can allowed Read / Write Memory Address = location 0000 0000 0000 0001 0000 0010 To R/W data, you must know where it is? 1111 1111

  4. Memory address (3) 2 Address line.. What is the MEORY SIZE? 0 0 1 0000 0000 4 0 1 0000 0001 2 0000 0010 1 0 3 …. …. 1 1 ?? 1111 1111 How about 3 Address line?

  5. Memory Size (1) 0 1 BIT 0 0 0 0 0 0 0 0 WORD? 8 BITs 1 BYTE =

  6. Memory Size (2) ONE WORD Depends on Computer Type Table of word sizes

  7. Wikipedia – 64-bit

  8. Memory Size (3) 1 kilobyte (1KB) = 210bytes =1024bytes 1 megabyte (1MB) = 210 KB = 220bytes 1 gigabyte (1GB) = 210 MB = 230bytes 1 Tbyte (1TB) = 210 GB = 240bytes Questions ...

  9. CS 2.2 Exercise

  10. Exercise 1 1. How many bits are there in 1 Mbytes? Soln: 1Mbytes = 1 x 1024 x 1024 bytes = 1048576 x 8 bits = 8388608 bits

  11. Exercise 1 2. A Computer has 4K words of main storage. Each word comprises 24 bits. How many bytes are there in the whole memory? How address lines are required? Soln: # of bytes in whole memory = 4K x 3 bytes  12 KB # of address lines required: Since 2n  12KB , 213 = 8192 and 214 = 16384  n = 14

  12. Exercise 1 3. A 40 Mbytes memory chip is _______ times a 512 Kbytes chip. Soln: 40MB  512 KB = 40 x 1024 KB  512 KB = 80  A 40 Mbytes memory chip is 80 times a 512 Kbytes chip.

  13. Exercise 1 4. If the addresses of the locations of a computer are from 0 to 20000, how many address bits are required for addresssing? Soln: # of address lines required: Since 2n  20001, and 215 = 32768  n = 15

  14. Storage ─ stores programs and data Storage Unit Main Memory Backing Store Store large amounts of data, programs and information permanentlyeven when the computer is turned off. Random Access Memory (RAM) Read Only Memory (ROM)

  15. RAM Random Access Memory (RAM) ─ temporarily stores programs and data that are to be executed or processed by the CPU Any area of RAM can be accessed directly and immediately by the CPU.

  16. RAM • Virtual memory • Part of the Hard disk for extending RAM • Capacity of RAM is fixed • Data not frequently used are moved to the hard disk to make room for new data • Swapping • Moving data between RAM and Hard disk • Done by the computer automatically • Transparent to user

  17. RAM • Too much Swapping • Reduce performance of computer, or • Lead to system crash • To reduce Swapping • Increase the size of RAM

  18. ROM Read-Only Memory (ROM) - stores the essential software of the computer system. ‘Read-only’ means ROM can be read but not changed.

  19. ROM The contents of ROM are preset by the ROM manufacturer, and can’t be changed by users. BIOS is an example of ROM..

  20. RAM vs ROM

  21. CMOS • Complementary Metal-Oxide Semiconductor • Contents can be changed • Non-volatile • Stores configuration about a computer, including • Capacity of the hard disk • Types of existing ports, keyboard and monitor • Current time and date • CMOS does not store programs

  22. Cache • Small amount of high speed memory • Designed to supply CPU with the most frequently requested data and instruction • First locate in cache first, then RAM

  23. Comparison

  24. Backing Store Why should we have secondary storage? • Large storage capacity • Permanent storage • Lower cost Secondary storage provides permanent storage for large amounts of programs and data that need not be immediately accessed by the CPU.

  25. Magnetic Tape (1) Magnetic Tape • used for backup data in computers • sequential access

  26. Magnetic Tape (2) File store on magnetic tape Tape File consists on Header, Data blocks and Inter Blocks Gap (IBG) SLOWER! Sequential Access To retrieve a record, you must read all record first.

  27. Magnetic Disk (1) Magnetic Disk Hard disk drive Floppy disk Removable hard disk

  28. Magnetic Disk (2) Magnetic Disk File

  29. CD-ROM (1) Optical Disk Drive CD Writer CD-ROM Drive It can be used to read data from and write data to optical disks such as CD-R and CD-RW. Compact disk read-only memory Direct access (fast) Data is read-only.

  30. CD-ROM (2) Information is stored by using a laser beam to burn holes on a thin coating of metal. Optical Disk Usage Encyclopedias Another laser beam is used to read the hole patterns. Film (VCD)

  31. CD-ROM (3)

  32. DVD • Digital Versatile Disk • DVDR, DVDRW, DVD-RAM • 4.7GB storage • DL (Dual / Double Layer) • 8.5GB storage

  33. Hard Disk

  34. Hard Disk

  35. Semi-conducting Media(Flash memory cards) • Uses semi-conductor to record data. • High speed in transferring data, small in size, portable and no mechanical movement. • Becomes popular. • E.g.: CF, MS, SD, MMC, xD, T-flash, etc. Web site of SanDisk

  36. Removable Disks • Provide both the storage capacity and fact access time of hard disk and the probability of floppy disks. • Examples: • Iomega’s ZIP (100MB) • JAZ (1-2 GB) • Imation’s Superdisk (120MB)

  37. Buffer Disk/ Tape CPU • Buffer is needed. • Usually is RAM or Cache. Speed of CPU is MUCH Faster than any Backing Store

  38. Comparison between different backing store Expensive Cheap

  39. Comparison between different backing store

  40. Speed of CPU Capacity of RAM Speed of hard disk Free space of hard disk Width of bus system Speed of peripherals Capability of Video cards Cache memory Factors affect the performance of computer

  41. CS 2.4 Exercise

  42. Exercise 2 • Which of the following are the units of data organisation for a magnetic disk? • Cylinder • File • Record • Sector • Track

  43. Exercise 2 2. Which of the following storage media is non-erasable? • Random access memory • Magnetic tape • Hard disk • Read only memory • Floppy disk

  44. Exercise 2 3. A secondary storage device is used because (1) it provides non-volatile storage; (2) it can store a large amount of data; (3) it runs at a great speed.

  45. Comparison between main memory and backing store

  46. END

More Related