Kernel Comparison of Opensolaris, Windows Vista and Linux 2.6
Kernel Comparison of Opensolaris, Windows Vista and Linux 2.6
The idea of writing this paper is evoked by Max Bruning's view on Solaris, BSD and
Linux. The comparison of advantages and disadvantages among quasi-Unix systems
is an oft-told tale. However, this article looks into the three kernel subsystems of the
latest operating system release – OpenSolaris, Windows Vista and Linux kernel 2.6.
The simple reason is that they are the most widely used and welcomed operating
systems within business environment and developer communities.
There are lots of criteria to value a system, but undoubtedly, the fundamental role of
an operating system in computer science remains unchanged. It can be thought of as
having three objectives:
1
Dingze Zhu Sun ISVe
OpenSolaris
Process: This is the normal UNIX process and includes the user’s address space,
stack, and process control block.
User-level threads: Implemented through a threads library in the address space
of a process, these threads are invisible to the OS.A user-level thread (ULT)10 is
a user-created unit of execution within a process.
Lightweight processes: A lightweight process (LWP) can be viewed as a
mapping between user level threads and kernel threads. Each LWP supports ULT
and maps to one kernel thread. LWPs are scheduled by the kernel independently
and may execute in parallel on multiprocessors.
Kernel threads: These are the fundamental entities that can be scheduled and
dispatched to run on one of the system processors.
2
Dingze Zhu Sun ISVe
The user thread interface can be a standard thread library. A defined ULT maps onto a
LWP, which is managed by the OS and which has defined states of execution, defined
subsequently. An LWP is bound to a kernel thread with a one-to-one correspondence
in execution states. Thus, concurrency and execution is managed at the level of the
kernel thread.
An LWP identifier
The priority of this LWP and hence the kernel thread that supports it
1
Richard McDougall, Jim Mauro ,Solaris internals 2005 Pearson Education
3
Dingze Zhu Sun ISVe
A signal mask that tells the kernel which signals will be accepted
Saved values of user-level registers (when the LWP is not running)
The kernel stack for this LWP, which includes system call arguments, results, and error
codes for each call level
Resource usage and profiling data
Pointer to the corresponding kernel thread
Pointer to the process structure
Figure 2 Comparison of Solaris Process structure and traditional Unix Process structure
Windows Vista
Vista process design is driven by the need to provide support for a variety of OS
environments. Accordingly, the native process structures and services provided by the
Windows Kernel are relatively simple and general purpose, allowing each OS
subsystem to emulate a particular process structure and functionality. Here are some
of the important characteristics of Windows processes:
Windows processes are implemented as objects.
An executable process may contain one or more threads.
Both process and thread objects have built-in synchronization capabilities.
4
Dingze Zhu Sun ISVe
Figure 32 below illustrates the way in which a process relates to the resources it
controls or uses. Each process is assigned a security access token, called the primary
token of the process.
5
Dingze Zhu Sun ISVe
opens files. A thread is a dispatchable unit of work that executes sequentially and is
interruptible, so that the processor can turn to another thread.
Linux provides a unique solution in that it does not recognize a distinction between
threads and processes. Using a mechanism similar to the lightweight processes of
OpenSolaris, user-level threads are mapped into kernel-level processes. Multiple
user-level threads that constitute a single user-level process are mapped into Linux
kernel-level processes that share the same group ID. This enables these processes to
share resources such as files and memory and to avoid the need for a context switch
when the scheduler switches among processes in the same group.
Conclusion
Solaris and Windows both exist for dozens of years while Linux is very young and
still has long way to go. Obviously, three OS are implemented following popular
operating system theories. The most awkward obstacle is the ability for us to access
the kernel implementation and debugging. Limited to my knowledge, I have no way
to debug or trace thread and process in Windows Vista while OpenSolaris supplies
abundant tools to observe kernel thread.
In the next paper, we will continue to discuss memory management and file system.