0% found this document useful (0 votes)
13 views6 pages

Chapter-3 - Paging and Segmentation

operating system

Uploaded by

Belete Siyum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Chapter-3 - Paging and Segmentation

operating system

Uploaded by

Belete Siyum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Paging

► Logical address space of a process can be made


noncontiguous;
► Divide physical memory into fixed-sized blocks called
frames (size is power of 2, between 512 bytes and 8,192
bytes)
► Divide logical memory into blocks of same size called
pages
► Page size is equals to frame size.
► To run a program of size n pages, need to find n free
frames
Paging (cont’d)
2

► Set up a page table to translate logical to physical addresses


► Address generated by CPU is divided into:
I. Page number (p): used as an index into a page table
► Page table: 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 number page offset
p d
m -n n

Address Translation Architecture


Paging (cont’d)
3

Paging Hardware
Paging (cont’d)
4

► The page size is defined by the hardware.


► The size of a page is typically a power of 2 varying between
512 bytes and 8192 bytes per page, depending on the
computer architecture.
► If the size of logical address space is 2m, and a page size is
2n addressing units
► Then the high-order m - n bits of a logical address
designate the page number,
► The n low-order bits designate the page offset
Paging (cont’d)
5

Fig: Example of paging


Paging (cont’d)
6

Explanation
1.Extract the page number p and use it as an index in the page
table
2.Extract the corresponding frame number f from the physical
memory to page table
3.Replace the page number p in the logical address with the
frame number f
4.As the offset doesn’t change, it is not replaced and the frame
number f now comprises the physical address

You might also like