XML

kent logo

CO527 Anonymous Questions and Answers Keyword Index

This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.

To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.

Keyword reference for paging

2014

Question 13 (2014):

Submission reference: IN3515

I'm having difficulty understanding why the amount of physical memory addressable in a system is the page-size * size of a page table entry. Help?

Answer 13:

Close, but not exactly: it's the page-size * 2^(PFN-bits-in-PTE). Physical memory is divided into page-frames, each a page big and referred to by its page-frame-number (PFN). The physical location of any page is given by the PFN in some page-table-entry (PTE). Thus, the range of physical addresses that can be generated (or the biggest PFN) is limited by the number of bits available for the PFN in the PTE, and that quantity is 2 raised to the power of the number of bits for the PFN. That limits how many different page-frames can be identified, and thus, how much physical memory can be addressed.

As an example, consider a (daft) machine that uses 8k (8192-byte) pages, but only has 6 bits available in the PTE for the PFN. That means there can only be 64 (2^6) different page-frames, and since each frame is 8k big, the maximum amount of addressable memory is 64*8k = 512k (half a megabyte).

I realise my explanation is a bit wooly, but diagrams are a great asset here.

Keywords: paging

2013

Question 123 (2013):

Submission reference: IN3001

I'm having trouble answering this question:

"Assuming a page size of 2^12 (4096) bytes, how much physical memory is addressable in a system using paging of this style? (show your working)."

I know that each PTE is 4KB and a VM has 4gb of addressable memory. According to people I revise with I need to know the number of bits that contains a PFN. How would I calculate this?

To calculate the address space would I then divide the 2^12 by the answer of the PFN?

Answer 123:

There's not enough information in what you've written to answer this: you need to know the number of bits allocated for a PFN in an individual PTE. That tells you how many possible page-frames can be addressed, and given you know the page size, you can easily work out the maximum amount of addressable memory.

Some other points: a PTE is not 4 KiB, it's about 4 bytes (depending on the system). Dividing the page size (4096) by something won't give you anything meaningful — certainly not if you end up with an answer of the form "there are 256 bytes of memory addressable", which would be daft given that most modern machines (using paging) have gigabytes of RAM! When you get an answer to this sort of thing, ask yourself if it makes sense.

Keywords: paging

Valid CSS!

Valid XHTML 1.0!

Maintained by Fred Barnes, last modified Wed May 25 15:07:20 2016