Page 21 - Computer Science V2.0 Class 11
P. 21

1.4.2 Types of Memory
                 The memory unit consists of the following types of memory:

                 A. Primary Memory

                 Primary memory (also called main memory) is used to store data and instructions to be processed by the CPU. Data
                 and instructions may be stored (written into memory) and retrieved (read from memory) for processing. Primary
                 memory is mainly of two types:
                   Random Access Memory (RAM): RAM is a random access memory in which data can be read from and written onto any
                   random memory location. It is also commonly known as main memory or read/write memory. As the primary memory
                   stores data and instructions associated with programs currently being executed by the CPU, the data is not stored
                   permanently. The data and instructions are retained in the RAM as long as the computer remains connected to the power
                   supply. RAM contents are lost when the power supply is switched off. So, RAM is also known as volatile memory.

                   Read Only Memory (ROM): Data is written in Read Only Memory (ROM) using specialised hardware. ROM is a
                   non-volatile memory that stores the data permanently, i.e. the contents are not lost even when the power supply is
                   turned off. The data access from ROM is comparatively slower as compared to RAM. Data and instructions stored in
                   ROM at the time of manufacturing are rarely to be changed. A ROM variant, Erasable Programmable ROM (EPROM),
                   allows data in EPROM to be overwritten using a specialised hardware mechanism. When a computer is switched on,
                   instructions in ROM gets executed to make the computer ready for use. The program in ROM that initiates the process
                   of bringing up the computer for use is called the bootstrap program.



                        Various types of ROM are PROM, EPROM, and EEPROM.


                 B. Cache Memory
                 The processing speed of a CPU is much higher compared to the rate at which a CPU can exchange data with RAM. Thus,
                 the execution speed of instructions involving read and write access from and to memory are limited by the speed of
                 memory. Consequently, the overall processing speed of the computer system becomes slow. To overcome the gap
                 between the CPU speed and the rate at which data is exchanged between the CPU and memory, high-speed cache
                 memory is placed between the CPU and primary memory (Fig 1.6). The cache is used to store the frequently used
                 instructions and data. Thus, the average time required to access data from primary memory is reduced. Whenever the
                 CPU needs some data/ instruction, it first checks for its availability in the cache. Only if the required data/instruction is
                 not found in the cache (cache miss), it is read from the main memory.


                                                    Cache
                                                    Memory


                                                                        Primary                Storage/
                                    CPU                                                        Secondary
                                                                        Memory
                                                                                               Memory





                                                           Fig 1.6: Cache Memory









                                                                                              Computer Fundamentals    7
   16   17   18   19   20   21   22   23   24   25   26