Intel 80386 DJ Equipment User Manual


 
CHAPTER 3
SYSTEM ARCHITECTURE
The purpose
of
a system architecture
is
to
support operating systems, but operating systems
are quite diverse in their needs. In response, the
80386 provides
an
array
of
resources that operat-
ing system designers and implementors can
selectively employ. In effect, the
80386 system
architecture can
be
configured to fit the needs of
the operating system under development.
3.1
System Registers
In addition to the registers described in the
preceding chapter, an operating system some-
times uses the 80386 registers shown in Figure
3-1.
(Later sections
of
this chapter sometimes
refer to these registers, so they are shown here for
reference.) In the main,
it
is
the 80386 that uses
the system registers; the operating system ini-
tializes the system registers and then ignores
them during normal operation. The operating
system may, however, use a system register to
handle an exception.
For
example, when a page
fault occurs, the processor loads the faulting
address into CR2; the operating system's
page
fault handler uses the address to find the asso-
ciated page table entry. The system registers are
normally inaccessible to application programs,
47
BASE ADDRESS
63
I
SELECTOR
I
SYSTEM ADDRESS REGISTERS
31
15
since only privileged instructions can operate on
them. (Exceptions, page faults, and privileged
instructions are explained later
in
this chapter.)
3.2 Multitasking
Many of the 80386's system architecture facilities
directly support multitasking operating systems,
though,
of
course, the 80386 can be used in
demanding single-task applications. Multitasking
is
a technique for managing a computer system's
work when that work consists of multiple activi-
ties; three such activities might
be
editing one
file,
compiling another, and transmitting a third to
another computer. In a multitasking system,
each activity that can proceed in parallel with
other activities
is
represented
by
a task. (In this
introduction, the term
"task"
is
considered equiv-
alent to the term
"process.") Each task executes a
program consisting
of
instructions and initial
data values. More than one task can execute the
same program; for example, in a timesharing
multitasking system several tasks (each corre-
sponding to a user) commonly execute the same
compiler
or
editor. Programs and tasks are
related in somewhat the same way that sheet
music and musical performances are related: a
LIMIT
GDTR:
GLOBAL DESCRIPTOR TABLE
IDTR:
INTERRUPT DESCRIPTOR TABLE
LDTR:
LOCAL DESCRIPTOR TABLE
TR: RUNNING
TASK'S TSS
CRO:
OPTIONS (FOR EXAMPLE, PAGING)
~--------------~
CR1:
(RESERVED BY INTEL)
CR2:
PAGE
FAULT
LINEAR ADDRESS
CR3:
PAGE
DIRECTORY BASE ADDRESS
SYSTEM CONTROL REGISTERS
Figure
3-1.
System Registers
3-1