Primary Memory

 Primary Memory

 

  Memory

The memory is the working area of computer. The place where our data and instruction get stored before processing and the result also gets stored before to its output is called memory. Data and instructions are stored in memory in the binary form.

1.2.5. Primary Memory

.com/img/a/



The primary memory of computer is also called main memory of computer. It is fast and less capacity memory of computer. The primary memories of computer are RAM, ROM, Cache memory, registers etc. They are mainly used to store data during a time of processing. The fast and integrated memory of less capacity is termed as primary or main memory. These memories have great effect on processing speed of computer. The memory also has an input-output port through which the data transfer takes place to and from the addressed location. This port is called Memory Buffer Register (MBR) or Memory Data Register (MDR). The main function of main memory is READ, WRITE and CLEAR.

1.      RAM (Random Access Memory)

It is called RAM because its contents can be accessed randomly. We can read from RAM as well as write into it. Hence, it is also called „read – write‟ memory. The main drawback of RAM is that it is volatile memory so the contents of RAM are lost when the computer is switched off. RAM is mainly used to store the following:

Ø  Kernel of running operating system.

Ø  Data and instruction currently being processed.

Ø  Data and instruction waiting to be processed.

Ø  Information waiting to its output.

Ø  Currently arrived data and instruction from input system.

 

There are 2 types of RAM.

 

i)    DRAM (Dynamic Random Access Memory)

 

It is the most common and cheapest type of memory chip. It is made of capacitors which is capable of storing the electric charge. Due to leakage of charges, the capacitors discharge gradually and the memory cells lose their contents. DRAM has to be refreshed periodically by recharging the capacitors to retain its memory contents. It is slower than SRAM but it is dense, consume less electricity, smaller in size and less expensive. Example: - DDR (Dual Data

Rate), DDR2 and DDR3 etc.

 

ii)    SRAM (Static Random Access Memory)

 

It is made of transistors. It is called static because it can remember or retain its memory contents without being refreshed or recharged as long as there is power. SRAM does not need to be refreshed or recharged periodically like DRAM. SRAM is faster than DRAM but more expensive, less in density and bigger in size and consumes more electricity.



Difference between SRAM and DRAM: -

 

SRAM

DRAM

1.

It requires 6 transistors per bit.

1.

It requires  1 transistor and 1

 

 

capacitor per bit.

2.

It is expensive.

2.

It is less expensive.

3.

It has less density.

3.

It has high density.

4.

It is fast.

4.

It is slow.

5.

It does not need periodic refreshing.

5.

It needs periodic refreshing.

6.

It occupies large space.

6.

It occupies small space.

7.

It consumes less electrical power.

7.

It consumes high electric power.

 

2.    ROM (Read only Memory)

It is called ROM because only read operation can be performed on it. The user can not write anything into ROM. The binary information stored in ROM is written permanently by the manufacture and it can not be altered. The program such as start up or booting instructions which does not need modification are stores in ROM. ROM is necessary to store such software which enables the computer to boot up. ROM is non-volatile memory because it can retain its contents even after the computer is turned off. It is also made by semiconductor chips.

The program stored permanently in ROM is called Firmware. Hence, firmware is immediately available when a device is powered on to start up the PC or other electric equipment like mobile, PDA and others.

The types of ROM (READ ONLY MEMORY):

i)    PROM (Programmable Read Only Memory)

PROM can be written to or programmed via a special device called a PROM programmer. Typically, this device use high voltages to permanently destroy or create internal links within the chip. Consequently, a PROM can only be programmed once.

ii)    EPROM (Erasable Programmable ROM)

EPROM is an erasable PROM. The data stored in EPROM can be erased by exposing it to ultraviolet rays. When an EPROM is exposed to ultraviolet light, the entire data are erased. The user can not erase the content of certain selected memory location. It is used to store programs which are permanent but needs frequent updating. It is usually reprogrammed without removing it from the circuit board. It is far more economical than PROM as it can be reused.

iii)   EEPROM (Electrically Erasable Programmable ROM)

It is an electrically erasable PROM. It can be erased and reprogrammed on the byte by byte basis. Either a single byte or the entire chip can be erased in one operation. It requires much shorter time, a few milliseconds for erasing as compared to EPROM. Varying with different manufactures, it has a limit on the number of times for which it can be reprogrammed. It need not be removed from the circuit board for erasing as EPROM.

Difference between RAM and ROM

RAM

ROM

1.

It allows both read and write

1.

It allows only read operation.

operations.

 

 

2.

It is volatile in nature i.e. data are

2. It is non-volatile in nature and used

lost when power supply is switched off.

for permanent storage.

3.

It is used when IO operation is

3.

It is not used for buffering purpose.

performed known as buffering.

 

 

4.

It is usually has higher memory

4.

It usually has less memory space

space than ROM.

than RAM.

5.

The second operation after booting

5.

The first operation in computer

the computer system is  performed in

system is performed in ROM (during

RAM.

booting process).

6. It is usually cheaper in cost.

6.

It is usually expensive.

7.

Types of RAM are SRAM and

7.

Types      of    ROM     are     PROM,

DRAM.

EPROM AND EEPROM.

 

3.    Cache Memory

Cache memory pronounced as cash, it a special, high speed and expensive semiconductor memory placed between RAM and CPU. It is used to in CPU, so that CPU doesn‟t have to wait for data to be delivered. The most frequently used instructions are kept in the cache memory so that the CPU to run faster, because it doesn‟t have to take time to swap instructions in and out of RAM. It is made by the components of static RAM. It is usually 5 to 10 times faster than main memory. Hence, cache memory is placed between RAM and CPU so that the speed of operation of main memory and cache memory together can meet the speed requirements of the high speed CPU.

There are two processes in Cache:

 

Ø   Cache Hit: At  first  processor, send address of  desired data to cache, if data is available than event is called Cache Hit.

     

      Cache Miss: When processor sent address is not present in cache, event is called Cache Miss. After cache Miss, data of main memory is copied to cache for next cache Hit.

   Features of Cache Memory:

·         It is temporary memory.

·         It is small size memory.

·         It is fast memory.

·         It increases the speed of computer.

·         Its internal cache is inside microprocessor and external caches are outside microprocessor.


L1 and L2 cache

L1 and L2 are levels of cache memory in a computer. If the computer processor can find the data it needs for its next operation in cache memory, it will save time compared to having to get it from RAM. L1 is “Level-1” cache memory usually built onto the microprocessor chip itself. For example, the Intel MMX microprocessor comes with 32,000 bytes of L1.

L2 is “Level-2” cache memory is on a separate chip (possibly on an expansion card) that can be accessed more quickly than the larger “main” memory. A popular L2 cache memory size is 1,024 KB (1MB).

4. Buffer

It is a memory that is used in portable computer. It is used to store more than one piece of data. It lies between I/O devices and CPU. It is used to hold data prior being used by CPU.

No comments:

Post a Comment

  School Introduction Being located nearly 12 km south west from its district headquarters, Dhulikhel, at an altitude’s of 1481 meters from...