Professional Documents
Culture Documents
Lecture20 21 22
Lecture20 21 22
Main memory and the registers built into the processor itself are
the only storage that the CPU can access directly.
PROGRAM 0
j 1200
OS OS OS OS OS OS OS OS OS
compaction
P1 P1 P1 P1 P1 P5 P5
P4
P4 P4 P4
P2 P2
P3
P3 P3 P3 P3 P3 P6
Divide physical memory into fixed- Virtual Physical
sized blocks called frames (size is Page # Page #
power of 2, between 512 bytes and 0x0000 0x0000
0 0
8192 bytes)
1 1
2 2
Divide logical memory into blocks of 3 3
same size called pages.
4 4
5 5
0x6000
Any virtual page can be located at any 6
physical page
0x0000 7
0
8
Translation box converts from virtual 1
pages to physical pages 9
2
10
3
0x4000 11
12
Translation
13 0xE000
Address generated by CPU is divided into:
◦ Page number (p) – used as an index into a page table
which contains base address of each page in physical
memory
◦ Page offset (d) – combined with base address to define the
physical memory address that is sent to the memory unit
Page Size=
4bytes
Physical
Memory=
32bytes
In paging we have no external fragmentation. Any free frame
can be allocated to a process that needs it. However, we may
have some internal fragmentation?