There is one Segment Table Base Register (STBR) for the entire machine. It points to the segment table (which may be in ordinary RAM or some special high-speed RAM or register set.) To get to the right page table, the segment number is taken out of the virtual address. In Fig. 12.10.1, this is the top 9 bits of the virtual address. This number is added to the address in STBR to give the address of the right pointer in the segment table. This pointer points to the page table for that segment. The various page tables may be in main memory, or in special high-speed RAM, or in special registers. However, a page table is much larger than the segment table, and there are many page tables. If 9 bits are devoted to the segment number, then there may be up to 29 segments, or 512 of them! If there are 11 bits in the page number, there may be 211, or 2048, pages for each segment. A given program may not need more than a few segments, however, so not that much memory may be needed for these tables. However, they may consume vast quantities of memory in the worst case. |