Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 2 Main Memory and Backing Store. 2 0100 1000 Memory address (1) Memory is “place’ to store digital signals (0 1)

Similar presentations


Presentation on theme: "CS 2 Main Memory and Backing Store. 2 0100 1000 Memory address (1) Memory is “place’ to store digital signals (0 1)"— Presentation transcript:

1 CS 2 Main Memory and Backing Store

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

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

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

5 5 Memory Size (1) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 WORD?

6 6 Memory Size (2) ONE WOR D Depends on Computer Type Operating systemRequired word size MS DOS8 bits MS Windows 3.116 bits MS Windows 95/98/NT/2000/XP 32 bits Linux32 bits Table of word sizes

7 7 Wikipedia – 64-bit

8 8 1 kilobyte (1KB) = 2 bytes = bytes 1 kilobyte (1KB) = 2 10 bytes =1024 bytes 1 megabyte (1MB) = 2 KB = 2 bytes 1 megabyte (1MB) = 2 10 KB = 2 20 bytes 1 Tbyte (1TB) = 2 GB = 2 bytes 1 Tbyte (1TB) = 2 10 GB = 2 40 bytes Memory Size (3) 1 gigabyte (1GB) = 2 MB = 2 bytes 1 gigabyte (1GB) = 2 10 MB = 2 30 bytes Questions...

9 9 CS 2.2 Exercise

10 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 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 2 n  12KB, 2 13 = 8192 and 2 14 = 16384  n = 14

12 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 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 2 n  20001, and 2 15 = 32768  n = 15

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

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

16 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 17 RAM Too much Swapping –Reduce performance of computer, or –Lead to system crash To reduce Swapping –Increase the size of RAM

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

19 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.. BIOS is an example of ROM..

20 20 RAM vs ROM RAMROM It is volatile, i.e. data stored will disappear if the power supply is turned off. It is non-volatile, i.e. the memory will retain its content even if the power is turned off. Data can be read from it or written into, i.e. Read-write. Data init can be read only and cannot be over written, i.e. Read-only. It is used for temporary storage of running program and working data. It is used for storing permanent system programs such as BIOS.

21 21 yComplementary Metal-Oxide Semiconductor yContents can be changed yNon-volatile yStores configuration about a computer, including xCapacity of the hard disk xTypes of existing ports, keyboard and monitor xCurrent time and date yCMOS does not store programs CMOS

22 22 ySmall amount of high speed memory yDesigned to supply CPU with the most frequently requested data and instruction yFirst locate in cache first, then RAM Cache

23 23 Comparison

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

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

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

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

28 28 Magnetic Disk File Magnetic Disk (2)

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

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

31 31 CD-ROM (3)

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

33 33 Hard Disk

34 34 Hard Disk

35 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 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 37Buffer Disk/ Tape CPU Speed of CPU is MUCH Faster than any Backing Store Buffer is needed.Buffer is needed. Usually is RAM or Cache.Usually is RAM or Cache. Buffer is needed.Buffer is needed. Usually is RAM or Cache.Usually is RAM or Cache.

38 38 Comparison between different backing store Cost (/ MB)Speed Flash memory $2Fast Hard disk$0.004 Compact disc$0.0006 Magnetic tape $0.001 Floppy disk$1.4Slow Expensive Cheap

39 39 Comparison between different backing store Storage capacity Access mode Portable Flash memory???DirectYes Hard diskHighestDirectNo Compact discDirectYes Magnetic tapeSequentia l Yes Floppy diskLowestDirectYes

40 40 Factors affect the performance of computer 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

41 41 CS 2.4 Exercise

42 42 Exercise 2 1.Which of the following are the units of data organisation for a magnetic disk? (1)Cylinder (2)File (3)Record (4)Sector (5)Track

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

44 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 45 Comparison between main memory and backing store Main MemoryBacking Store Function Store processing program and data Store program and data after processing Storage capacityLow (512MB)High (160GB) CostHigh ($0.8-1.2/MB)Low ($0.004/MB) Access modeRandom accessDisk: direct Tape: sequential Access timeFastSlow PerformanceROM: non-volatile RAM: volatile Non-volatile

46 END


Download ppt "CS 2 Main Memory and Backing Store. 2 0100 1000 Memory address (1) Memory is “place’ to store digital signals (0 1)"

Similar presentations


Ads by Google