Area where the program instruction and data are retained for processing is called memory, like human brain, computer also requires some space to store data and instruction for addressing their processing.
CPU does not have the capacity to store programs or large set of data permanently. It contains only basic instruction needed to operate the computer. Therefore memory is required.
Memories primarily is of two types as given here:
A RAM constitutes the internal memory of the CPU for storing data, program and program result. It is read/write memory. It is called Random Access Memory (RAM).
Since access time in RAM is independent of the address to the word that is, each storage location inside the memory is as easy to reach as other location and takes the same amount of time. We can reach into the memory at random and extremely fast but can also be quite expensive.
RAM is volatile, that is data stored in it is lost when we switch off or turn off the computer or if there is a power Failure. Hence, a backup un-interruptible power system (UPS) is often used with computers.
RAM is a small, both in terms of its physical size and in the amount of data that can hold.
RAM is of two types:
The word static indicates that the memory retains its contents as long as power remains applied.
However, data is lost when the power gets down due to volatile nature.
Static RAM chips use a matrix of 6 transistors and no capacitors.
Transistors do not require power to prevent leakage, so static RAM need not have to be refreshed on a regular basis. Because of the extra space in the matrix, static RAM uses more chips than dynamic RAM for the same amount of storage space, thus making the manufacturing costs higher.
Static RAM is used as cache memory needs to be very fast and small.
Dynamic RAM, unlike static RAM, must be continually replaced in order for it to maintain the data. This is done by placing the memory on a refresh circuit that rewrites the data several hundred times per second.
Dynamic RAM is used for most system memory because it is cheap and small.
All dynamic rams are made up of memory cells. These cells are composed of one capacitor and one transistor.
ROOM stands for read only memory. 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 instruction as are required to start computer when electricity is first turned on, this operation is referred to as bootstrap.
ROM chip are not only used in the computer but also in other electronic items like washing machine and microwave oven.
Let's briefly the following list of ROM available in computer:
The very first ROMs were hardware devices that contained a pre-programmed set of data or instructions. This kind of ROMs are known as masked ROMs. Tt is inexpensive ROM.
PROM is read only memory that can be modified only once by a user. The user buys a blank PROM and enters the desired contents using a PROM programmer.
Inside the PROM, there are small fuses which are burnt open during programming. It can be programmed only once and it's not erasable.
The EPROM can be erased by exposing it to ultra-violet light for a duration of upto 40 minutes.
Usually, an EPROM eraser achieves this function. during programming, an electrical charge is trapped in an insulated Gate region.
The charge is retained for more than 10 years because the charge has no leakage path. For erasing this charge, ultraviolet light is passed through a quartz crystal window (lid). This exposure to ultraviolet light dissipates the charge. During normal use the quartz lid is sealed with a sticker.
The EEPROM is programmed and erased electrically. It can be erased and re-programmed about ten thousand times.
Both erasing and programming take about 4 to 10 milliseconds. In EEPROM, any location can be selectively erased and programmed.
EEPROMs can be erased 1 byte at a time, rather than erasing the entire chip. Hence, the process of reprogramming is flexible but slow.
Sequential access means the system must search the storage device from the beginning of the memory address until it finds the required piece of data.
Memory device which supports such access is called a sequential access memory or serial Access Memory.
Magnetic tape in an example of serial Access Memory.
Cache memory is a very high speed semiconductor memory which can speed up CPU. It acts as a buffer between the CPU and the main memory.
It is used to hold those parts of data and program which are most frequently used by the CPU. The parts of data and programs, are transferred from disk to cache memory by operating system, from where CPU can access them.
Cache memory, lies in between CPU and the main memory.
It is also called CPU memory, that a computer microprocessor can access more quickly than it can access regular RAM.
This memory is typically integrated directly with the CPU chip or placed on a separate chip that has a separate bus interconnect with the CPU.
Cache memory saves time and increases efficiency because the most recently processing data is stored in it which takes the fetching easier.
The basic purpose of cache memory is to store program instructions that are frequently Re-referenced by software during operation. Fast access to these instructions increases the overall speed of the software program.
The main function of cache memory is to speed up the working mechanism of computer.
Cache memory is faster than main memory.
It consumes less access time as compared to main memory.
It is stores the program that can be executed within a short period of time.
It stores data for temporary use.
Cache memory has limited capacity.
Cache memory is very expensive.
It is a technique that allows the execution of processes which are not completely available in memory. The main visible advantage of this scheme is that programs can be larger than physical memory.
Virtual memory is the separation of user logical memory from physical memory. This separation allows an extremely large virtual memory to be provided for programmers when only a smaller physical memory is available.
Following are the situations, when entire program is not required to be loaded fully in main memory.
User written error handling routines are used only when an error occurred in the data or computation.
Certain options and features of a program may be used rarely.
Many tables are assigned a fixed amount of address space even though only a small amount of the table is actually used.
The ability of the execute a program that is only partially in memory would counter many benefits.
Less number of input/output (I/O) would be needed to load or swap each user program into memory.
A program would no longer be constrained by the amount of physical memory that is available.
Each user program could take less physical memory, more programs could be run the same time, with a corresponding increase in CPU utilisation and through output.
Secondary memory is much larger in size than main memory but it is slower. It normally stores system programs, instruction and data files. It is also known as auxiliary memory. It can also be used as an overflow/virtual memory in case the main memory capacity has been exceeded.
Secondary memory cannot be accessed directly by a processor. First the data/information of auxiliary memory is transferred to the main memory and then that information can be accessed by the CPU.
Here are the characteristics of auxiliary memory:
We can also says that secondary memory is the other type of memory which is required to store the data permanently for a long time.
There are various types of secondary storage device available to store data for the future use. These device allow to read or write anywhere in memory.
Commonly used secondary storage devices are:
It is similar to audio tape containing a plastic strip coated with magnetic material. The data is encoded on the magnetic material in the form of electric current. Conduction state (ON) represent ONE (1) and non conduction state (OFF) represent ZERO (0).
The type of data encoding is called binary data storage. Magnetic tape are with large storage capacity and inexpensive, it can store data from 60 MB to 24 GB.
These are Direct Access storage media, where the accessing of a data is much faster because there is no need to go through call previous data for reaching a specific data.
In this type of storage devices, there is present a round diskette (round disk) of plastic material coated with magnetic ink on which data encoding is done.
The magnetic disk commonly of three types, that are:
The data can be read from and write to the optical disk by laser beam. These disks are able to store large amount of data into GB. These are available as CD-ROM, WORM (write once read only) erasable optical disks.
In CD-ROM data can be stored once and read only. These are called compact disks read only memory. These can store data from 600 MB to 1GB. A special device called CD-ROM player is used to read the data from CD-ROM.
All those drives or devices that are used to store information outside a computer. This device may or may not be attached to the computer. For example, in laptop a hard disk drive of 500GB, 1TB or 2TB etc. is attached to store any information permanently inside this drive. Now-a-day, many peoples also uses external hard disk drive or HDD to store any critical or extra information into that drive.
Solid State Drive (SSD) is a non-volatile storage device, that uses integrated circuit assemblies as memory to store any information persistently.
USB flash drive is a solid state device, that is it has no moving parts. In USB flash drive, the information is stored electronically using millions of small gates that have a value of zero (0) and one (1).
In simple sentence, it is a device that is used to store information. It includes a flash memory and an Integrated Universal Serial Bus (USB) interface.
USB flash drive are smaller in size or pocket-friendly, that is you can handle or carry USB flash drive in your pocket. It means that, you can carry all the information just in your pocket using USB flash drive.
Now let's see the photo or diagram of memory hierarchy with its characteristics.
Above diagram represents the hierarchy of a computer memory.
Here are the characteristics of memory hierarchy when we move from top to bottom: