Академический Документы
Профессиональный Документы
Культура Документы
Memory Management
Text Segment
Data Segment
Heap
Stack
Batch systems
10
11
12
13
Swapping
Process:
14
15
Storage
capacity
decreases
cache
main
memory
secondary
storage
Program and
data maybe
referenced by
the CPU directly
16
Contiguous Allocation
17
18
19
20
Memory Allocation
Fixed partitions
Dynamic/Variable partitions
21
22
23
Variable Partitions
External fragmentation
24
OS
OS
OS
process 1
process 1
process 1
process 2
process 3
Process 2
Terminates
Process 4
Starts
process 3
process 4
process 3
25
Fragmentation
26
Fragmentation cont.
27
Compaction
28
Policy examples
First Fit: scan free list and allocate first hole that
is large enough fast
Next Fit: start search from end of last allocation
Best Fit: find smallest hole that is adequate
slower and lots of fragmentation
Worst fit: find largest hole
In general, First Fit is the winner
DMMMSU-MLUC College of Information Technology, Center of Development in I.T.
29
Paging
30
Paging
31
page offset
d
m-n
32
Paging Hardware
33
34
Segmentation
35
1
2
3
user space
36
Segmentation
37
Segment Look-up
Index to segment
register table
physical memory
base
segment 0
segment #
offset
segment 1
virtual address
segment 2
<? yes
no
raise
protection fault
segment 3
Physical
Address
segment 4
38
Segmentation Hardware
39
Segmentation Example
40
END OF LECTURE
DMMMSU-MLUC College of Information Technology, Center of Development in I.T.
41