Unformatted text preview:

Ext2 on Singularity Scott Finley CS 736 Semester Project Report Spring 2008 University of Wisconsin Madison Abstract Singularity is a new operating system produced by Microsoft Research The design of Singularity is a marked departure from current commodity operating systems such as Windows or Linux This paper presents and implementation of the Linux ext2 file system for use on Singularity This project allows the design of Singularity to be evaluated The development and testing described in this paper show that the Singularity design goals of high dependability and good enough performance are largely met The protection provided by the micro kernel design prevented the Singularity kernel from crashing in the face of errors in the ext2 code Performance testing showed that while not as fast as ext2 on Linux performance is not prohibitively low and the overhead of garbage collection is minimal 1 Introduction Singularity is a new operating system released by Microsoft Research It is intended as a platform to investigate new ideas in operating system structure Many of the design decision in Singularity represent a dramatic departure from main stream operating systems such as Windows or Linux 1 Evaluating Singularity s design presents a challenge because existing applications and libraries must be rewritten to be ported One result of this issue is that FAT32 is the only file system that is supported This leaves Singularity without a file system which can meet the IO demands of a benchmark such as SpecWeb99 Singularity provides better response time than Windows in this benchmark but cannot match the total simultaneous users because of the bottleneck of the FAT file system 1 This paper describes the implementation and testing of the ext2 file system for use on Singularity The work so far has focused fully supporting reads from ext2 Caching of file system metadata and raw disk blocks makes reads speeds comparable to ext2 reads on Linux Limited write support was completed primarily to aid in testing Write support has not progressed to a point that makes a performance analysis worthwhile The goal of this work is to evaluate the design of Singularity Integration of a well known file system provides the opportunity to gauge the development experience when doing system programming in Singularity Because the result is a file system that is compatible with ext2 running on Linux a direct performance comparison is meaningful The development and testing described in this paper show that the Singularity design goals of high dependability and good enough performance are largely met The protection provided by the micro kernel design prevented the Singularity kernel from crashing in the face of errors in the ext2 code Performance testing showed that while not as fast as ext2 on Linux performance is not prohibitively low and the overhead of garbage collection is minimal The remainder of this paper is organized as follows Section two is an overview of the important points of the Singularity design Section three covers the details of my ext2 implementation on Singularity Section four evaluates ext2 on Singularity as well as Singularity as a whole Section five concludes the paper 2 The Singularity Architecture The information in this section is a summary compiled from references 1 through 9 Singularity is a new operating system design by Microsoft s Research department It is not intended for practical use but rather as an environment in which to explore new ideas in operating system research The design of Singularity explicitly targets dependability as the primary goal Performance is a secondary goal only to the extent that it must be good enough to make the system practically usable Despite the deemphasis of performance Microsoft has published microbenchmarks showing that the Singularity design results in improved performance of many basic operating system operations such as a kernel API call thread yield or starting a process The programming Environment Programs for Singularity are written in Sing an extension of Spec which is itself an extension of C Almost all of the Singularity kernel is written in Sing with a small portion around 5 written in assembly and C possible which are not available in other systems 2 1 Despite the basis in C programs in Singularity do not run on a virtual machine such as the Common Language Runtime in Windows Instead the Microsoft Intermediate Language MSIL code generated by the Sing compiler is compiled to native machine code by the Bartok compiler This process includes aggressive optimizations to further improve performance This optimization process is improved by taking advantage of the fact that processes in Singularity are sealed meaning that code cannot be changed or linked in dynamically Because the compiler can count on seeing all of a program s code at compile time many global optimization are Finally all Singularity processes as well as the kernel are garbage collected Each garbage collector runs independently which allows them to be configured differently depending on the needs of the application 2 2 The Process Model Singularity uses a micro kernel architecture Outside of this micro kernel Singularity uses a single process model called a Software Isolated Process SIP As the name implies SIPs do not rely on memory management hardware for address space protection as is in most modern operating system Instead each SIP has a software protected object space Static analysis type safety and other language features are used to guarantee at compile time that code within a SIP cannot access memory that does not belong to it Software protection of processes removes much of the cost associated with context switches in a hardware based system Historically micro kernels have suffered from poor performance due in large part to the overhead of doing many hardware based context switches Software based protection makes Singularity feasible from a performance perspective The use of static analysis to protect process memory implies that Singularity must not run code that is not known to be trusted Binaries can be signed to show they come from a trusted source and a compliant compiler It would also be possible to distribute programs as MSIL code and the local system could do the required analysis on that before compiling and installing it As mentioned in section 2 1 processes are sealed which prevents incorrect code from being loaded or generated at run time Singularity shared memory


View Full Document

UW-Madison CS 736 - Ext2 on Singularity

Documents in this Course
Load more
Loading Unlocking...
Login

Join to view Ext2 on Singularity and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Ext2 on Singularity and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?