What is the difference between the Page Size and Page Table Entry size
Asked Answered
P

4

8

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

Phrixus answered 22/9, 2016 at 3:44 Comment(0)
O
4

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.

Oralee answered 4/10, 2016 at 14:37 Comment(0)
C
1

"Page Size = Frame Size" This is correct. Physical memory divided into chunks called "page-frames". Virtual memory divided into chunks called "pages". PTE contains the base address of a page-frame and based on the offset we decide the actual address. Refer to Understanding the Linux kernel Ch. 2 memory addressing.

Explained here in Fig-3.1

Coronary answered 24/9, 2016 at 3:56 Comment(0)
C
1

1)A Page size is given by the designer and page size=frame size

2)A frame size specifies size of each chunk by which main memory is divided.

3)The content that each page stores is an address of a frame, where in main memory is a particular frame is present.

4)Then the content you store in each page contains number of bits required to address a frame uniquely i.e (size of main memory/size of each page)

-->Let us consider an example. Let Physical address be 44 bit long Let Logical address a CPU generates be 32 bit long Let Size of each page be 4KB(12 bits)

There are (2^44)/(2^12) frames in main memory As page size== frame size

we need 44-12=32 bits to identify each frame uniquely So each page in page table must be capable of storing 32 bits. This is called size of a page table entry

Currency answered 12/4, 2020 at 17:27 Comment(0)
H
0

We know that Page size is equal to Frame size. Now, since page table represents the FRAMES corresponding to the page, then the number of bits required for page table entry should be equal to total number of bits required to represent frame number because a page can be anywhere in the main memory.

Heredes answered 24/9, 2022 at 7:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.