File System, Scheduling, Communication and Memory Management

| Comments

The scope of this document is limited to the study of placement of following services in Mach, V Distributed System, Denali, XEN and UNIX Systems

• File System
• Scheduling
• Communication
• Memory Management


The V Distributed System

The V operating system is a microkernel designed to work for a cluster of computer machines connected by high performance network. The V system was motivated by availability and functionality of high performing computers and networks. The main idea was that kernel is distributed in sense that a separate copy of kernel executes on each particular network node and each copy interacts with each other to provide single system abstraction of process.

The design of the V system was desired to provide:
• High performance communication
• Protocol defines the system
• Small operating system kernel implementing basic protocols and services

The V System provides services at process level in machines and in network independent fashion. Following are some services provided by the V system:
Process Scheduling – Kernel process server (which is User space as well as Kernel space). Scheduling is provided by kernel by only priority based scheduling but second level of scheduling is performed outside the kernel.
Communication – Provided in Kernel Space.
Memory Management – Kernel as well as Kernel memory server. Kernel must implement some level of memory support to protect the integrity. Kernel serves as binding, caching and provides consistency mechanism for regions and open files. The Kernel memory server supports file-like read and write access to address space using UIO interfaces.
File System – File system service is provided by V file server.

Kernel Servers: The V System provides the concept of Kernels server in which above services is implemented by a separate kernel module which are replicated across nodes. Each module is registered by IPC and invoked from process level.




Mach

Mach system is microkernel operating system with design goals to provide portability, extensibility, security in kernel, support transparent distributed operation and reduce number of features in kernel make it less complex.

Process Scheduling – Kernel space to ensure fairness of system.
Communication – Provided in Kernel Space using ports.
Memory Management – Kernel as well as User space. Kernel must manage page tables. User level space decides the page replacement algorithm. User level memory manager use system calls to communicate with kernel for memory mapping, page-in, page-out, and page-level locking.
File System – File system service is managed outside the Kernel.




Xen

Xen is virtual machine monitor for x86 architecture, which allows multiple operating systems to share same hardware with safe and orderly manner without losing any performance. Xen is a hypervisor, which can be argued as a microkernel. Although it provides services like microkernel but it is not a microkernel. Soon, it is expected to be Xen emerging as a Microkernel.

Xen is implemented on the concept of Para virtualization which requires changes to be made in guest OS but it does not require any change in application binary interface which gives freedom to guest application from change.

Xen provides solution to various challenges for virtualization. Each guest OS assumes that it has the highest privilege in the system. All guest OS are hosted and managed by Xen, Xen has to be in highest privilege in the system. Xen take advantage of x86 architecture and modify the guest OS from Ring 0 to Ring 1 and Xen resides in Ring 0.

Scheduling – Kernel space to ensure fairness of system. Xen uses Borrowed Virtual Time scheduling algorithm.
Communication – Service is provided in Xen as well as Guest OS space. Xen provides the abstraction of virtual firewall router where each domain has one or more network interfaces logically connected to VFR. For transmitting packet Guest OS enqueue descriptor and Xen copies the descriptor and to ensure safety copies the packet header and execute any matching filter rules.
Memory Management – Guest OS is responsible for allocating and managing hardware page tables. In this case, relative to Xen Guest OS can be called in user space although Guest OS is in Ring 1 and applications run in Ring 3. Xen involvement is to ensure safety and isolation. When Guest OS requires new page table it allocates and initializes from its own memory reservations and register it with Xen.
File System – File system service is managed outside the Kernel.




Denali

Denali isolation kernel is a x86 based operating system that isolates untrusted software service in separate protection domain. It is a small kernel operating system architecture targeted at hosting multiple applications with little data sharing. Small kernel sometimes resembles to microkernel.

Following are the Denali design Principles: • Expose low-level resources rather than high-level abstractions.
• Prevent direct sharing by exposing only private, virtualized namespaces.
• Scalability
• Modify the virtualized architecture for simplicity, scale, and performance.

Denali system focuses on executing service in separate VM, which provides stronger isolation.

Scheduling – Scheduling is done by kernel in Denali.
Communication – Service is provided in Denali as well as Guest OS space. Denali Ethernet has been simplified so that it requires only one PIO to send and receive packet, which improves performance. To get this benefit Guest OS device driver has been modified.
Memory Management – Guest OS is responsible for accessing portion of physical address space allowed to Guest OS. Denali involvement is to ensure safety and isolation. The isolation kernel allocates swap region. Upon page fault isolation kernel take care by verifying the faulting VM has not accessed illegal virtual address.
File System – File system service is managed outside the Kernel.




UNIX

Unix is the monolithic kernel operating system, which means all the services, has to be implemented and provided by the OS kernel. Unix philosophy has been described as follows :

1. Rule of Modularity: Write simple parts connected by clean interfaces.
2. Rule of Clarity: Clarity is better than cleverness.
3. Rule of Composition: Design programs to be connected to other programs.
4. Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
5. Rule of Simplicity: Design for simplicity; add complexity only where you must.
6. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
7. Rule of Transparency: Design for visibility to make inspection and debugging easier.
8. Rule of Robustness: Robustness is the child of transparency and simplicity.
9. Rule of Representation: Fold knowledge into data so program logic can be stupid and robust.
10. Rule of Least Surprise: In interface design, always do the least surprising thing.
11. Rule of Silence: When a program has nothing surprising to say, it should say nothing.
12. Rule of Repair: When you must fail, fail noisily and as soon as possible.
13. Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
14. Rule of Generation: Avoid hand hacking; write programs to write programs when you can.
15. Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
16. Rule of Diversity: Distrust all claims for “one true way”.
17. Rule of Extensibility: Design for the future, because it will be here sooner than you think.

Scheduling – Scheduling is done by kernel in Unix.
Communication – Systems calls are be called in user space but the authorization is provided by Kernel.
Memory Management – Kernel Space.
File System – Kernel Space.




References

Basics of the Unix Philosophy

Comments