Essay on Docx

1329 Words Dec 26th, 2015 6 Pages
Lecture
7:
Memory
Management

CSE
120:
Principles
of
Opera>ng
Systems


UC
San
Diego:
Summer
Session
I,
2009

Frank
Uyeda


Announcements

• PeerWise
ques>ons
due
tomorrow.

• Project
2
is
due
on
Friday.

– Milestone
on
Tuesday
night.


• Homework
3
is
due
next
Monday.


2


Goals
for
Today

• Mo>va>on
for
Memory
Management

• Understand
Paging

– How
to
translate
from
virtual
to
physical
address

– Determine
size,
structure
of
page
tables


3


Memory
Management

• Goals
of
memory
management


– Provide
a
convenient
abstrac>on
for
programming

– Allocate
scarce
memory
resources
among
compe>ng
 processes – Maximize
performance
with
minimal
overhead


• Mechanisms


– Physical
and
virtual
…show more content…
7


Virtual
Addresses

• Processes
access
memory
using
a
virtual
address

– The
virtual
address
is
not
the
same
as
the
physical
RAM
address
in
which
it
resides

– The
OS
(hardware
MMU)
translates
the
virtual
address
into
the
physical
RAM
address

– Who
determines
the
mapping
for
the
transla>on?


0xFFF…..
(Ending
Address)


Stack


SP

Address
Space


Heap

Data
Segment


PC

0x00…….
(Star>ng
Address)


Text
Segment

8


Virtual
Addresses

• Processes
access
memory
using
a
virtual
address


– The
virtual
address
is
not
the
same
as
the
physical
RAM
address
in
which
it
resides

– The
OS
(hardware
MMU)
translates
the
virtual
address
into
the
physical
RAM
address

– Who
determines
the
mapping
for
the
transla>on?

Virtual
Memory


0xFFF…..
(Ending
Address)


Physical
Memory


Stack


Stack


SP


…..


MMU


Address
Space


Heap

Data
Segment

PC

0x00…….
(Star>ng
Address)


Heap

Data
Segment


Text
Segment


Text
Segment

9


Virtual
Addresses

• Processes
access
memory
using
a
virtual
address


– The
virtual
address
is
not
the
same
as
the
physical
RAM
address
in
which
it
resides

– The
OS
(hardware
MMU)
translates
the
virtual
address
into
the
physical
RAM
address

– Who
determines
the
mapping
for
the
transla>on?

Virtual
Memory


0xFFF…..
(Ending
Address)


Physical
Memory


Text
Segment


Stack


SP


Heap

MMU


Address

Related Documents