




































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





































VMQuery()
VirtualFree()
VirtualLock()
ZeroMemory()
VirtualAlloc()
sbrk() exec()
getrlimit() shmalloc() System Calls
Hardware
Contemporary Memory Hierarchy &
Dynamic Loading
CPU Registers “Main” Memory
Rotating Magnetic Memory
Optical Memory
Sequentially Accessed Memory
Larger storage
Faster access
Address Space vs Primary Memory
Hardware Primary Memory
Process Address Space
Mapped to objectother than memory
The Relocatable Object module
Code Segment Relative Address
Generated Code
entry
proc_a
load
store
push
call
‘put_record’
External
reference
table
‘put_record’
External definition table
‘proc_a’ 0008
(symbol table)
(last location in the code segment)
Data Segment Relative Address
Generated variable space
[Space for gVar
variable]
(last location in the data segment)
Relative Address
Generated Code
(Other process’s programs)
(Other modules)
entry
proc_a
[Space for gVar
variable]
load
store
push
call
(End of proc_a)
(Other modules)
entry
put_record
(optional symbol table)
(last location in the code segment)
(first location in
the data segment)
[Space for gVar
variable]
(Other process’s programs)
-^
Internal fragmentation: Memory in a regionthat a process does not need (
r-x
) is wasted.
-^
Memory requirements of a process may growover time (dynamic memory). What if thememory requirements exceed the allocatedregion size?
OperatingSystemRegion 0Region 1Region 2^ Region 3
N
N
N
N
pi
pi
needs n
unitsi
ni