Intel i86W Manual page 158

Table of Contents

Advertisement

PROGRAMMING MODEL
operating system share a single four-gigabyte address space. The illustrated memory map
assumes paging is being used to place DRAM-resident code in the upper 256 Mbytes of
the address space.
In this example, the first four Kbytes (first page) of the address space are reserved for
the operating system.
It
should be a supervisor-only page and should not be swappable.
Uninitialized external address references in user programs (which are equivalent to a
O(rO)
assembly-language address expression) reference this first page and cause a trap.
The data space for the application begins at OxlOOO (second page).
It
is all readable and
writable. The total data address space available to the application should be over 3500
Mbytes. The user's data space has the following sections:
• A user-data portion whose size and content is defined by the program and develop-
ment tools.
• A section called the heap whose size is determined at run time and can change as the
program executes.
• A stack section.
The application's stack area starts at some address set by the OS and grows downward.
The starting address of the stack would normally be at a four-Mbyte boundary to allow
easy page-table formatting. The stack's starting address is not known in advance.
It
depends on how much address space is used by the operating system at the top of the
address space.
The operating system may also want to reserve some portion of the application's address
space for shared memory areas with other tasks. UNIX System V allows such shared
memory areas. The empty areas on the diagram if Figure 8-3 would normally be marked
as not-present in the page table entries. Some special flag in the page table entry could
allow the operating system to determine that the page is not usable instead of just not
present in memory.
A four-Mbyte area of code space is reserved starting at OxFOOOOOOO for a set of entry
addresses to subroutines commonly used by all application programs (math libraries and
vector primitives, for example). These code sections are shared by all application pro-
grams. The code in this area is directly callable from user-level code and executes at user
level. Standard i860 microprocessor calling conventions are used for these subroutines.
The size of this area is chosen as four Mbytes, because that size corresponds to a
directory-level page table entry that all applications tasks can share.
It
should be large
enough to contain all desirable shared code.
The application program code area starts at OxF0400000.
It
can be as large as 248
Mbytes. The application code is write-protected. The operating system and application
code spaces lie in the upper 256 Mbytes of the address space. The operating system code
is in the upper part of the 256 Mbyte code space. The operating system code is protected
from application programs. Because it is easier for the operating system to divide up the
address space in four-Mbyte blocks, the minimum operating-system code allocation from
the address space is probably four Mbytes. Additional space would be allocated in four-
Mbyte increments.
8-8

Advertisement

Table of Contents
loading

Table of Contents