KAR
KAR

Reputation:

How do I calculate page table size?

I would like to know how to calculate the size of the page table (in bytes) if there is one entry per page, each entry requires 4 bytes and my page size is 64KB.

Upvotes: 7

Views: 19785

Answers (5)

Moh KHALID
Moh KHALID

Reputation: 1

Size of page table =no. of page table entry*size of one entry . No of page table entry =logical address space /size of one page

Upvotes: 0

rharrison33
rharrison33

Reputation: 1282

Size of PageTable (bytes) = Number of Entries in PageTable * Size of Entry

Number of Entries in PageTable = Size of Memory / PageSize

Size of Entry = 4 Bytes in this case.

Plug and Chug.

Upvotes: 16

user221831
user221831

Reputation:

I think it is not so simple, doesn't have each page table entry something like valid, reference, or dirty bits, if all 3 are included the table for 1000 pages would have to have size like 1000x(4x8+3) in bits. Let me know if I am correct because this is my homework also ;-).

Upvotes: 0

Simon Knights
Simon Knights

Reputation: 1294

Number-of-pages * page-table-entry-size should give the answer. The page table just contains addresses of pages; page size is irrelevant.

So if you have 1000 pages then the page table size is 4*1000, if you have 1000000 pages then its 4*1000000.

Upvotes: 0

Spoike
Spoike

Reputation: 121802

Since you didn't clearly specify what you mean with KB you could mean either a kilobyte (kB), that is 1000 bytes, and kibibyte (KiB). that is 1024 bytes.

Pagetable size in bytes can be calculated through multiplication.

Upvotes: 0

Related Questions