Documente Academic
Documente Profesional
Documente Cultură
8.2
Swapping
A process can be swapped temporarily out of memory to a backing
store, and then brought back into memory for continued execution
8.3
OS
OS
OS
process 5
process 5
process 5
process 5
process 9
process 9
process 8
process 2
process 10
process 2
process 2
8.4
process 2
ordered by size
Worst-fit: Allocate the largest hole; must also search entire list
First-fit and best-fit better than worst-fit in terms of speed and storage
utilization
8.5
Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600
KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms
place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)?Which
algorithm makes the most efficient use of memory?
8.6
8.7
Fragmentation Issues
External Fragmentation total memory space exists to satisfy a
I/O problem
8.8
Paging
Divide physical memory into fixed-sized blocks called frames. Keep
8.9
Address translation
8.10
Free Frames
After allocation
Before allocation
Operating System Concepts 8th Edition
8.11
The two memory access problem can be solved by the use of a special
8.12
8.13
If a TLB hit takes 1 clock cycle, a miss takes 30 clock cycles, and the
miss rate is 1%, the effective memory cycle rate for page mapping
1*0.99 + (1+30)X0.01=1.30
8.14
Hit ratio =
Effective Access Time (EAT)
EAT = (1 + ) + (2 + )(1 )
=2+
8.15
Shared Pages
Shared code
The pages for the private code and data can appear anywhere in
the logical address space
8.16
8.17
8.18
8.19
Since the page table is paged, the page number is further divided into:
page number
pi
page offset
p2
10 outer10
where pi is an index into the
page table, 12
and p2 is the displacement within the
page of the outer page table
8.20
Address-Translation Scheme
8.21
Segmentation
Memory-management scheme that supports user view of memory
A program is a collection of segments
8.22
8.23
1
2
3
user space
8.24
Segmentation Architecture
Logical address consists of a two tuple:
<segment-number, offset>,
Segment table maps two-dimensional physical addresses; each
8.25
Segmentation Hardware
8.26
Example of Segmentation
8.27