Computer Memory
Computer Memory
B=10
C=A*B
Print C
1. Register :
Registers are the smallest data holding elements that are built into the processor itself. These are the memory
locations that are directly accessible by the processor. It may hold an instruction, a storage address or any kind of
data such as a bit sequence or individual characters. For example, an instruction may specify that the contents of
two defined registers be multiplied together and then placed in a specific register.
Example: Accumulator register, Program counter, Instruction register, Address register, etc.
2. Memory :
Memory is a hardware device used to store computer programs, instructions and data. The memory that is internal to
the processor is a primary memory (RAM), and the memory that is external to the processor is a secondary memory
(Hard Drive). Memory can also be categorized on the basis of volatile and non-volatile memory. Volatile memory is
memory that loses its contents when the computer or hardware device loses power. RAM (Random Access
Memory) is an example of volatile memory. Non-volatile memory is the memory that keeps its contents even if
power gets lost. EPROM is an example of non-volatile memory.
Computer Memory
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.
1. Internal Memory
o Random Access Memory (RAM)
Static RAM (SRAM)
Dynamic RAM (DRAM)
o Read Only Memory (ROM)
Masked Read Only Memory (MROM)
Programmable Read Only Memory (PROM)
Erasable and Programmable Read Only Memory (EPROM)
Electrically Erasable and Programmable Read Only Memory (EEPROM)
o Sequential Access Memory
o Cache Memory
o Virtual Memory
2. External Memory
o External Hard Drives
o Solid State Drive (SSD)
o USB Flash Drive etc.
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.
Types of RAM
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.
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.
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.
Types of ROM
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.
Erasable and Programmable Read Only Memory (EPROM)
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.
Memory device which supports such access is called a sequential access memory or serial Access Memory.
Cache 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.
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 main function of cache memory is to speed up the working mechanism of computer.
It is stores the program that can be executed within a short period of time.
Virtual Memory
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.
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.
Non volatile memory - Data is not lost when power is cut off.
Reusable - The data stage in the secondary storage on permanent basis until it is not overwritten or deleted
by the user.
Reliable - Data in secondary storage is safe because of high physical stability of secondary storage device.
Convenience - With the help of a computer software, authorised people can locate and access the data
quickly.
Capacity - Secondary storage can store large volumes of data in sets of multiple disks.
Cost - It is much lesser expensive to store data on a tape or disk than primary 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.
magnetic tape
magnetic disk
and optical disk etc.
Magnetic Tape
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.
Magnetic Disk
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.
floppy disk
hard disk
Winchester disk
Optical Disk
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.
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.
Memory Hierarchy
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: