1
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science
Computer Memory and Processors
B Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer Science
Computer Memory and Processors
UNIT-II
2
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceQ) Define memory, what is need of memory? Explain different types of memory?
Definition of Memory
Memory is an internal storage area in the computer, which is used to store data and programs either temporarily or permanently
A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed and instructions required for processing are stored. The memory is divided into large number of small parts called cells. Each location or cell has a unique address which varies from zero to memory size minus one. For example if computer has 64k words, then this memory unit has 64 * 1024=65536 memory locations. The address of these locations varies from 0 to 65535.
Memory Hierarchy
3
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceMemory is primarily of the following types
• Processor Registers
• Cache Memory
• Primary Memory/Main Memory
• Secondary Memory
Processor Registers
Processor registers are located inside the processor and are therefore directly accessed by the CPU. Each register stores a word of data (which is either 32 or 64 bits). Registers are the fastest among all types of computer data storage.
Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up CPU. It acts as a buffer between the CPU and main memory. It is used to hold those parts of data and program which are most frequently used by CPU. The parts of data and programs are transferred from disk to cache memory by operating system, from where CPU can access them.
Advantages
The advantages of cache memory are as follows:
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.
Disadvantages
The disadvantages of cache memory are as follows:
• Cache memory has limited capacity.
• It is very expensive.
Primary Memory (Main Memory)
4
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Sciencerequired to be processed reside in main memory. It is divided into two subcategories RAM and ROM.
Characteristics of Main Memory
• These are semiconductor memories
• It is known as main memory.
• Usually volatile memory.
• Data is lost in case power is switched off.
• It is working memory of the computer.
• Faster than secondary memories.
• A computer cannot run without primary memory.
Random Access Memory (RAM)
RAM (Random Access Memory) is the internal memory of the CPU for storing data, program and program result. It is read/write memory which stores data until the machine is working. As soon as the machine is switched off, data is erased.
Access time in RAM is independent of the address that is, each storage location inside the memory is as easy to reach as other locations and takes the same amount of time. Data in the RAM can be accessed randomly but it is very expensive.
5
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceRAM is of two types
• Static RAM (SRAM)
• Dynamic RAM (DRAM)
Static RAM (SRAM)
The word static indicates that the memory retains its contents as long as power is being supplied. However, data is lost when the power gets down due to volatile nature. SRAM chips use a matrix of 6-transistors and no capacitors. Transistors do not require power to prevent leakage, so SRAM need not have to be refreshed on a regular basis.
Because of the extra space in the matrix, SRAM uses more chips than DRAM for the same amount of storage space, thus making the manufacturing costs higher. So SRAM is used as cache memory and has very fast access.
Characteristic of the Static RAM
• It has long life
• There is no need to refresh
• Faster
• Used as cache memory
• Large size
• Expensive
• High power consumption
Dynamic RAM (DRAM)
DRAM, unlike SRAM, must be continually refreshed in order to maintain the data. This is done by placing the memory on a refresh circuit that rewrites the data several hundred times per second. DRAM is used for most system memory because it is cheap and small. All DRAMs are made up of memory cells which are composed of one capacitor and one transistor.
Characteristics of the Dynamic RAM
• It has short data lifetime
• Need to be refreshed continuously
6
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science • Used as RAM• Lesser in size
• Less expensive
• Less power consumption
Read Only Memory (ROM)
ROM stands for Read Only Memory. It is the memory from which we can only read but cannot write on it. This type of memory is non-volatile. The information is stored permanently in such memories during manufacture. A ROM, stores such instructions that are required to start a computer. This operation is referred to as bootstrap. ROM chips are not only used in the computer but also in other electronic items like washing machine and microwave oven.
Following are the various types of ROM
MROM (Masked ROM)
The very first ROMs were hard-wired devices that contained a pre-programmed set of data or instructions. These kinds of ROMs are known as masked ROMs which are inexpensive.
PROM (Programmable Read Only Memory): It holds booting program to start up the CPU.
The designer can write the program to fetch OS files from memory at the designing time. It cannot be erased by user until computer collapsed.
EPROM (Erasable Programmable Read Only Memory): This is also PROM. It is act as a
PROM. If booting program is corrupted then we can write a program for this memory. This process can be allowed by processor for a limited number of times nearly 1000 of times.
EEPROM (Electrically Erasable Programmable Read Only Memory): This is same as
7
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceAdvantages of ROM
The advantages of ROM are as follows:
• Non-volatile in nature
• These cannot be accidentally changed
• Cheaper than RAMs
• Easy to test
• More reliable than RAMs
• These are static and do not require refreshing
• Its contents are always known and can be verified
Secondary Memory
This type of memory is also known as external memory or non-volatile. It is slower than main memory. These are used for storing data/Information permanently. CPU directly does not access these memories instead they are accessed via input-output routines. Contents of secondary memories are first transferred to main memory, and then CPU can access it. For example: disk, CD-ROM, DVD etc.
Characteristic of Secondary Memory
• These are magnetic and optical memories
• It is known as backup memory.
• It is non-volatile memory.
• Data is permanently stored even if power is switched off.
• It is used for storage of data in a computer.
• Computer may run without secondary memory.
8
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceSecondary Storage Devices
1. Magnetic Tapes
Magnetic tapes are mass storage devices capable of backing up and retaining large volumes of data. These storage devices are basically used as sequential access secondary devices.
Magnetic tapes are available in the form of cassettes, reels and cartridges. Reels that are used with mini and mainframe computers are ½ inch wide and 2400 feet long. Such a tape can store 1600 characters per inch of the tape length. This means that about 50 books could be storage on just one reel of tape.
Magnetic tape drive
A tape drive is used to read and write data on a magnetic tape.
Advantages
A magnetic tape is compact in size, light in weight and can store large amounts of data.
Magnetic tapes are economical.
Copying of data on a magnetic tape is easy and fast.
Tape drives use less power.
Disadvantages
Data stored on the tape can be accessed only sequentially.
As compared to other storage devices, data on a tape is accessed at very slow speed.
9
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science2. Floppy Disks
In earlier days floppy disks are used to carry the information from one system to another system. These are made of an ultra thin plastic plate and coated with magnetic material and also enclosed with protective jacket. The speed of floppy lies in range of 300 to 360 rpm. The most of floppy disks have 300 rpm speed.
Floppy available in two sizes 5 ¼ inches and 3 ½ inches.
Tracks and Sectors
Inside a floppy drive the platters are structured to facilitate the storage and retrieval of data. Each platter is divided into concentric rings called "Tracks". There are thousands of tracks on each platter. They look like the rings of a very, very old tree.
Each track is divided into sectors. A sector can hold either 256 or 512 bytes of data. Today, hard drive platters have thousands of sectors in a single track.
Storage capacity of a Floppy
10
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceTherefore the storage capacity of a floppy disk
= 2x80x18x512 bytes
=14, 74,560 bytes = 1.44 MB
3. Hard Disk
Hard disk is used to store large data than disks. It is very faster to read or write data and much larger in capacity of storage than floppy.
Hard disk is made from materials such as aluminum instead of plastic and disk is coated on both sides with iron oxide. To increase storage capacity several disks are packed together. Hard disk also divided into sectors and tracks as well as cylinders.
Hard disks are available in different sizes 3 ½ inches, 5 ¼ inches, 8 inches, 10.5 inches, 14 inches, and capacities 40 GB, 80GB, 160GB, 250GB, 340GB, 520GB etc.
11
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science4. Optical disks:
In optical disks the information is writing to or read from the disk by using laser beam. It has large capacity storage than floppy. It has very less cost.. Most popular optical disks are CD-ROM, DVD-ROM.
CD-ROM
Compact disk read only memory (VD-ROM) is a type of optical disk that uses laser technology to read and write data onto the disk. A single CD-ROM can store a large amount of data, but once the information is stored on it, it becomes permanent and cannot be altered.
CDs are easily portable from one computer to another. The storage capacity of a CD-ROM varies from 650 MB to 1 GB. Most software products such as Microsoft Office, Windows Operating System and so on are available on CD-ROMs.
DVD ROM
Digital Video Disk or Digital Versatile Disk (DVD) is an extremely high capacity optical disk with storage capacity ranging from 4.7 GB to 17 GB. DVDs are widely used to store large databases, movies, music, complex software etc.
CD-R
Compact Disk Recordable (CD-R) is a blank disk that can be used to store information. The process of writing data on to the optical disk is called burning. Once data is written on the CD-R, it cannot be changed. Moreover, the user can continue to store data on other parts of the disk until it is full.
CD-RW
Compact Disk Rewritable (CD-RW) is a new generation of erasable optical disks. The user can write and over-write data on the CD-RW disk multiple times. However, the reliability of the disk tends to decrees, each time you rewrite the data.
Mass Storage Devices
Mass storage refers to storing enormous amounts of data in a persistent manner. Mass storage devices can store up to several trillion bytes of data and hence are used to store large databases.
12
B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer Science B Naresh B.V.R.I.C.E. Dept., of Computer ScienceB Naresh B.V.R.I.C.E. Dept., of Computer ScienceSustainable transfer speed
Low cost
High data storage capacity.
Less weight
Low power consumption
Easily portable
Some of the Mass storage devices are as follows
1. Disk Array
2. Automated Tape Library 3. CD-ROM Jukebox
1. Disk Array
A disk array, commonly known as, Redundant Array of Independent Disks (RAID). It is a group of physically independent and high capacity hard disk drives. These can be used in place of larger, single disk drive systems. The benefit of such systems is that it reduces costs, because having several medium sized hard disks is cheaper than having a single hard disk.
2. Automated Tape Library
An automated tape library, also known as a tape silo, tape robot or tape jukebox, is a storage device that contains one or more tape drives. A tape library consists of a number of slots to hold tape cartridges, a barcode reader to identify tape cartridges and an automated method called robot for loading the appropriate tape drives for processing. After processing, the robot automatically returns the tape to the library.
3. CD-ROM Jukebox
A CD-ROM jukebox, also known as a optical jukebox, an optical disk library or a robotic drive, is a data storage device that can automatically load and unload optical disks such as CDs and DVDs to provide terabytes and petabytes of tertiary storage.
Important Questions
1. Define memory and explain Primary and Secondary memory.
2. Define memory and explain about the types of memory.
3. Explain about RAM and ROM.
4. Define secondary memory and explain various secondary storage devices.