Information Technology Reference
In-Depth Information
device driver code inside a guest operating system running on a virtual
machine, as shown in Figure 3.14. The guest operating system loads the
device drivers as if it was running directly on the real hardware, but when
the devices attempt to access the physical hardware, the underlying virtual
machine monitor regains control to ensure safety. Device drivers can still
have bugs, but they can only corrupt the guest operating system and not
other applications running on the underlying virtual machine monitor.
3.5.2
Microkernel
An alternative to the monolithic kernel approach is to run as much of the oper-
ating system as possible in one or more user-level servers. The window manager
on most operating systems is implemented this way: individual applications
draw items on their portion of the screen by sending requests to the window
manager. The window manager adjudicates which application window is in
front or in back for each pixel on the screen, and then renders the result. If the
system has a hardware graphics accelerator present, the window manager can
use it to render items more quickly. Some systems have moved other parts of
the operating system into user-level servers: the network stack, the file system,
device drivers, and so forth.
The difference between a monolithic and a microkernel design is often trans-
parent to the application programmer. The location of the service can be hidden
in a user-level library | calls go to the library, which casts the requests either
as system calls or as reads and writes to the server through a pipe. The location
of the server can also be hidden inside the kernel | the application calls the
kernel as if the kernel implements the service, but instead the kernel reformats
the request into a pipe that the server can read.
A microkernel design offers considerable benefit to the operating system de-
veloper, as it easier to modularize and debug user-level services than kernel
code. Aside from a potential reliability improvement, however, microkernels
offer little in the way of visible benefit to end users and can slow down overall
performance by inserting extra steps between the application and the services it
needs. Thus, in practice, most systems adopt a hybrid model where some oper-
ating system services are run at user-level and some are in the kernel, depending
on the specific tradeoff between code complexity and performance.
3.6
Conclusion and future directions
In this chapter, we have seen how system calls can be used by applications
to create and manage processes, perform I/O, and communicate with other
processes. Every operating system has its own unique system call interface;
describing even a single interface in depth would be beyond the scope of this
 
Search WWH ::




Custom Search