MEMORY - All You Want to know about it


Memory : It stores instructions, data, results and programs, either permanently or temporarily.

Storage Media : Means the material on which the data can be stored.

Classification of Storage Devices : 

Storage Devices

1. Primary 

2. Secondry

There are many types of memories used in computers, differing in speed. As you can see in the diagram below, the CPU accesses memory according to a distinct hierarchy. Whether it comes from permanent storage (the hard drive) or input (the keyboard), most data goes in random access memory (RAM) first. The CPU then stores pieces of data it will need to access often in a cache and maintains certain special instructions in the register.


Performance Factors :

Memory parameters that impact system performance are capacity, bandwidth, and latency. Any storage unit of a computer system is ranked according to the following Criteria :

1. Capacity :

It refers to the amount of Data that can be stored in the storage unit. The following table  shows the capacities and speeds of various storage mechanisms found in a typical mainstream desktop computer in service today.

Memory Type Typical Capacity Current Speed

Level 1 cache

32 KB

4 ns

Level 2 cache 

256 KB

20 ns

System memory 

128 MB

50-70 ns

Hard drive 

40 GB* 

9 ms

2. Bandwidth or Data Rate:

Memory bandwidth is a measure of the rate at which data can be transferred to and from memory, (Or The number of bytes per second that the drive can deliver to the CPU) typically expressed in megabytes per second (MB/sec). Peak bandwidth is the theoretical maximum transfer rate between any device and memory. In practice, peak bandwidth is reduced by interference from other devices and by the "lead-off" time required for a device to receive the first bit of data after initiating a memory request.

There should be adequate memory bandwidth to support the actual data rates of the highest-speed devices and to provide enough headroom to prevent significant interference between devices. In many systems, memory and I/O hubs are designed to accommodate peak requirements by buffering transfers and scheduling conflicting memory requests. 

I/O , Processor  And Video Devices1997 1998 1999 2000  Peak Data Rates Over Time (MB/sec)
1997 1998 1999 2000

Storage

 33

 33

 66

 100

Network

 12.5

 12.5

 12.5

 12.5

Multimedia (1394)

 0

 0

 0 

50

I/O (USB) 

1.5 

1.5 

1.5

 1.5

I/O Total

 47

 47

 80

 164

Processor 

533

 800

 1066

 3200

Graphics

 266 

533 

1066

 1066

Total peak data rates

 846

 1380

 2212

 4430

Table 2. Data Rates of I/O, Processor, and Video Devices

Memory systems have done a fairly good job of keeping up with system requirements over this period of time, moving from 533 MB/sec(66MHz) to 2133(266MHz) MB/sec. Dual-memory interfaces using Rambus or DDR memory boost bandwidth to 3200 MB/sec(400MHz). 

3. Latency (In case of CPU-from/to-Primary Memory)

In all memory, however, it takes time to process a request before the data can be sent. This delay is called "latency" and it literally means the "lateness" of the data from the time of the initial request. RAM doesn't usually operate at optimum speed; latency changes the equation radically. 

Techniques to Compensate Latency:

In general, processors are more sensitive to latency than bandwidth because they work with smaller blocks of data and can waste a significant number of clocks waiting for critical data. In contrast, I/O data transfers are relatively long, and bandwidth is a more important consideration than latency.

Over the last 4 years, memory bandwidth has kept up with system needs, but latency improvements have lagged. Current Rambus and DDR technologies double the memory bandwidth over 100-MHz SDRAM, but do not reduce latency. Ideally, latency should be reduced in proportion to processor clock rate increases. New processor architecture features-improved caches, more support for out-of-order execution, and prefetch instructions for applications that are sensitive to processor latency?have helped to offset this lag in latency improvements. 

4.Cost Per Bit : of storage must be Minimum.

5.Access time : This is the time required to locate and retrieve stored data from the storage unit in response to a program instruction.

6.Bus width: Which determines the amount of data that can be transferred at any instant in time.  

7.Bus Speed : Bus speed refers to the number of times a group of bits can be sent each second. A bus cycle occurs every time data travels from memory to the CPU. For example, a 100 MHz 32-bit bus is theoretically capable of sending 4 bytes of data to the CPU one hundred million times per second while a 66 MHz 16-bit bus can send 2 bytes of data sixty-six million times per second. Simply changing the bus width from 16-bit to 32-bit and the speed from 66 MHz to 100 MHz in our example allows for three times as much data (400 million bytes versus 132 million bytes) to pass through to the CPU every second.  (1 million bytes=1 Mb Approx.). 

*The speed and width of the memory's bus must match the system's bus. You can't use memory designed to work at 100 MHz in a 66 MHz system or 32-bit memory with a 16-bit CPU.


Types of Storage Media or Memory :

I. Based on the above mentioned criteria, storage units are basically of two types : 

1.Primary Memory : or Main Memory  or Internal Storage Section is basic to all computers. RAM is generally referred to as Primary Memory. But ROM is also a part of internal storage.

2.Secondry Storage Unit : They are used for permanent Storage and are also known as Auxiliary Memory.

II. On the basis of Accessing Method, Memory Can be Classified into 2 :

1.Random access memory (RAM) is the best known form of computer memory. RAM is considered "random access" because you can access any memory cell directly if you know the row and column that intersect at that cell.

2.The opposite of RAM is serial access memory (SAM). SAM stores data as a series of memory cells that can only be accessed sequentially (like a cassette tape). If the data is not in the current location, each memory cell is checked until the needed data is found. SAM works very well for memory buffers, where the data is normally stored in the order in which it will be used (a good example is the texture buffer memory on a video card). RAM data, on the other hand, can be accessed in any order.


I. PRIMARY OR MAIN MEMORY

Primary or Main Memory :  It is a part of the processing Hardware (CPU) that temporarily hold s the data and instructions to be processed, and processed data that may be result or intermediate result to be used for further processing. 

As compared to Secondary Storage Units, Primary storage Units have : 

Electronic Component Used : 

The main memories of almost all the computers used today have the semiconductor memory. A Semi-Conductor is a material that conducts electricity poorly, but that when added with impurities (such as arsenic and indium are added to it, can be used to form electrical circuits..

Silicon Chips (A semi Conductor)


History of the Memory & Electronic Components Used


Types of Main Memory :

On the basis of Volatility Memory Can be Classified into 2:

ROM (Read-Only Memory) and RAM (Random Access Memory). 

1.Random Access Memory (RAM) : Memories that can be both read from and written into are called Read/Write Memories or RAM (pronounced as ramm). An important distinction between the two is that RAM is volatile memory, that is, any data existing on the memory is erased when the system shuts down.

2.Read Only Memory (ROM) : Memories that have program or data permanently stored on them are called Read Only Memories or ROM. By comparison, ROM memory is referred to as nonvolatile, meaning its data content remains intact, irrespective of shutdown and boot activity. As the name implies, ROM memory can only be read in operation, preventing the re-writing of contents as part of its normal function. Basic ROM stores critical information in computers and other digital devices, information whose integrity is vital to system operation and is unlikely to change. 

Both types of the memory allow Random Access.

How Memory is Organized ? : 

The contents of both RAM and ROM are organized in the same way. Memory is made up of several small storage areas called locations or cell. Each cell stores 1 Bit of Data. The capacity of memory is generally in the form of 2n bytes. Each cell has a built in and unique number assigned to it which is known as the address of the cell. It is used to identify or locate the cell.  


II. Secondary Storage Devices :

Secondary or Auxiliary Storage Devices : are designed to store data and instructions in permanent form.

As compared to Primary Storage Devices, Secondary Storage Devices have :

Secondary Storage is non-volatile i.e. the data remains intact when the computer is turned off.

Auxiliary Storage Devices are also useful in transferring data from one computer to another.


History of Secondary Storage Devices :