34 Parti: Essentials
together, or the small model that allows two segments - one for code and the other
for data plus stack, and so on. This example shows how the memory management
provided by an operating system directly affects the programming environment.
The Intel 80286 (which followed the Intel 8086) could support more than 640K
of RAM. Hence, programmers got new interface standards for accessing extended
and expanded memory from DOS. Microsoft's second-generation operating system,
Windows 3.1, could run on 80286 in standard mode and used the segmented model
of 80286. The 80286 provided better segmentation than the 8086. In 80286's
model, segments can have a programmable base address and size limit. Windows
3.1 had another mode of operation, the enhanced mode, which required the Intel
80386 processor. In the enhanced mode, Windows 3.1 used the paging mechanisms
of 80386 to provide additional performance. The virtual 8086 mode was also used
to implement multiple DOS boxes on which DOS programs could run.
Windows 3.1 does not make full use of the 80386's capabilities. Windows 3.1 is
a 16-bit operating system, meaning that 16-bit addresses are used to access the
memory and the default data size is also 16 bits. To make full use of 80386's capa-
bilities, a 32-bit operating system is necessary. Microsoft came up with a 32-bit op-
erating system, Windows NT. The rest of this chapter examines the details of
Windows NT memory management. Microsoft also developed Windows 95 after
Windows NT. Since both these operating systems run on 80386 and compatibles,
their memory management schemes have a lot in common. However, you can best
appreciate the differences between Windows NT and Windows 95/98 after we re-
view Windows NT memory management. Therefore, we defer this discussion until a
later section of this chapter.
Windows NT Memory Management
Overview
We'll first cover the view Windows NT memory management presents to the outside
world. In the next section, we explain the special features provided by Intel micro-
processors to implement memory management. Finally, we discuss how Windows
NT uses these features to implement the interface provided to the outside world.
Memory Management Interface —
Programmer's View
Windows NT offers programmers a 32-bit flat address space. The memory is not
segmented; rather, it is 4GB of continuous address space. (Windows NT marked the
end of segmented architecture — programmers clearly preferred flat models to seg-
mented ones.) Possibly, with languages such as COBOL where you need to declare
data and code separately, programmers view memory as segments. However, with
new languages such as C and C++, data variables and code can be freely mixed and
Previous Main Next