Information Technology Reference
In-Depth Information
Figure 7.9 Direct-mapping virtual address translation
The main advantage of the direct-mapping technique is its simplicity measured
in terms of the direct addressing of the page table entries. Its main disadvantage
is the expected large size of the page table. In order to overcome the need for
a large page table, the associative-mapping technique, which is explained below,
is used.
7.2.2. Associative Mapping
Figure 7.10 illustrates the address translation according to the associative mapping
technique. The technique is similar to direct mapping in that the virtual address
issued by the processor is divided into two fields: the virtual page number and the
offset fields. However, the page table used in associative mapping could be far shorter
than its direct mapping counterpart. Every entry in the page table is divided into two
parts: the virtual page number and the physical page number. A match is searched
(associatively) between the virtual page number field of the address and the virtual
page numbers stored in the page table. If a match is found, the corresponding physical
page number stored in the page table is extracted and is concatenated with the offset
field in order to generate the physical address of the word requested by the processor.
If, on the other hand, a match could not be found, then this represents a page fault. In
this case, the MMU will have to bring the corresponding page from the hard disk, load
it into the main memory, and indicate the validity of the page. The translation process
is then carried out as explained before.
The main advantage of the associative-mapping technique is the expected shorter
page table (compared to the direct-mapping technique) required for the translation
process. Its main disadvantage is the search required for matching the virtual
Search WWH ::




Custom Search