0% found this document useful (0 votes)
6 views45 pages

Memory Organization Unit-4

The document provides an overview of memory organization in computers, detailing the types of memory including main memory, cache, auxiliary memory, RAM, and ROM. It explains the hierarchy of memory systems and the concepts of virtual memory, address space, and memory management techniques. Additionally, it discusses page replacement algorithms and the role of memory management hardware in optimizing memory usage.

Uploaded by

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

Memory Organization Unit-4

The document provides an overview of memory organization in computers, detailing the types of memory including main memory, cache, auxiliary memory, RAM, and ROM. It explains the hierarchy of memory systems and the concepts of virtual memory, address space, and memory management techniques. Additionally, it discusses page replacement algorithms and the role of memory management hardware in optimizing memory usage.

Uploaded by

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

MEMORY

1 ORGANIZATION
2

MEMORY
UNIT
3 Memory Unit
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.
4 Cache
Memory
• 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.
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

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
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
8 Memory Hierarchy
• 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
10
Magnetic
tapes

Main
I/O
Memory
Processor

Magnetic disk

Cach
CP
Memory
e
U

Fig: Memory Hierarchy in a Computer


System
11

MAIN
MEMORY
12
Main memory
• 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

SRAM DRA
• M
Loses its content after
• Does not lose its content until
computer is turned off few
second
• Information is stored in form of • sInformation is stored in the
voltage form of charge
• faster • slower
14
ROM

• Permanent memory
• Store the information required for computer operations
• Types of ROM (PROM,EPROM,EEPROM)
1 Boot Strap
5
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.
16 Auxiliary
memory(SECONDARY
MEMORY)
• The most common auxilliary device used in the computer
system is magnetic disk and magnetic tape.
• Store large amount of data permanantly.
• Portable

 Types of auxilliary memory


 Magnetic disk
 Magnetic tape
17 Magnetic disk

• 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.
1
8
Magnetic
disk
19 Magnetic tape

 Sequential access memory used for storing,backup,audio,video data etc


.
 Highly reliable memory.
 Slower for read write operation.
2
0
Magnetic
tape
2
1

RAM AND ROM CHIP


RAM AND ROM
22
CHIPS
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
23 chip
24

 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.
2 ROM
5
chip
A ROM chip is unidirectional.
26

9 address lines to address 512 bytes.

 chip select CS1=1 and (CS2)’=0 for


the unit to operate.

Otherwise, the data bus in a high-


impedance state.
27

VIRTUAL
MEMORY
28

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.
2 Address space and Memory
9
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)
.
30
.
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
33 Address Mapping using
Pages
Blocks (or page frame): Blocks are the groups
of equal size which are broken down from
physical memory and ranges from 64 to
4096words each.
Pages: refers to a portion of subdivided virtual
memory having same size as blocks i.e.
groups of address space.
Example: consider computer with address space = 8K and memory space =
34 4K.
If we spit both spaces into
groups of 1k words we get
8 pages and 4 blocks.

blocks.
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 auxiliary memory
to main memory?
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.
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.
3
8

Memory Management Hardware


Introduction
39
Collection of hardware and software procedures for managing
various program.
4
0
Basic component of
MMU
 Sharing common program by multiple
user
 Protection of information unauthorized
4
1
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
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
44
45

You might also like