Figure 5-12. 80306 Addressing Machanism
16 0 32 0
+--------------------+-------------------------------------+ LOGICAL
| SELECTOR | OFFSET | ADDRESS
+----+----------+----+--------------------+----------------+
+-------+ ! |
| DESCRIPTOR TABLE |
| +---------------+ |
| | | |
| | | |
| | | |
| | | |
| |---------------| |
| | SEGMENT | +---+ |
+->| DESCRIPTOR |-------->| + |<----------+
|---------------| +-+-+
| | |
+---------------+ |
! PAGE FRAME
LINEAR +-----------+-----------+----------+ +---------------+
ADDRESS | DIR | PAGE | OFFSET | | |
+-----+-----+-----+-----+-----+----+ | |
| | | | |
+-------------+ | +------------->| PHYSICAL |
| | | ADDRESS |
| PAGE DIRECTORY | PAGE TABLE | |
| +---------------+ | +---------------+ | |
| | | | | | | |
| | | | | | +---------------+
| | | | |---------------| ^
| | | +-->| PG TBL ENTRY |--------------+
| |---------------| |---------------|
+->| DIR ENTRY |--+ | |
|---------------| | | |
| | | | |
+---------------+ | +---------------+
^ | ^
+-------+ | +---------------+
| CR3 |--------+
+-------+
5.3.3 Pages Spanning Several Segments
On the other hand, segments may be smaller than the size of a page. For
example, consider a small data structure such as a semaphore. Because of the
protection and sharing provided by segments (refer to
Chapter 6
) , it may be
useful to create a separate segment for each semaphore. But, because a
system may need many semaphores, it is not efficient to allocate a page for
each. Therefore, it may be useful to cluster many related segments within a
page.
up:
Chapter 5 -- Memory ManagementFigure 5-13. Descriptor per Page Table
PAGE FRAMES
+-----------+
LDT PAGE DIRECTORY PAGE TABLES | |
+----------+ +----------+ +----------+ | |
| | | | | | +->+-----------+
|----------| |----------| |----------| |
| | | | | PTE |---+ +-----------+
|----------| |----------| |----------| | |
| | | | | PTE |---+ | |
|----------| |----------| |----------| +->+-----------+
| | | | | PTE |---+
|----------| |----------| +--->+----------+ | +-----------+
|DESCRIPTOR|------>| PDE |---+ | | |
|----------| |----------| | | |
|DESCRIPTOR|------>| PDE |---+ +->+-----------+
|----------| |----------| | +----------+
| | | | | | | +-----------+
|----------| |----------| | |----------| | |
| | | | | | | | |
|----------| |----------| | |----------| +->+-----------+
| | | | | | PTE |---+
|----------| |----------| | |----------| +-----------+
| | | | | | PTE |---+ | |
+----------+ +----------+ +--->+----------+ | | |
LDT PAGE DIRECTORY PAGE TABLES +->+-----------+
PAGE FRAMES
prev: 5.2 Page Translation
next: Chapter 6 -- Protection