Paging_merged
Paging_merged
Introduction
• Paging is a memory management technique in
which the memory is divided into fixed size
pages. Paging is used for faster access to data.
When a program needs a page, it is available
in the main memory as the OS copies a certain
number of pages from your storage device to
main memory. Paging allows the physical
address space of a process to be
noncontiguous.
Paging
• Logical address space of a process can be noncontiguous;
process is allocated physical memory whenever it is available.
Avoids external fragmentation
Example:
14 bit address : size of logical ADDRESS SPACE
IN CASE OF 1 BYTE ADDRESSABLE
Example:
14 bit address : size of logical ADDRESS SPACE
IN CASE OF 1 BYTE ADDRESSABLE
4
1
3 2
4
Contiguous Allocation
• Each process allocated a single contiguous
chunk of memory
Non-contiguous Allocation
• Parts of a process can be allocated non
contiguous chunks of memory
Contiguous Allocation
Example
• Seek Time = 8ms
• Transfer Time = 200ms
• Swap Time = 208ms
Chapter 9: Memory Management
• Background
• Swapping
• Contiguous Allocation
• Paging
• Segmentation
• Segmentation with Paging
• Single-partition allocation
– Relocation-register scheme used to protect user processes
from each other, and from changing operating-system
code and data.
– Relocation register contains value of smallest physical
address; limit register contains range of logical addresses –
each logical address must be less than the limit register.
OS OS OS OS
process 8 process 10
4
1
3 2
4
• Sharing.
– shared segments
– same segment number
• Allocation.
– first fit/best fit
– external fragmentation