Chapter 7
Chapter 7
Chapter 7
TEPI CAMPUS
SCHOOL OF COMPUTING AND INFORMATICS
DEPARTMENT OF COMPUTER SCIENCE
COMPUTER ORGANIZATION AND ARCHTECTURE ASSIGNMENT
MEMBERS NAME ID NUMBER
1.Abdrahim Mifta 0025
2. Hagos Abate 383
3.Abdo Kedir 0024
4.Abdi Asnake 0018
5.Tsigereda Abay 1662
6.Surafel Kinde 1535
CHAPTER 7
MEMORY ORGANIZATION
7.Memory Organization
Introduction
The memory hierarchy system consists of all storage devices contained in a computer system
from the slow Auxiliary Memory to fast Main Memory and to smaller Cache memory.
Auxillary memory access time is generally 1000 times that of the main memory, hence it is at the
bottom of the hierarchy.
The main memory occupies the central position because it is equipped to communicate directly with the
CPU and with auxiliary memory devices through Input/output processor (I/O).
When the program not residing in main memory is needed by the
CPU, they are brought in from auxiliary memory. Programs not
currently needed in main memory are transferred into auxiliary
memory to provide space in main memory for other programs that are
currently in use.
The cache memory is used to store program data which is currently
being executed in the CPU. Approximate access time ratio between
cache memory and main memory is about 1 to 7~10.
7.2.Memory Hierarchy
The Computer memory hierarchy looks like a pyramid structure which is
used to describe the differences among memory types. It separates the
computer storage based on hierarchy.
Level 0: CPU registers
Level 1: Cache memory
Level 2: Main memory or primary memory
Level 3: Magnetic disks or secondary memory
Level 4: Optical disks or magnetic types or tertiary Memory
:Let us discuss each level in detail
Level-0 − Registers
The registers are present inside the CPU. As they are present inside the CPU,
they have least access time. Registers are most expensive and smallest in size
generally in kilobytes. They are implemented by using Flip-Flops.
Level-1 − Cache
Cache memory is used to store the segments of a program that are frequently
accessed by the processor. It is expensive and smaller in size generally in
Megabytes and is implemented by using static RAM.
Level-2 − Primary or Main Memory
It directly communicates with the CPU and with auxiliary memory devices
through an I/O processor. Main memory is less expensive than cache memory
and larger in size generally in Gigabytes. This memory is implemented by
using dynamic RAM.
Level-3 − Secondary storage
Secondary storage devices like Magnetic Disk are
present at level 3. They are used as backup storage.
They are cheaper than main memory and larger in size
generally in a few TB.
Level-4 − Tertiary storage
Tertiary storage devices like magnetic tape are present
at level 4. They are used to store removable files and
are the cheapest and largest in size (1-20 TB).
Memory Access Methods
Whenever the CPU needs to access memory, it first checks the cache memory. If the
data is not found in cache memory then the CPU moves onto the main memory. It
also transfers block of recent data into the cache and keeps on deleting the old data
in cache to accomodate the new one.
Hit Ratio
The performance of cache memory is measured in terms of
a quantity called hit ratio. When the CPU refers to memory
and finds the word in cache it is said to produce a hit. If the
word is not found in cache, it is in main memory then it
counts as a miss.
The ratio of the number of hits to the total CPU references
to memory is called hit ratio.
7.4.Mapping Function
There are three different types of mapping used for the purpose of cache
memory which are as follows: Direct mapping, Associative mapping, and Se
Associative mapping. These are explained below.
7.4.1. Direct Mapping
The simplest technique, known as direct mapping, maps each block of main
memory into only one possible cache line. or
In Direct mapping, assign each memory block to a specific line in the cache.
If a line is previously taken up by a memory block when a new block needs t
be loaded, the old block is trashed. An address space is split into two parts
index field and a tag field. The cache is used to store the tag field whereas th
rest is stored in the main memory. Direct mapping`s performance is directly
proportional to the Hit ratio.
7.4.2. Associative Mapping
In this type of mapping, the associative memory is used to store content
and addresses of the memory word. Any block can go into any line of
the cache. This means that the word id bits are used to identify which
word in the block is needed, but the tag becomes all of the remaining
bits. This enables the placement of any word at any place in the cache
memory. It is considered to be the fastest and the most flexible mapping
form.
7.4.3. Set-associative Mapping
This form of mapping is an enhanced form of direct mapping where the
drawbacks of direct mapping are removed.
Set associative addresses the problem of possible thrashing in the direct mapping
method. It does this by saying that instead of having exactly one line that a block
can map to in the cache, we will group a few lines together creating a set. Then a
block in memory can map to any one of the lines of a specific set.
Set-associative mapping allows that each word that is present in the cache can
have two or more words in the main memory for the same index address.
Set associative cache mapping combines the best of direct and associative cache
mapping techniques.
7.5. External memory
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 Technology
3. Optical Disk
4. Magnetic Tape
7.5.1. Magnetic Disk
A magnetic Disk:- is a type of secondary memory that is a flat disc
covered with a magnetic coating to hold information. It is used to store
various programs and files. The polarized information in one direction is
represented by 1, and vice versa. The direction is indicated by 0.
Magnetic disks are less expensive than RAM and can store large amounts
of data, but the data access rate is slower than main memory because of
secondary memory. Data can be modified or can be deleted easily in the
magnetic disk memory. It also allows random access to data .
7.5.2. RAID Technology
RAID (redundant array of independent disks):- is a data storage
virtualization technology that combines multiple physical disk drive
components into one or more logical units for data redundancy,
performance improvement, or both.
It is a way of storing the same data in different places on multiple
hard disks or solid-state drives to protect data in the case of a drive
failure. A RAID system consists of two or more drives working in
parallel. These can be hard discs, but there is a trend to use SSD
technology (Solid State Drives).
RAID combines several independent and relatively small disks into
single storage of a large size.
The disks included in the array are called array members.
The disks can combine into the array in different ways, which are
known as RAID levels.
Each of RAID levels has its own characteristics of:
Fault-tolerance is the ability to survive one or several disk failures.
Performance shows the change in the read and writes speed of the
entire array compared to a single disk.
The array's capacity is determined by the amount of user data
written to the array. The array capacity depends on the RAID level
and does not always match the sum of the RAID member disks' sizes.
To calculate the particular RAID type's capacity and a set of member
disks, you can use a free online RAID calculator.
7.5.3. Optical Disc
An Optical disc :-is an electronic data storage medium that is also
referred to as an optical disk, optical storage, optical media, Optical
disc drive, disc drive, which reads and writes data by using optical
storage techniques and technology.
An optical disc, which may be used as a portable and secondary
storage device, was first developed in the late 1960s. James T. Russell
invented the first optical disc, which could store data as micron-sized
light and dark dots.
An optical disc can store more data and has a longer lifespan than the
preceding generation of magnetic storage medium.
To read and write to CDs and DVDs, computers use a CD writer or
DVD writer drive, and to read and write to Blu-ray discs, they require
a Blu-ray drive.
MO drives, such as CD-R and DVD-R drives, are used to read and
write information to discs (magneto-optic).
The CDs, Blu-ray, and DVDs are the most common types of optical
media, which are usually used to:
They are used to transfer data to various devices or computers.
These media are used to deliver the software to others.
They help users to hold large amounts of data, like videos, photos,
music, and more.
Also, optical media are used to get back up from a local machine.
7.5.4. Magnetic Tape
Magnetic tape:-is a type of physical storage media for different
kinds of data.
It is considered an analog solution, in contrast to more recent types
of storage media, such as solid state disk (SSD) drives.
Magnetic tape has been a major vehicle for audio and binary data
storage for several decades, and is still part of data storage for some
systems.
Originally, magnetic tape was designed to record sound. In computing, it
holds binary data. In recent years, magnetic tape devices have become more
scarce with the emergence of digital imaging and audiovisual media storage.
Magnetic tape was used in many of the larger and less complex mainframe
computers that predated today’s personal computers (PC).
One use of magnetic tape that still exists is tape vaulting for the storage of
physical records. In this process, technicians and other professionals back up
digital data to magnetic tape to secure it in physical vaults as a redundant
strategy in the event of disasters or other emergencies.
THANKYOU!
THE END!