Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A computer with 2^c memory addresses and a byte-addressed memory has an implemen

ID: 652920 • Letter: A

Question

A computer with 2^c memory addresses and a byte-addressed memory has an implementation of virtual memory with page size 2^p bytes and page table entries that each occupy 2^e bits. a. Develop a formula for the size of the single-level page table in bits. b. Develop a formula for the size in bits of a two-level page table scheme. Ideally, the first- and second-level tables have the same number of entries, but this is not always possible. Use ceiling and floor functions in your formula to allow for the case where first- and second-level tables must have different numbers of entries, and, further, construct your formula to make the first level table the one with more entries. Because a second level table is not created until an entry in the first level table is marked present (defined in the text on page 207) the total size of a two-level scheme is dynamic. To complete your formula, let the number of level-one entries marked as in memory at any time be represented by the variable I.

Explanation / Answer

Formula for size of the single-level page table in bits:

There are 512K pages of physical memory (512M / 1K). This needs 19 bits to represent every page. Add that to the 4 bits of information and you get 23 bits.

With a 38-bit address house and a 10-bit (1K) page size, 2^28 entries should be page table.

Therefore 2^28 page table entries at 23 bits every 6,174,015,488 bits or 736M.

     No of page table entries=virtual address space/page size

              =2^38/2^10=2^28

That's the most size required for a single-level VM Subsystem for every method.

Now clearly that is not about to work if you simply have 512M of physical RAM thus one or two of choices are available.

       No of frames in the physical memory=(512*1024*1024)/(1*1024)=524288=2^19

The quantity of physical pages may be reduced. For instance, only enable half the memory to be subject to paging, keeping the opposite half resident in any respect time. This can save one bit per entry, not extremely enough to create a distinction.

Increase the page size. A 1K page on a 38-bit address house is the reason for the terribly chunky page tables. For instance, i believe the '386, with its 32-bit address, uses 4K pages. That might lead to 1,000,000 page table entries, so much but the 260 million needed here.

           Size of the page table=(2^28)*2.875=771751936B=736MB

Go multi-level. A little additional advanced however it primarily means the page tables themselves are subject to paging. You have got to stay the primary level of page tables resident in physical memory however the second level will come in and out as required. This can greatly scale back the physical necessities however at the price of speed, since 2 levels of page faults may occur to get at associate degree actual process page

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote