0% found this document useful (0 votes)
36 views22 pages

Dsa Unit 2

Internal memory refers to memory that can be accessed quickly while the computer is running, such as RAM and ROM. External memory, also called secondary memory, refers to storage devices like hard disks that can retain data persistently. RAM is volatile and temporarily stores active data and programs, while ROM is non-volatile and contains the computer's basic operating instructions. External memory provides large-capacity, non-volatile storage of data on devices like hard disks, USB drives, and optical discs.

Uploaded by

cryhaarish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views22 pages

Dsa Unit 2

Internal memory refers to memory that can be accessed quickly while the computer is running, such as RAM and ROM. External memory, also called secondary memory, refers to storage devices like hard disks that can retain data persistently. RAM is volatile and temporarily stores active data and programs, while ROM is non-volatile and contains the computer's basic operating instructions. External memory provides large-capacity, non-volatile storage of data on devices like hard disks, USB drives, and optical discs.

Uploaded by

cryhaarish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

What is internal memory and how is it

different from external memory?


Computer memory is generally classified as either internal or
external memory.
Internal memory, also called "main or primary memory" refers to
memory that stores small amounts of data that can be accessed
quickly while the computer is running.
External memory, also called "secondary memory" refers to a
storage device that can retain or store data persistently. They could
be embedded or removable storage devices. Examples include hard
disk or solid state drives, USB flash drives, and compact discs.

What are the types of internal memory?


There are basically two kinds of internal memory: ROM and RAM.
ROM stands for read-only memory. It is non-volatile, which means
it can retain data even without power. It is used mainly to start or
boot up a computer.
Once the operating system is loaded, the computer
uses RAM, which stands for random-access memory, which
temporarily stores data while the central processing unit (CPU) is
executing other tasks. With more RAM on the computer, the less
the CPU has to read data from the external or secondary memory
(storage device), allowing the computer to run faster. RAM is fast
but it is volatile, which means it will not retain data if there is no
power. It is therefore important to save data to the storage device
before the system is turned off.

What is Internal Memory?


Types of Internal Memory
 RAM (Random Access Memory)

RAM (internal memory) is a type of volatile storage that stores temporary


information for faster accessing. Also, RAM saves temporary files of open
programs and applications on a computer.

 ROM (Read Only Memory)

ROM is a read-only memory, and once the data is input, it cannot be


changed. Data are written into ROM when it is manufacture. Also, if any
single bit is wrongly input, the whole ROM becomes useless.

 Cache Memory

Cache memory is helpful to store temporary information that has been


accessed by a buffer. In addition, it eases the work of the processor by
speeding up data access on the computer.

What is External Memory?


External memory (also known as secondary memory) is a type of hard disk
drive or other storage device. Besides, this memory stores data externally,
allowing permanent storage of broad information.

Moreover, external memory is also portable, which means it is removable


and can be used in other computers. The method of storing data in
external memory is different than that of internal memory.

For example, magnetic tapes, optical drives, hard disks, etc. have high
capacity storage to store a large amount of data.

Types of External Memory


 Magnetic Tapes
 Magnetic Disks
 Hard Disk Drive
 Optical Drive
What are the types of RAM?
There are two main types of RAM: Dynamic RAM (DRAM) and
Static RAM (SRAM).
 DRAM (pronounced DEE-RAM), is widely used as a
computer’s main memory. Each DRAM memory cell is made
up of a transistor and a capacitor within an integrated
circuit, and a data bit is stored in the capacitor. Since
transistors always leak a small amount, the capacitors will
slowly discharge, causing information stored in it to drain;
hence, DRAM has to be refreshed (given a new electronic
charge) every few milliseconds to retain data.
 SRAM (pronounced ES-RAM) is made up of four to six
transistors. It keeps data in the memory as long as power is
supplied to the system unlike DRAM, which has to be
refreshed periodically. As such, SRAM is faster but also more
expensive, making DRAM the more prevalent memory in
computer systems.

What are the types of RAM?


There are two main types of RAM: Dynamic RAM (DRAM) and
Static RAM (SRAM).
 DRAM (pronounced DEE-RAM), is widely used as a
computer’s main memory. Each DRAM memory cell is made
up of a transistor and a capacitor within an integrated
circuit, and a data bit is stored in the capacitor. Since
transistors always leak a small amount, the capacitors will
slowly discharge, causing information stored in it to drain;
hence, DRAM has to be refreshed (given a new electronic
charge) every few milliseconds to retain data.
 SRAM (pronounced ES-RAM) is made up of four to six
transistors. It keeps data in the memory as long as power is
supplied to the system unlike DRAM, which has to be
refreshed periodically. As such, SRAM is faster but also more
expensive, making DRAM the more prevalent memory in
computer systems.

Difference between Internal and External


Memory

Basis Internal Memory External Memory


Ram is volatile, but ROM is non-
Nature Non-volatile in nature
volatile in nature
It is also known as Primary or main It is also known as secondary
Other Name
memory memory
Looks like chips and is attached to Look like a storage device or disk
Physical Appearance the motherboard inside the that are portable and connects to
computer every computer
Connects internally by inserting
Connect through data cable or
Connectivity chips or when the machine is
externally to the network
manufacture
The Data is stored temporarily to The Data is stored permanently for
Data Storage
access files faster long-term
Working Memory It is a working memory It is not a working memory
Large Data It cannot store extensive data It saves a broad amount of data
Portability Non-portable Portable
Example Ram & Rom Hard Disk & Optical Drive

Eternal memory can also be known as secondary memory or backing store. It


is used to store a huge amount of data because it has a huge capacity. At
present, it can measure the data in hundreds of megabytes or even in
gigabytes. The important property of external memory is that whenever the
computer switches off, then stored information will not be lost. The external
memory can be categorized into four parts:

1. Magnetic disk
2. Raid
3. Optical memory
4. Magnetic Tape

Magnetic Disks
A disk is a type of circular platter constructed by a nonmagnetic material,
which is known as a substrate. It is covered with a magnetic coating used to
hold the information. The substrate is traditionally constructed by aluminium
or aluminium alloy material. But recently, another material has been
introduced, which is known as glass substrates. There are various benefits of
glass substrates, which are described as follows:

o It has the ability to increase disk reliability by improving the uniformity


of a magnetic film surface.
o It is used to reduce the errors of read-write by doing a significant
reduction in overall surface defects.
o It has better stiffness, which will help to reduce disk dynamics. It has
the great ability that it can withstand against shock and damage.

Magnetic Read and Write Memory

The most important component of external memory is still magnetic disks.


Many systems, such as supercomputers, personal computers, and mainframes
computers, contain both removable and fixed hard disks. We can conduct a
coil named as the head so that we can recover the data on and later and then
retrieve it from the disk. A lot of systems contain two heads that are read
head and write head. While the operation of reading and writing, the platter
is rotating while the head is stationary.

If the electricity is flowing through the coil, the write mechanism will exploit
the fact that the coil will generate a magnetic field. The write head will receive
the electric pulses, and the below surface will record the resulting magnetic
pattern. It will be recorded into different patterns for negative and positive
currents. If the electricity is flowing through the coil, the read mechanism will
exploit the fact that it will generate an electric current in the coil. When the
disk's surface passes under the head, it will produce a current with the same
polarity as the already recorded one.

In this case, the structure of head is the same for reading and writing.
Therefore, we can use the same head for both. These types of single heads
can be used in older rigid disk systems and in floppy disk systems. A type of
partially shielded magneto-resistive (MR) sensor consists in the read
head. The electric resistance is contained in the MR material, which depends
on the direction of magnetization of the medium moving under it.

Data Organization and formatting

The head is known as a small device, which is able to read from or write to the
portion of the platter rotating beneath it. The width of each track is the same
as head. We have thousands of tracks per surface. The gaps are used to show
the separation of adjacent tracks. This can prevent or minimize the error which
is generated because of the interference of magnetic fields or misalignment of
the head. The sectors are used to transfer the data from and to the disks.

The fixed-length sectors will be used in the most contemporary systems with
512 bytes, which is nearly a universal sector size. Intersector gaps separate the
adjacent sectors so that we can avoid imposing unreasonable precision
requirements on the systems. At the same rate, we can scan the information
with the help of rotating the disk at a fixed speed, which is called constant
angular velocity (CAV).

There are various things in which disks can be divided. So it can divide into a
series of concentric tracks and into a number of pie-shaped sectors. The CAV
has an advantage in that the tracks and sectors are able to directly address the
data with the help of CAV. The CAV also has a disadvantage in that the
amount of data that is stored on the short inner tracks and the long outer
tracks are the same.
The modern hard disks introduce a technique to increase the density, which is
called Multiple zone recording. Using this technique, the surface is able to
divide into a number of concentric zones, which is typically equal to 16, which
means 16 zones. The number of bits per track is constant within a zone. The
zones which are closer to the centre have fewer amounts of bits or sectors as
compared to the zones which are farther from the centre.
The disk drive always or permanently contains a non-removable disk. For
example, in the personal computer, the hard disk can never be removed, or
we can say that it is a non-removable disk. The removable disk is a type of
disk that can be removed and replaced with other disks. Both sides of the
platter contain the magnetizable coating for most of the disks, which will also
be referred to as the double side. The single side disks are used in some less
expensive disk systems.
A movable head is employed by the multiple platter disks with one head of
read-write per platter surface. Form the centre of the disk, all the heads
contain the same distance and move together because all the heads are
mechanically fixed. In the platter, a set of all tracks in the same relative
position will be known as a cylinder.
This type of mechanism is mostly used in a floppy disk. This type of disk is
the least expensive, small, also contains a flexible platter. The sealed drive
assemblies are almost free of contaminants, and it contains the Winchester's
heads. IBM uses the term Winchester as a code name and it was used for the
3340 disk model prior to its announcement in IBM. The workstations and
personal computers commonly contain a built-in disk, which is known
as Winchester disk. This disk is also referred to as a hard disk.

RAID
The RAID is also known as a redundant array of independent disks. It is a
type of data virtualization technology, which is used to combine components
of multiple disks into a logical unit so that they can improve the performance
or create redundancy. If there are multiple disks/drives, it will allow the
employment of various techniques such as disk mirroring, parity, and disk
striping. We cannot consider RAID as a replacement for data backup. If RAID is
going through the critical data, it will be backed up to a logical set of disks or
other physical disks. When we make a connection with RAID, we will normally
use the following terms:

Mirroring: In this, data will mirror between more than one disk.

Parity: It can also be called checksum. It can be described as a calculated


value, which is used to mathematically rebuild the data.

Commonly RAID has 7 levels. In which levels 0, 1, and 3 are used for high
transfer rates. Levels 4, 5, and 6 are used for high transaction rates. All the
levels of RAID are described as follows

RAID 0

RAID 0 can also be called disk striping. In the RAID 0 technique, data is
evenly divided into two or more than two storage devices such as HDD or
SDD. In this technique, we will organize the data in such as manner that users
can faster read or write the files. Due to this process, the performance will
speed up. If we have a large number of applications and enormous data, the
best solution will be disk stripping. The setup of RAID 0 is very easy. It can also
be called the most affordable type of redundant disk organization.

However, this type of arrangement is unable to handle the fault or error, and
we cannot use it to handle the critical data. This is because it writes the first
block into the first disk, the second into the next disk, and so on. This process
will be repeated until it hits all of the disks. Lastly, it will come back to the first
disk. This means all the disks are working in parallel, so we are able to see the
full performance of our disks.

On the downside, there will be no redundancy, and that means if any


disk fails, we will lose all our data across all disks. So RAID 0 provides us high
performance and expanding storage, but it is actually less reliable as compare
to a single disk.
Advantages of RAID 0

o In the read and write operations, it provides us with great performance.


o There will be no overhead because RAID 0 uses all the storage capacity.
o In RAID 0, we can easily implement the technology.

Disadvantages of RAID 0

o RAID 0 cannot be used in critical systems because it is unable to


tolerate the fault.
o If one disk fails in RAID 0, then all the data of other disks are also lost.

RAID 1

RAID 1 can also be called Mirroring. It will take all data from a disk and then
write it into a second disk, which is parallel to the first disk. In RAID 1, there is
very high redundancy because each disk contains the exact copy of data on
another disk. It needs minimum two disks to work. The setup of RAID 1
provides protection against data loss, or we can say that it has the fault
tolerance capacity. If one disk fails, then the copy of that disk provides the
required data.
Here, the systems can read the data from both disks simultaneously. Because
of this feature, it will also be able to speed up the performance and availability.
Still, the performance of write operation is unaffected. It takes more time as
compared to the read operation because RAID 1 contains two disks writing in
parallel, and the writing operation uses the capacity of one disk, and they have
to write the same data twice. In RAID 1, the downside of the disks contains the
high costs because one disk must build twice the capacity that's actually
needed at this level.

Advantages of RAID 1

o As compare to the single disk, the RAID 1 provides an excellent read


and write speed.
o It has the fault tolerance ability. If one disk fails, we don't need to build
the data again, and we will just simply copy the data into the
replacement disk.
o It is a very simple technology, and the implementation of RAID 1 is also
very simple.

RAID 2
RAID 2 can also be called Bit-level stripping. In RAID 2, we strip the bits
across the disks in place of striping the blocks across the disks. At this level,
we require two groups of disks. The first group of disks will be used to write
the data, and the second group of disks will be used to write the error
correction codes.

In this level, we will use Hamming error correction code (ECC) and then use
the redundancy disks to store the information of ECC code. Hamming code is
a type of linear error correction code, which is able to detect up to (d - 1) bit
errors and correct (d -1)/2-bit errors. Where d is a type of code word given by
the minimum Hamming distance between all pairs. If d is greater than or
equal to the Hamming distance between transmitted and received bit pattern,
only then reliable communication will be possible. In contrast, a simple parity
code is able to only detect an odd number of errors, and it cannot correct the
error.

RAID 3

RAID 3 can also be called Byte level stripping. The working of RAID 3 is the
same as RAID 0 as it uses byte-level stripping, but it also needs an extra disk in
the array. RAID 3 is used to support a special type of processor in the parity
code calculations, which can be called 'parity disk'. In RAID 3, we strip the
bytes across the disks in place of striping the blocks across the disks. At this
level, we require multiple data disks and a dedicated disk so that we can store
the parity. In the configuration process of RAID 3, the data will be divided into
individual bytes, and then it will be saved on a disk. For each row of the data,
the parity disk will be determined, and after that, it will be saved in the
mentioned parity disk. If there is any failure, it has the ability to recover the
data with the help of parity bytes that correspond with them and the
appropriate calculation of remaining bytes.

RAID 3

RAID 3 can also be called Byte level stripping. The working of RAID 3 is the
same as RAID 0 as it uses byte-level stripping, but it also needs an extra disk in
the array. RAID 3 is used to support a special type of processor in the parity
code calculations, which can be called 'parity disk'. In RAID 3, we strip the
bytes across the disks in place of striping the blocks across the disks. At this
level, we require multiple data disks and a dedicated disk so that we can store
the parity. In the configuration process of RAID 3, the data will be divided into
individual bytes, and then it will be saved on a disk. For each row of the data,
the parity disk will be determined, and after that, it will be saved in the
mentioned parity disk

The systems which are based on RAID 3 are mostly used for the
implementation purpose where very large files are referred by the small
number of users.

RAID 4

RAID 4 can be known as Block-level striping. The working of RAID 4 is the


same as RAID 3. The main difference between them is the process of sharing
the data. They are divided into blocks such as 16, 32, 64, or 128 GB. Same as
RAID 0, it will be written on the disk. For each row of written data, a parity disk
is used to write any recorded block. That means this level uses block-level for
striping data in place of byte-level striping. RAID 5 and RAID 4 has a lot of
similarities, but RAID 4 confines all parity data to a single disk. So we can say
that it does not use distributive parity.

n RAID 4, we can complete implementation and configuration with the help of


minimum three disks. RAID 4 also requires hardware support to perform the
parity calculations. Due to this, we are able to recover data with the help of
appropriate mathematical operations.
RAID 5

RAID 5 can be called Stripping with parity. It uses the block level for data
striping and also uses distributive parity. RAID 5 needs minimum three disks
but can work up to 16 disks. It is the most secured RAID level. Parity is a type
of raw binary data. RAID system calculates the values of parity and using these
values, create a parity block. If any disk fails in the RAID system, it will use the
parity block to recover striped data.

In short, we can say that RAID 5 provides reliability and high performance. It
has the ability to balance reads, and writes and also it is secure. RAID 5 stores
the parity by using the space of entire disk, and it also reduces the aggregate
amount of data users can save. RAID 5 is a type of excellent all-around system,
which is used to provide decent performance and also combine efficient
storage with excellent security. It is mainly used for the file and application
server that contains a limited number of data drives.
RAID 6

RAID 6 can also be called Striping with double parity. The working of RAID
5 is the same as RAID 6, and the difference between them is that the system
stores an additional parity block on each desk in RAID 6. Due to this, a
configuration will be enabled where before the array is unavailable, the two
disks may be failed. It needs two different sets for parity calculations, and it
has the ability to rebuild an array even if two drives simultaneously fail. RAID 6
needs minimum four disks, and it can withstand two disks that are dying
simultaneously. The two disks will be used for the data, and the remaining two
disks will be used for parity information. If there is a rise in the number of
disks, it will increase the chances of multiple failures and also increase the
complexity of rebuilding the disk set.

In RAID 6, the chances of two disks failure at the same time are very less. In
the RAID 5 system, if any disk fails, it will take hours, days or more time to
replace it with the new disk. At that time, if another disk fails, we will lose all of
our data forever. But in RAID 6, the RAID array will even survive from the
second failure.
Optical Memory
The optical memory was released in 1982, and Sony and Philips developed it.
These memories perform their operations with the help of light beams, and it
also needs option drive for the operations. We can use optical memory to
store backup, audio, video, and also for caring data. The speed of a flash drive
and the hard drive is faster as compared to the read/write speed. There are
various examples of optical memory that are Compact disk (CD), Bluray Disk
(BD), and Digital Versatile Disk (DVD).

Compact Disk (CD)

It is a type of digital audio system, which is used to store data. It is composed


of circular plastic, in which aluminium alloy is used to coat the single side of
plastic, which is used to store the data. It also contains an additional thin
plastic covering, which is used to protect the data. CD will perform its
operations with the help of a CD drive. The compact disk can be called the
non-erasable disk. Here we use the laser beam to imprint the data on the disk.
In the starting, the CDs are used to hold the 60 to 75 minutes of audio
information that has the ability to store about 700MB of data. But now, it can
store 60 minutes of audio information on a single side. Now many devices
have been developed which contains low cost and high capacity as compared
to the CD.
Types of Compact Disk

CD-ROM:

CD-ROM is also known as CD read-only memory. It is mainly used to store


computer data. As we know earlier, the compact disks were used to store the
video and audio data, but it uses the digital form to store the data, so we can
also be used the compact disks to store the computer data.

D-R:

CD-R is also known as CD-Recordable. It is a type of write once read many,


or we can say that it allows single time recording on a disk. It is used in these
types of applications that require one or a small number of copies of a set of
data. CD recordable composed of polycarbonate plastic substrate, coating of
thin reflective metal, and a protective outer coating. Between the metal layers
and the polycarbonate, there is a layer of organic polymer dye, which serves
as a recording medium. With the help of dye, the reflectivity can be changed.
When there is exposure to a specific frequency of light, the dye will be
permanently transformed. The high-intensity laser is used to activate the dye.
In the dye, marks are created by the laser that is used to mimic the reflective
properties of lands (highest area) and pills (lower area) of the traditional CD.

You might also like