Calculation of virtual memory page table and translation display buffer

I am answering some issues related to virtual memory and would like to help clarify or confirm my understanding of how this is done.

The questions are as follows:

Given a byte system with 32-bit words, the virtual address space is 4 gigabytes, the physical address space is 1 gigabyte and the page size is 4 kilobytes. There is an assumption that entries in the page table are rounded to 4 bytes.

a) What is the size of the page table in bytes?

b) Suppose now that a 4-position buffer has been implemented with reference to the set of associative translations, in which there are a total of 256 address translations. Calculate the size of its tag fields and indexes.

My answers are as follows:

A:

, .

, : 2 ^ 32/2 ^ 12 = 2 ^ 20.

, : 32-20 = 12.

, : (2 ^ 20) * 12 = 12582912 = 1572864

this ( " " ), .

Size = (( )/( )) * ( )                  = (4 /4 ) * 4 B = 4

?

, B:

, B. , , . 4- , 4 . 8 , 10 2, , 4- . , , , .

.

+4
1

a . -, " 4 ". -, PTE , , . 30 (1 ). 4KiB, 12 PTE . 18 (30-12).

, PTE , , , ; 512 MiB 8 KiB- (16 , ), 2 PTE.

( , 32- . 32- . , . , , . [400 MiB] 100 , , .)

b , , 4- , 4 , 2 , , . log2 (256) 8 10, TLB 6 .

, ( ).

TLB ( ). 4 KiB , 12 . 32- 20 .

, 6 , , 14 .

TLB . 1 ( 0 ). , ( ) 14 .

( TLB [ ] "entry" - , , . [ , , .])

+5

All Articles