Main Memory & Backing Store Main memory backing storage devices 1
Introduction computers store programs & data in two different ways: nmain memory ntemporarily stores programs & data that are being processed nbacking store, also secondary storage nstores programs & data when they are not being used 2
Main Memory n a series of storage locations, each has a unique address n the address is called memory address n the main memory is connected to CPU by buses n when the CPU wants to access a particular memory location, it sends the address to the memory on an address bus n the data held in that location are returned to the CPU on the data bus 3
How are data stored in the main memory? n programs & data are made up of characters n they are stored in the memory character by character n each character is stored in 1 memory location in the form of bit patterns n refer to Chapter 5 - Representation of alphanumeric information within the computer 4
Memory sizes n measured in kilobytes (KB) = 1024 bytes n the value of K is sometimes rounded off to 1000 for convenience n to measure memory of larger sizes, we use megabytes (MB) and gigabytes (GB) n 1 MB = 1024 KB = 2 20 bytes = 1 million bytes approx. n 1 GB = 1024 MB = 2 30 bytes = 1 billion bytes approx. n memory size is restricted by the addressing capability of the computer n with 10 address lines, 2 10, i.e., 1024(1K) memory locations could be accessed n in general, n address lines are required to access 2 n memory locations 5
Semiconductor chips n in the past, vacuum tubes & core memory n today, semiconductor chips n an integrated circuit (IC) that contains thousands of transistors (an electronic component that can be either on or off, therefore represent a bit) n Advantages n small but dense n efficient n size of computer - reduced n chips are cheaper to manufacture n can be easily replaced if having fault 6
Types of memory 2 types of semiconductor memory chips: n Random Access Memory (RAM) n Read Only Memory (ROM) their differences: refer to Chapter 8 - Computer Systems 7
Backing Storage Devices n to save programs & data for future processing n it is not possible to put all of them into main memory because: n data in main memory (except in ROM) are lost when the machine is switched off n main memory is very expensive n data for an application program may be so large that it is physically impossible for the main memory to hold all the data n can be treated as input/output devices 8
Magnetic disk n floppy disk n made of flexible plastic material n coated on both sides with a magnetized substance n commonly used ones: 5 1/4 inches, 3 1/2 inches n a relatively cheap storage medium n hard disk n composed of a set of circular plates n made of metal & coated with magnetized material n moveable head disk pack, fixed head disk pack 9
Magnetic tape n reel-to-reel tape n made of plastic material & is coated on one side with a magnetic material n primarily used for back up n only suitable for applications that involve sequential processing n cost - relatively low n cartridge tape n used for backing up on microcomputers n very fast, high storage capacity n cassette tape 10
Optical disk n offer great potential as storage devices n information is stored using a beam of laser to burn holes in a thin coating of metal n another laser is used to read the patterns n storage capacity is very large (in gigabytes) n storage cost - low n access time - fast n also known as CD-ROMs 11
Comparison % diff. types of backing storage media Cost of Cost of media Access method Access time Storage Transfer Magnetic tape Hard disk Floppy disk Optical disk drive very high high low high low if relatively low removable very low medium sequential only direct direct direct depends on location 10-100 ms 70-600 ms 30 ms - 1 s 600 MB capacity 10-320 MB 20 MB - 20 GB 100-1440 KB - 65 GB rate 40-320 KB/s 2.5-7.1 MB/s 250 KB/s 150-250 KB/s 12
Comparison % Main memory & Backing store Main Memory Function provides a working area for processing Storage capacity limited Backing Store holds data or programs permanently large storage capacity Cost more costly cheaper Access mode supports both sequential & direct access Access time fast slower some devices (e.g. tapes) support only sequential access Permanence user memory is volatile non-volatile 13