Computer Memory
Computer Memory
Computer memory is just like the human brain. It is used to store data/information and instructions. It is a data
storage unit or a data storage device where data is to be processed, and instructions required for processing are
stored. It stores both the input and output here.
1. Primary Memory
RAM (Random Access Memory): It is a volatile memory. Volatile memory stores information based on the
power supply. If the power supply fails/ interrupted/stopped, all the data and information on this memory
will be lost. RAM is used for booting up or starting the computer. It temporarily stores programs/data which
has to be executed by the processor. RAM is of two types:
S RAM (Static RAM): S RAM uses transistors and the circuits of this memory are capable of retaining
their state as long as the power is applied. This memory consists of the number of flip flops with
each flip flop storing 1 bit. It has less access time and hence, it is faster.
D RAM (Dynamic RAM): D RAM uses capacitors and transistors and stores the data as a charge on the
capacitors. They contain thousands of memory cells. It needs refreshing of charge on the capacitor
after a few milliseconds. This memory is slower than S RAM.
ROM (Read Only Memory): It is a non-volatile memory. Non-volatile memory stores information even when
there is a power supply failed/ interrupted/stopped. ROM is used to store information that is used to operate
the system. As its name refers to read-only memory, we can only read the programs and data that are stored
on it. It contains some electronic fuses that can be programmed for a piece of specific information. The
information is stored in the ROM in binary format. It is also known as permanent memory. ROM is of four
types:
PROM (Programmable Read-Only Memory): This read-only memory is modifiable once by the user.
The user purchases a blank PROM and uses a PROM program to put the required contents into the
PROM. Its content can’t be erased once written.
EPROM (Erasable Programmable Read Only Memory): EPROM is an extension to PROM where you
can erase the content of ROM by exposing it to Ultraviolet rays for nearly 40 minutes.
EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written contents can be
erased electrically. You can delete and reprogram EEPROM up to 10,000 times.
2. Secondary Memory:
1. Magnetic Tapes: Magnetic tape is a long, narrow strip of plastic film with a thin, magnetic coating on
it that is used for magnetic recording. Bits are recorded on tape as magnetic patches called RECORDS
that run along many tracks. Typically, 7 or 9 bits are recorded concurrently. Each track has one
read/write head, which allows data to be recorded and read as a sequence of characters. It can be
stopped, started moving forward or backward or rewound.
2. Magnetic Disks: A magnetic disk is a circular metal or a plastic plate and these plates are coated with
magnetic material. The disc is used on both sides. Bits are stored in magnetized surfaces in locations
called tracks that run in concentric rings. Sectors are typically used to break tracks into pieces.
3. Optical Disks: It’s a laser-based storage medium that can be written to and read. It is reasonably
priced and has a long lifespan. The optical disc can be taken out of the computer by occasional users.
3. Cache Memory:
Cache memory is a type of high-speed memory that is used by the computer to store frequently accessed data for
quick access. It acts as a buffer between the CPU and the main memory, allowing the processor to access data much
faster than if it had to retrieve it from the main memory every time it was needed. By storing frequently used data in
the cache memory, the computer can reduce the amount of time it takes to access and process information, which
can improve overall system performance. Cache memory is typically divided into several levels, with each level
providing a progressively larger and slower storage space.
4. Virtual Memory
Virtual memory is a technique used by modern operating systems to allow programs to use more memory than is
physically available in the computer's RAM. It creates a virtual address space that maps to the physical memory,
allowing programs to access more memory than is actually available. This is done by moving data between the RAM
and the hard drive, which is much slower than accessing data directly from the RAM, but it allows the computer to
run more programs simultaneously and handle larger data sets. The operating system manages the virtual memory,
allocating and deallocating memory as needed, and swapping data between the RAM and the hard drive. This allows
the computer to use memory more efficiently and effectively, improving performance and allowing users to run more
complex programs.