next up previous
Next: Kernel Processes Up: Organization of Operating Previous: Unix

Server-Based Operating Systems

While Unix does support the distinction between kernel and rest of the operating system, the major functions of the operating system such as file management and terminal I/O are implemented in the kernel. Several operating systems are more serious about providing OS functions through utility processes. They provide servers for a large number of operating system services such as memory management, file management, I/O etc. 242-Xinu is sort of an example of a server-based system since the terminal service is provided by user-level processes. It is not a typical example because the terminal servers can access the kernel address space and can also be considered kernel processes (discussed below).

Providing OS services through servers supports the separation of policy from mechanism. The kernel provides a minimal set of services that are mechanisms used by servers to enforce policy. This separation is important in systems that expect to evolve since policy changes do not involve modification of the kernel. It is also useful in building distributed operating systems, since servers can be accessed from remote machines (if the IPC is distributed).

One potential disadvantage of providing an OS function through a server is slowness of response. Invocation of a service through a server includes the following steps:

A kernel call made by the client to send a request to the server.

A kernel call made by the server to receive the message.

Possible copying of data from client's address space to server's address space.

A kernel call made by the server to send results to the client.

A kernel call made by the client to receive the results if the original request was asynchronous.

Possible copying of data from server's address space to client's address space.

If the service is invoked through a kernel then only one kernel call is made and no copying of data between client and server address spaces is needed. (Data may be copied to and from the kernel's address space in either case.)

An important question in server-based operating systems is: how much of the OS functionality can be provided through servers? Clearly some functionality is essential in the kernel. The kernel needs to be able to run processes, in particular the servers. It also needs to support interprocess communication primitives that allow clients to make requests and servers to deliver results. Often a kernel (or at least a part of it) is guaranteed to be always resident in memory. Moreover, kernel code executed more efficiently than user-level server code. Therefore, code that reacts to interrupts is also included in the kernel.

Finally, an operating system such as Unix allows the kernel to run in a special privileged mode that can change memory mapping registers, use physical addresses, etc. Therefore OS functions that require this mode are also provided by the kernel.

In a server-based operating system how does a process get in touch with a server? Some services (such as name-services) could be associated with well known port numbers as in Unix. A process could be born with references to communication ports of other services (such as standard input and output). These references may be inherited from its parent or specified by the user through command arguments or an initialization file. Still others (such as file services) it could get by contacting a name server, which allows a server to register a service name and a port reference, and answers queries that ask for a port reference corresponding to a service name.


next up previous
Next: Kernel Processes Up: Organization of Operating Previous: Unix



Prasun Dewan
Tue Apr 30 11:14:08 EDT 2002