Information Technology Reference
In-Depth Information
An Expanded View of an Operating System
Figure 1.3 shows the structure of a general-purpose operating system, as an expan-
sion on the simple view presented in Figure 1.2. At the lowest level, the hardware pro-
vides processor, memory, and a set of devices for providing the user interface, storing
data and communicating with the outside world. The hardware also provides primi-
tives that the operating system can use to provide fault isolation and synchronization.
The operating system runs as the lowest layer of software on the computer, with a
device-specific layer interfaces to the myriad hardware devices, and a set of device-
independent services provided to applications. Since the operating system needs to be
able to isolate malicious and buggy applications from affecting other applications or the
operating system itself, much of the operating system runs in a separate execution en-
vironment protected from application code. A portion of the operating system can also
run as a library linked into each application. In turn, applications run in an execution
context provided by the operating system. The application context is much more than
a simple abstraction on top of hardware devices: applications execute in a virtual envi-
ronment that is both more constrained (to prevent harm), more powerful (to mask hard-
ware limitations), and more useful (via common services), than the underlying hardware.
are sharing physical resources, the operating system needs to decide which
applications get which resources.
Operating systems play illusionist | they provide an abstraction phys-
ical hardware to simplify application design. To write a \hello world"
program, you do not need (or want!) to think about how much physical
memory the system has, or how many other programs might be sharing
the computer's resources. Instead, operating systems provide the illusion
of a nearly infinite memory, as an abstraction on top of a limited amount
of physical memory. Likewise, operating systems provide the illusion that
each program has the computer's processors entirely to itself. Obviously,
the reality is quite different! These illusions enable applications to be
written independently of the amount of physical memory on the system
or the physical number of processors. Because applications are written to
a higher level of abstraction, the operating system is free to change the
amount of resources assigned to each application as applications start and
stop.
Operating systems provide glue | a set of common services between appli-
cations. An important benefit of common services is to facilitate sharing
between applications, so that, for example, cut and paste works uniformly
across the system and a file written by one application can be read by
another. Many operating systems provide a common set of user interface
routines to help applications provide a common \look and feel." Perhaps
most importantly, operating systems provide a layer separating applica-
Search WWH ::




Custom Search