Memory Organization in Computers

undefined
 
MEMORY
 
ORGANIZATION
 
1
 
MEMORY
 UNIT
 
2
 
an 
essential 
component in 
any 
general 
purpose 
computer 
since
 
it
is 
needed 
to 
store 
programs 
and
 
data.
memory 
unit 
that 
communicates 
directly 
with 
the 
CPU 
=
 
main
memory
devices 
that 
provide 
backup 
storage 
= 
auxiliary
 
memory.
Auxiliary 
memory 
devices are 
used 
to 
store 
system 
programs,
large 
data 
files 
and 
other 
backup 
information. 
Only
 
programs
and 
data 
currently 
needed 
by 
the 
processor 
reside 
in 
main
memory. 
All 
other 
information 
is 
stored 
in 
main 
memory 
and
transferred 
to 
main 
memory 
when
 
needed.
 
3
M
e
m
o
r
y
 
U
n
i
t
 
C
a
c
h
e
 
M
e
m
o
r
y
 
Memory 
that 
lies 
in 
between 
main
 
memory
and
 
CPU
Holds those 
parts 
of 
the 
program 
and
 
data
that 
are 
most 
heavily
 
used
increases 
the 
overall 
processing 
speed 
of 
the
computer 
by 
providing 
frequently 
required
data 
to 
the 
CPU 
at 
a 
faster
 
speed.
 
4
 
M
a
i
n
 
M
e
m
o
r
y
 
Memory 
unit 
that 
communicates 
directly 
with
 
CPU
Programs 
and 
data 
currently 
needed 
by 
the
processor 
reside
 
here
Also 
known 
as 
primary
 
memory
RAM 
and
 
ROM
 
5
 
A
u
x
i
l
i
a
r
y
 
M
e
m
o
r
y
 
Made 
of 
devices 
that 
provide 
backup
 
storage
Magnetic 
tapes, 
Magnetic
 
disks
At 
the 
bottom 
of 
the 
hierarchy 
are 
the 
relatively
slow 
magnetic 
tapes 
used 
to 
store 
removable 
files
whereas 
at 
the 
top 
level, 
magnetic 
disks 
used 
as
backup
 
storage
 
6
 
Sequential 
Access
 
Memory
A 
class 
of 
data 
storage 
device 
that 
read 
their 
data 
in
 
sequence
Are usually 
a 
form 
of 
magnetic
 
memory
Typically 
used 
for 
secondary 
storage 
in 
general-purpose computers 
due 
to 
their 
higher 
density,
resistance 
to 
wear 
and
 
non-volatility
Eg: 
hard 
disk, 
CD-ROMs, 
magnetic 
tapes
 
etc
 
Random 
Access
 
Memory
Is a 
form 
of 
computer 
data
 
storage
Allows 
stored 
data 
to 
be 
accessed 
in 
any
 
order
Associated 
with 
volatile 
types 
of
 
memory
Type: 
SRAM 
and
 
DRAM
 
7
M
e
m
o
r
y
 
T
y
p
e
s
 
To 
obtain 
the 
highest 
possible 
access 
speed 
while 
minimizing
 
the
total 
cost 
of 
the 
memory
 
system
Consists 
of 
all storage 
device 
in 
a 
computer 
system 
(auxiliary, 
cache,
main 
, 
high 
speed 
registers 
and 
processing
 
logic)
 
 
 
M
e
m
o
r
y
 
H
i
e
r
a
r
c
h
y
 
8
undefined
 
9
undefined
 
Magnetic
 
disk
 
I/O
 
Processor
 
Ma
i
n
 
Memory
 
CPU
 
Ca
c
he
 
Memory
 
10
Magnetic
tapes
 
Fig: 
Memory 
Hierarchy 
in 
a 
Computer
 
System
 
MAIN
 
MEMORY
 
11
 
M
a
i
n
 
m
e
m
o
r
y
 
12
Basic 
memory 
of 
the
 
computer
Temprorary 
memory 
except
 
ROM
Faster 
for 
read 
write
 
operation
Expensive 
internal 
memory 
so 
not 
portable.
 
R
A
M
Volatile
 
memory.
Store
 the
 
information 
required 
during
 
processing
Two 
types 
of 
random 
Static 
R
AM
(SRAM) 
and 
Dynamic
R
AM
(DRAM)
 
Information 
is 
stored 
in 
form
 
of
 
voltage
faster
 
Loses 
its 
content 
after
 
few
 
seconds
 
Information 
is 
stored 
in
 
the
 
form 
of
 
charge
slower
 
SRAM
Does 
not 
lose 
its 
content
 
until
computer 
is 
turned
 
off
 
DRAM
 
T
Y
P
E
S
 
O
F
 
R
A
M
 
13
 
Permanent
 
memory
Store
 the
 
information 
required 
for 
computer
 
operations
Types 
of
 
ROM 
(PROM,EPROM,EEPROM)
 
R
O
M
 
14
 
Boot 
Strap
 
loader
 
Initial 
program 
whose 
function 
is 
to 
start 
the 
computer 
operating
system 
after 
the 
power
 
is
 
turned
 
on. 
and 
it 
is 
stored 
in 
the 
ROM
portion 
of 
the 
main 
memory
.
Computer 
start 
up 
:starting 
the execution 
of 
initial 
program
 
after
computer 
is 
turned
 
on
Boot 
strap 
loader 
loads 
the 
portion 
of 
disk 
to 
main 
memory 
and
control 
is 
then 
transferred 
to
 OS
.
 
15
 
The 
most 
common 
auxilliary 
device used 
in the computer
system
 
is
 
magnetic 
disk 
and 
magnetic
 
tape.
 
Store 
large 
amount 
of 
data
 
permanantly.
Portable
 
T
y
p
e
s
 
o
f
 
a
u
x
i
l
l
i
a
r
y
 
m
e
m
o
r
y
Magnetic
 
disk
Magnetic
 
tape
 
A
u
x
i
l
i
a
r
y
 
m
e
m
o
r
y
(
S
E
C
O
N
D
A
R
Y
 
M
E
M
O
R
Y
)
 
16
 
circular 
plate 
,made 
of 
metal 
or 
plastic 
coated 
with 
magnetize
material. High
 
speed 
of
 
rotation
 
Bits 
are 
store 
in 
a 
concentric 
circle called
 
tracks.
Division 
of 
tracks 
are 
called
 
sectors
.
 
M
a
g
n
e
t
i
c
 
d
i
s
k
 
17
 
Magnetic
 
disk
 
18
 
Sequential 
access 
memory 
used 
for 
storing,backup,audio,video 
data 
etc
 
.
Highly 
reliable
 
memory.
Slower 
for 
read 
write
 
operation.
 
M
a
g
n
e
t
i
c
 
t
a
p
e
 
19
 
Magnetic
 
tape
 
20
undefined
RAM 
AND 
ROM
 
CHIP
 
21
 
RAM 
AND 
ROM
 
CHIPS
 
22
RAM
 
chip:
 
Used 
for 
communication 
with 
the 
CPU 
if 
one 
or
more 
control
 
inputs.
requires 
7-bit 
address 
and 
an 
8-bit 
bidirectional
data
 
bus.
chip
 
select
 
(CS)
 
are 
for 
enabling 
the
 
chip.
 
Fig. 
RAM
 
chip
 
23
 
 
when 
CS1=1 
and 
(CS2)’=0, 
the 
unit 
in 
operation.
 
High 
impedance 
state 
indicates 
open
 
circuit.
 
When 
CS1=1 
and 
(CS2)’=0, 
the 
memory 
is 
places 
in 
a 
R/W
 
mode.
 
When 
the 
RD 
input 
is 
enabled, 
the 
content 
of 
the 
selected 
byte 
is 
placed 
into
 
the
data
 
bus.
 
24
 
ROM
 
chip
 
25
 
A 
ROM 
chip 
is
 
unidirectional.
 
26
9 
address 
lines 
to 
address 
512
 
bytes.
 
 
chip
 
s
e
lect
 
C
S
1
=
1
 
and
 
(C
S
2
)’
=
0
 
for
 
the
 
unit
 
to
operate.
 
Other
w
i
s
e,
 
the
 
data
 
bus
 
i
n
 
a
 
hig
h
-
i
m
ped
a
nce
state.
 
VIRTUAL
 
MEMORY
 
27
 
Attempts 
to 
optimize 
the 
use 
of 
the 
main 
memory(the
 
high
 
speed 
portion) with 
the 
hard 
disk 
(the 
lower 
speed
 
portion).
Technique 
for 
using 
the 
secondary 
storage 
to 
extend 
the
apparent 
limited 
size 
of 
the 
physical 
memory beyond 
its
physical 
size
 
.
Implemented 
since 
the 
available physical 
memory 
will 
not
 
be
enough 
to 
host 
all 
the
 
program.
 
28
 
Address space 
and 
Memory
 
space
 
An 
address 
used 
by 
the 
programmer 
is 
virtual 
memory 
, 
the 
set
of 
such 
address
 
is
 
called
 
address
 
space.
 
An 
address 
in 
main 
memory 
is
 
location 
,the
 
set 
of 
such 
location
is
 
called
 
memory
 
space.
Example:
 
consider
 
main 
memory 
:32k 
words(k=1024)=2^15 
and
auxiliary 
memory 
1024k 
words=2^20(to 
address 
15 
bits 
of
physical 
memory 
and 
20 
bits 
of 
virtual 
memory 
is
 
required)
 
29
undefined
 
.
 
30
undefined
 
.
 
31
 
In 
our 
example 
we 
have 
20-bit 
address 
of 
an 
instruction 
(to 
refer
20-bit 
virtual 
address) 
but 
physical 
memory 
addresses 
are 
specified
with 
15-bits. 
So 
a 
table 
is
 
needed
to 
map 
a 
virtual 
address 
of 
20-bits 
to 
a 
physical 
address 
of
 
15-bits.
 
Mapping 
is 
a 
dynamic 
operation, 
which 
means 
that 
every 
address 
is
translated 
immediately 
as 
a 
word 
is 
referenced 
by
 
CPU.
undefined
 
32
 
A
d
d
r
e
s
s
 
M
a
p
p
i
n
g
 
u
s
i
n
g
 
P
a
g
e
s
 
B
l
o
c
k
s
 
(
o
r
 
p
a
g
e
 
f
r
a
m
e
)
:
 
B
l
o
c
k
s
 
a
r
e
 
t
h
e
 
g
r
o
u
p
s
 
o
f
e
q
u
a
l
 
s
i
z
e
 
w
h
i
c
h
 
a
r
e
 
b
r
o
k
e
n
 
d
o
w
n
 
f
r
o
m
 
p
h
y
s
i
c
a
l
m
e
m
o
r
y
 
a
n
d
 
r
a
n
g
e
s
 
f
r
o
m
 
6
4
 
t
o
 
4
0
9
6
w
o
r
d
s
 
e
a
c
h
.
P
a
g
e
s
:
 
r
e
f
e
r
s
 
t
o
 
a
 
p
o
r
t
i
o
n
 
o
f
 
s
u
b
d
i
v
i
d
e
d
 
v
i
r
t
u
a
l
m
e
m
o
r
y
 
h
a
v
i
n
g
 
s
a
m
e
 
s
i
z
e
 
a
s
 
b
l
o
c
k
s
 
i
.
e
.
 
g
r
o
u
p
s
o
f
 
a
d
d
r
e
s
s
 
s
p
a
c
e
.
 
33
 
Example: 
consider 
computer 
with 
address 
space 
= 
8K 
and 
memory 
space 
=
 
4K.
 
If 
we 
spit 
both 
spaces 
into
groups 
of 
1k 
words 
we
 
get
8 
pages 
and 
4
 
blocks.
 
blocks.
 
34
undefined
 
P
a
g
e
 
R
e
p
l
a
c
e
m
e
n
t
 
A 
virtual memory 
system 
is 
a 
combination 
of 
hardware 
and
software 
techniques. 
A 
memory 
management 
software 
system
handles:
Which 
page 
in 
main
 
memory
 
should
 
be 
removed 
to
 
make
room for 
a 
new
 
page?
When 
a 
new 
page 
is 
to 
be transferred 
from 
auxiliary
 
memory
to 
main
 
memory?
 
35
undefined
 
36
Where 
the 
page 
is 
to 
be 
placed 
in 
main
 
memory?
There 
are 
numerous 
page 
replacement 
algorithms, 
two 
of
 
which
are:
1.
 
First-in 
First-out 
(FIFO): 
replaces 
a 
page 
that 
has 
been 
in
memory 
longest
 
time.
2.
Least 
Recently 
Used 
(LRU): 
assumes 
that 
least 
recently 
used
page 
is 
the 
better 
candidate
 
for
removal 
than 
the 
least 
recently 
loaded
 
page.
undefined
 
 
37
 
   
When 
a 
page 
fault 
occurs 
in 
a 
virtual 
memory 
system, 
it
signifies 
that 
the 
page 
referenced 
by 
the 
program 
is 
not 
in
main 
memory. 
A 
new 
page 
is 
then 
transferred 
from 
auxiliary
memory 
to 
main 
memory. 
If 
main 
memory 
is 
full, 
it 
would 
be
necessary 
to 
remove 
a 
page 
from 
a 
memory 
block 
to 
make 
a
room for 
a 
new 
page. 
The 
policy 
for 
choosing 
pages 
to
remove 
is 
determined 
from 
the 
replacement 
algorithm 
that
 
is
used.
GOAL
: 
try 
to 
remove 
the 
page 
least 
likely 
to 
be 
referenced
 
by
in 
the 
immediate
 
future.
Memory 
Management
 
Hardware
 
38
undefined
 
Introduction
 
Collection 
of 
hardware 
and 
software 
procedures 
for
 
managing
various
 
program.
 
39
 
Basic 
component of
 
MMU
 
Sharing 
common 
program 
by 
multiple
 
user
Protection 
of 
information
 
unauthorized
 
40
 
Segmented 
Page
 
Mapping
 
Length 
of 
each 
segment 
allowed 
to 
grow 
and 
contract 
according 
need 
of
program
 
execution.
Way 
of 
specifying 
the 
length 
of 
a 
segment 
by 
associating 
with 
it 
a 
no. 
of
equal sized
 
page
Consider 
diagram
 
below
 
41
undefined
 
42
 
In 
above
 
fig:
 
Consider
Logical 
Address=Segment+page+word
segment 
specifies 
segment
 
no.
Page 
field 
specifies 
page 
within 
the
segment
Word field 
specifies 
specific
 
word
within 
the
 
page
 
43
undefined
 
44
undefined
 
45
Slide Note
Embed
Share

Delve into the intricate world of memory organization within computer systems, exploring the vital role of memory units, cache memory, main memory, auxiliary memory, and the memory hierarchy. Learn about the different types of memory, such as sequential access memory and random access memory, and how they contribute to the overall performance and efficiency of a computer. Unravel the complexities of memory systems to enhance your understanding of computing fundamentals.

  • Memory Organization
  • Computer Systems
  • Memory Units
  • Cache Memory
  • Main Memory

Uploaded on Jul 10, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. MEMORYORGANIZATION 1

  2. 2 MEMORY UNIT

  3. Memory Unit 3 an essential component in any general purpose computer sinceit is needed to store programs and data. memory unit that communicates directly with the CPU = main memory devices that provide backup storage = auxiliarymemory. Auxiliary memory devices are used to store system programs, large data files and other backup information. Only programs and data currently needed by the processor reside in main memory. All other information is stored in main memory and transferred to main memory when needed.

  4. CacheMemory 4 Memory that lies in between main memory and CPU Holds those parts of the program and data that are most heavily used increases the overall processing speed of the computer by providing frequently required data to the CPU at a fasterspeed.

  5. 5 Main Memory Memory unit that communicates directly with CPU Programs and data currently needed by the processor reside here Also known as primary memory RAM and ROM

  6. 6 Auxiliary Memory Made of devices that provide backup storage Magnetic tapes, Magnetic disks At the bottom of the hierarchy are the relatively slow magnetic tapes used to store removable files whereas at the top level, magnetic disks used as backup storage

  7. Memory Types 7 Sequential Access Memory A class of data storage device that read their data in sequence Are usually a form of magnetic memory Typically used for secondary storage in general-purpose computers due to their higher density, resistance to wear and non-volatility Eg: hard disk, CD-ROMs, magnetic tapes etc Random Access Memory Is a form of computer data storage Allows stored data to be accessed in anyorder Associated with volatile types of memory Type: SRAM and DRAM

  8. Memory Hierarchy 8 To obtain the highest possible access speed while minimizing the total cost of the memory system Consists of all storage device in a computer system (auxiliary, cache, main , high speed registers and processing logic)

  9. 9

  10. 10 Magnetic tapes Main Memory I/O Processor Magnetic disk Cache Memory CPU Fig: Memory Hierarchy in a Computer System

  11. 11 MAIN MEMORY

  12. Main memory 12 Basic memory of the computer Temprorary memory except ROM Faster for read write operation Expensive internal memory so not portable. RAM Volatile memory. Store the information required during processing Two types of random Static RAM(SRAM) and Dynamic RAM(DRAM)

  13. TYPES OF RAM 13 DRAM SRAM Loses its content after few seconds Does not lose its content until computer is turned off Information is stored in form of voltage Information is stored in the form of charge faster slower

  14. 14 ROM Permanent memory Store the information required for computer operations Types of ROM (PROM,EPROM,EEPROM)

  15. Boot Straploader 15 Initial program whose function is to start the computer operating system after the power is turned on. and it is stored in the ROM portion of the main memory. Computer start up :starting the execution of initial program after computer is turned on Boot strap loader loads the portion of disk to main memory and control is then transferred to OS.

  16. Auxiliary memory(SECONDARY MEMORY) 16 The most common auxilliary device used in the computer systemis magnetic disk and magnetic tape. Store large amount of datapermanantly. Portable Types of auxilliary memory Magnetic disk Magnetic tape

  17. Magnetic disk 17 circular plate ,made of metal or plastic coated with magnetize material. High speed of rotation Bits are store in a concentric circle called tracks. Division of tracks are called sectors.

  18. Magnetic disk 18

  19. Magnetic tape 19 Sequential access memory used for storing,backup,audio,video data etc . Highly reliable memory. Slower for read write operation.

  20. Magnetic tape 20

  21. 21 RAM AND ROMCHIP

  22. RAM AND ROMCHIPS 22 RAM chip: Used for communication with the CPU if one or more control inputs. requires 7-bit address and an 8-bit bidirectional data bus. chipselect (CS) are for enabling the chip.

  23. Fig. RAM chip 23

  24. 24 when CS1=1 and (CS2) =0, the unit in operation. High impedance state indicates opencircuit. When CS1=1 and (CS2) =0, the memory is places in a R/W mode. When the RD input is enabled, the content of the selected byte is placed intothe data bus.

  25. ROM chip 25

  26. A ROM chip isunidirectional. 26 9 address lines to address 512bytes. chip select CS1=1 and (CS2) =0 for the unit to operate. Otherwise, the data bus in a high-impedance state.

  27. 27 VIRTUAL MEMORY

  28. 28 Attempts to optimize the use of the main memory(thehigh speed portion) with the hard disk (the lower speedportion). Technique for using the secondary storage to extend the apparent limited size of the physical memory beyond its physical size . Implemented since the available physical memory will not be enough to host all the program.

  29. Address space and Memory space 29 An address used by the programmer is virtual memory , the set of such address is called address space. An address in main memory is location ,the set of such location is called memory space. Example: consider main memory :32k words(k=1024)=2^15 and auxiliary memory 1024k words=2^20(to address 15 bits of physical memory and 20 bits of virtual memory is required)

  30. . 30

  31. . 31 In our example we have 20-bit address of an instruction (to refer 20-bit virtual address) but physical memory addresses are specified with 15-bits. So a table is needed to map a virtual address of 20-bits to a physical address of 15-bits. Mapping is a dynamic operation, which means that every address is translated immediately as a word is referenced by CPU.

  32. 32

  33. Address Mapping using Pages 33 Blocks (or page frame): Blocks are the groups of equal size which are broken down from physical memory and ranges from 64 to 4096wordseach. Pages: refers to a portion of subdivided virtual memory having same size as blocks i.e. groups of address space.

  34. Example: consider computer with address space = 8K and memory space = 4K. 34 If we spit both spaces into groups of 1k words we get 8 pages and 4 blocks. blocks.

  35. 35 Page Replacement A virtual memory system is a combination of hardware and software techniques. A memory management software system handles: Which page in main memory should be removed to make room for a new page? When a new page is to be transferred from auxiliarymemory to main memory?

  36. 36 Where the page is to be placed in mainmemory? There are numerous page replacement algorithms, two of which are: First-in First-out (FIFO): replaces a page that has been in memory longest time. 2. Least Recently Used (LRU): assumes that least recently used page is the better candidate for removal than the least recently loaded page. 1.

  37. 37 When a page fault occurs in a virtual memory system, it signifies that the page referenced by the program is not in main memory. A new page is then transferred from auxiliary memory to main memory. If main memory is full, it would be necessary to remove a page from a memory block to make a room for a new page. The policy for choosing pages to remove is determined from the replacement algorithm that is used. GOAL: try to remove the page least likely to be referencedby in the immediate future.

  38. 38 Memory Management Hardware

  39. Introduction 39 Collection of hardware and software procedures for managing various program.

  40. Basic component of MMU 40 Sharing common program by multiple user Protection of information unauthorized

  41. Segmented Page Mapping 41 Length of each segment allowed to grow and contract according need of program execution. Way of specifying the length of a segment by associating with it a no. of equal sized page Consider diagram below

  42. 42

  43. In above fig: Consider Logical Address=Segment+page+word segment specifies segment no. Page field specifies page within the segment Word field specifies specific word within the page 43

  44. 44

  45. 45

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#