Monday 7 September 2015

MEMORY



MEMORY
The system memory refers to the place where the system holds current programs & data that are in use. It is the component of computer system that holds data & instruction for processing. Memory unit is an electronic circuit that allows data to be stored & retrieved whenever required. The basic function of computer memory is essentially to store data. It performs several different functions depending upon the type of data it stores & the role played by them in any computer operation. There are 2 types of computer memory inside the computer:
Ø Primary memory
Ø Secondary memory
              The memory hierarchy consists of total memory system of any computer system. A memory hierarchy in computer storage distinguishes each level in the hierarchy by response time. The memory components range from higher capacity to slow auxiliary memory, to a relatively fast main memory, to cache memory that can be accessible to high speed processing logic. The memory hierarchy in figure shows that, as we go down to up in the figure, the speed increases, & if we go up to down, the size increases.

Differences  between  Primary  &  Secondary  Memory
1)    Primary memory is also known as main memory or internal memory,   whereas, secondary memory is also known as additional memory or external memory.
2)    Primary memory is temporary memory, whereas, secondary memory is permanent memory.
3)    Primary memory can be categorized as volatile & non-volatile (RAM is volatile & ROM is non-volatile), whereas, secondary memory is always non-volatile.
4)    Primary memory devices are semi-conductor memories, whereas, secondary memory devices are magnetic & optical memories.
5)    Primary memory is composed of data & programs that are currently being used by the micro-processors, whereas, secondary memory is enough capable to store huge amount of information.
6)    Primary memory is more effective & fast to interact, whereas, secondary memory is slow as compared to primary memory.
7)    Primary memory devices are connected to computer through slots, whereas, secondary memory devices are connected to computer through cables.
8)    Primary memory can be accessed by using address & data buses, whereas, secondary memory can be accessed by using I/O (input/output) channels.
9)    Primary memory costs high, whereas, secondary memory costs lower than primary memory.
10)                       Primary memory is directly accessed by the computer, whereas, secondary memory isn’t directly accessed by the computer.
11)                       Primary memory generally ranges from 80 Mb to 8 GB RAM’s, whereas, secondary memory ranges between 80 Gb to 8 Tb hard disks.
12)                       Examples of primary memory are RAM & ROM, whereas, secondary memory includes hard disk, memory chips, pen drives, floppy disks, cd, etc.


         Differences  between  RAM  &  ROM

1)   RAM stands for ‘Random Access memory’, whereas, ROM stands for ‘Read Only memory’.
2)   In RAM, data can be accessed at any time, in any order, from any physical location, whereas, in ROM data can’t be altered easily.
3)   RAM allows both reading & writing, whereas, ROM only allows reading.
4)   RAM is volatile, means that its contents are lost when the device is powered off, whereas, ROM is non-volatile, which means that contents are retained even after power cut.
5)   RAM allows the computer to read the data quickly to run applications, whereas, ROM stores the program required to initially boot the computer.
6)    RAM has 2 types : (a) Static RAM (b) Dynamic RAM , whereas, ROM has 3 types : (a) PROM(Programmable ROM)  (b) EPROM(Erasable PROM)  (c) EEPROM(Electronically EPROM).
7)    RAM costs high, whereas, ROM is cheaper than RAM.
8)    RAM chips can read data faster, whereas, ROM chips have slower reading rate than that of RAM chips.



Differences  between  Static RAM  &  Dynamic RAM

1)   Static RAM has a complex structure, whereas, dynamic RAM is quite simpler than static RAM.
2)   Static RAM uses 6 transistors for each memory cell, whereas, dynamic RAM uses a single capacitor & a single transistor for each memory cell.
3)   Static RAM is used for smaller & faster cache memory, whereas, dynamic RAM is used for large main memories of PC’s, workstations, etc.
4)   Static RAM has high reliability, whereas, Dynamic RAM is less reliable than static RAM.
5)   Static RAM costs high, whereas, Dynamic RAM costs low than static RAM.
6)   Static RAM stores the data for a long time, whereas, Dynamic RAM can’t hold the data for long duration.
7)    Static RAM has 1 time allocation, means, it stores the data into predefined sections which can’t be modified during processing, whereas, Dynamic RAM hasn’t 1 time allocation because the processor refreshes the Dynamic RAM after every 1 millisecond to prevent data loss.



Cache Memory
The memory which is formed in between RAM & processor is known as cache memory. Cache memory is used to retain or boost up the speed of the processor. It is mainly used to hold frequently used data. It is relatively small in size but very fast. It is also known as “CPU Memory”. Cache memory is typically integrated directly with the CPU chip or placed on a separate chip that has several buses interconnected with the CPU. Since, the data accessing rate of main memory is slower than that of the processor, so the cache memory is placed in between the RAM & the processor to match up or balance their accessing speeds.
                                      Cache memory is divided into 3 sections/levels, namely, L1, L2 & L3. All levels of cache memory have different size. The size of 3 levels of cache are L1= 24 to 48 kb, L2= 3 Mb & L3= 64 kb. The processor first retrieves the data from L1, then data on L2 comes onto L1 & data on L3 comes onto L2. The processor retrieves 1000 byte, 100 byte, 10 byte & 1 byte data from L1, L2, L3 & RAM respectively in 1 microsecond. Hence, the processor retrieves all the data. Thus, retrieving data from cache memory is both convenient & less time taking.
For instance, a Pentium 3 processor operates the data with 1 Ghz & the RAM or motherboard used with P3 processor accesses the data with a speed of 133 Mhz. Here, there is a large difference between accessing speeds of RAM & processor. So, the cache memory is built on the chip of the processor so as to match the accessing speeds of both RAM & processor.
                                                The performance of cache memory is frequently measured in terms of a quantity called “HIT RATIO” (Ratio of hit & miss). When the CPU refers to a memory word & finds the word in the cache, it is said to be a “hit” & if word isn’t found in cache, it is said to be a “miss”. So, Hit ratio is equal to Ratio of no. of hits to total no. of CPU references.




REGISTERS
In a computer, the register is one of a small set of data holding places that are part of computer processor. Registers are smallest building block of memory. Registers may hold a computer instruction, a storage address or any kind of data (such as bit sequence or individual characters). Some instructions specify registers as part of the instruction. Register can said to be a group of binary cells suitable for holding binary information or a special, high speed storage area within the CPU. All data & instructions must be represented in a register before they can be processed. Registers are used to quickly accept, store & transfer data & instructions that are being used immediately by the CPU. These registers are used for performing various operations. While we are working on the system, then these registers are used by the CPU for performing the operations. When we give some input to the system, then the input will be stored in the registers & when the system will give us results after processing, then the results will also be from the registers. Registers perform following operations:
Ø Fetch:   This operation is used for taking those instructions that are given by the user & that are stored into the main memory.
Ø Decode:  This operation is used for interpreting the instructions which means that CPU will find out which operations are to be performed on instructions.
Ø Execute:  This operation is performed by the CPU & results produced by the CPU are stored into the memory which are later displayed on user screen.

For instance, if 2 numbers are to be multiplied, both numbers must be stored in some registers & then the result after multiplication of the numbers is also placed in a register.
The register can contain the address of a memory location where data is stored rather than the actual data itself. The number of registers that a CPU has & the size of each (no. of bits) help determine the power & speed of a CPU. Various registers are used for different purposes. Some mostly used registers are:
Ø Accumulator (AC)
Ø Data register (DR)
Ø Instruction register (IR)
Ø Address register (AR)
Ø Program counter (PC)
Ø Memory data register (MDR)
Ø Memory buffer register (MBR)
Ø Index register
Ø Input register
Ø Output register.

No comments:

Post a Comment