What is the difference between the Page Size and Page Table Entry size

Surya Teja Vemparala picture Surya Teja Vemparala · Sep 22, 2016 · Viewed 7.4k times · Source

I am not able to understand the difference between Page Size and Page Table Entry size.

From my understanding, Page size is used to divide the Page table in equal no. of blocks called Pages and the same size is used to divide the main memory into frames.

Page Size = Frame Size.

Sorry for poor drawing skills. This is my visualization of the Page Table

enter image description here

Where as Page Table Entry Size is the size occupied by the each page entry. So,

Page Table Entry Size = Page Size.

But Page Table entry size is calculated by the number of bits in the frame number.

Can anyone please explain how Page Size differs from Page Table Entry size? Why Page Table Entry size is calculated basing on No. of bits in the frame instead of the page?

Please help me visualize how exact the page table will be with all the above components

Answer

user3344003 picture user3344003 · Oct 4, 2016

Why Page Table Entry size is calculated basing on No. of bits in the frame instead of the page?

The PAGE FRAME size is always the same as the PAGE size.

Can anyone please explain how Page Size differs from Page Table Entry size?

The PAGE TABLE ENTRY Size is dependent upon the PAGE size but is not calculated rom it.

A PAGE TABLE is a data structure that defines the logical address space of a process. A process address space consists of a set of PAGES. The size of a page can be any multiple of 2. The smallest page size I have seen is 512 bytes and the largest can be megabytes (or possibly gigabytes).

A PAGE TABLE is composed of PAGE TABLE ENTRIES. A PAGE TABLE ENTRY describes a single page in the process's logical address space. A PAGE TABLE ENTRY identifies the physical page frame that the logical page maps to and the attributes of the page.

A PAGE TABLE ENTRY then requires some number of bits to describe the page and some number of bits to maps the page to a physical page frame.

PAGE TABLE ENTRIES are always powers of 2 in size and are typically 4, 8, or 16 bytes long. Thus PAGE sizes are orders of magnitude larger than PAGE TABLE ENTRIES sizes.

The number of bits used to map PAGE to PAGE FRAMES is

  maximum amount of physical memory / page size

Larger physical memory support => larger page table entries.

Larger PAGE size => smaller page table entries.

If a system wants to support 2^32 bytes of memory using 512 (2^9) byte PAGES, it needs 2^23 bits in a PAGE TABLE ENTRY to map logical pages to physical page frames. That would leave 9 bits for PAGE description in a 32-bit PAGE TABLE ENTRY.