Current educational purpose operating systems xv6-picoc

2.1 Current educational purpose operating systems


We have studied some of the current available education purpose operating system OSes like XINU,sos,linux kernel v0.01,Bluefire OS,MINIX,jos, Plan 9. While studying all these operating systems we have followed guidelines based on following parameters: 1. language code should be ANSI C.
2. should not have more that 15000 lines of code.
3. should follow one of the measure unix standard specifications.
4. should be open source and able to compile on qemu emulator in major linux distri- butions.
5. should have past history of being used for pedagogical purposes.
6. should have well documented manual.
A comprehensive study of each of these operating system is presented below.

2.1.1 XINU


XINU [10] stands for Xinu Is Not Unix. It resembles concepts and even name with Unix, but the internal architecture is wholely different. Xinu is a small, elegant operating system that supports dynamic process creation, dynamic memory allocation, network communication, local and remote file systems, a shell and device-independent I/O func- tions. As XINU does not follow any UNIX standards, it falls apart from mainstream of operating system pedology.

2.1.2 SOS


SOS [9] Simple Operating System, is an operating system kernel which aims at being simple to understand and that nonetheless covers concepts and functionalities of modern OSes. The OS code comes with a batch of articles published in the french magazine called Linux Magazine France, during 2004 and 2006. The main problem with SOS is most part of documentation is available in french and most of concepts are implemented in a standalone fashion, apart from standard UNIX prototype.

2.1.3 Linux Kernel v0.01


This is earliest version of Linux kernel release in early 1991. It comprise of 8000 lines of code only. This can be the best tool for novice developers to learn Linux kernel because current code base has evolved from this tiny release v0.01. But the problem with this vanilla kernel is dependency and compiling environment has been changed significantly since 1991. So this linux-0.01 version can not be complied on today’s modern compilers. Even though it was written considering GCC, but GCC itself has changed a lot since 1991. This difficulties make linux-0.01 unsuitable for use of pedagogy.

2.1.4 Bluefire OS


Bluefire is a didactic OS that was created to show every step of creating a bootstrapping OS. It’s approximately 15,000 lines of code. It’s include primary graphics which is been shown while booting steps. This operating system lacks of some core functionalities like synchronization, standard memory management. The design of this operating system is quiet different from standard UNIX prototypes.

2.1.5 MINIX


MINIX is a free, open-source, operating system designed to be highly reliable, flexible, and secure. It is based on a tiny microkernel running in kernel mode with the rest of the operating system running as a collection of isolated, protected, processes in user mode. MINIX incorporates microkernel architecture which is difficult to understand for novice students. Also current MINIX version is now become a high end operating system and it’s no more a pedagogical operating system now.

2.1.6 Plan 9


Plan 9 is a research system developed at Bell Labs starting in the late 1980s. Its original designers and authors were Ken Thompson, Rob Pike, Dave Presotto, and Phil Winterbottom. Plan 9 is an operating system kernel but also a collection of accompanying software. The bulk of the software is predominantly new, written for Plan 9 rather than ported from Unix or other systems. The main problem with this operating system, as it has been evolved since 1980s, it has become a full fledge operating system instead of just a research system.

2.1.7 Xv6


xv6 is a simple unix-like teaching operating system developed at MIT [13]. xv6 is re- implementation of Dennis Ritchies and Ken Thompsons Unix Version 6 (v6). xv6 is implemented in ANSI C for an x86 based multiprocessors. Xv6 is simple enough to teach operating system walking through its code in a semester. xv6 has implemented most of modern operating system core functionalists which makes easier to start look through in oper- ating system code for a newbie. Xv6 is around 8000 lines code yet still contains the important concepts and organization of Unix. Current users of xv6 include MIT[6],Yale [11],Columbia university, IIT Delhi.

2.2 Components of prototype operating systems


The selected operating system should have one language process system process either interpreter or compiler. It should also have a minimal library on top of which utilities can run. We have studied such exiting solutions.

2.2.1 Introduction to Picoc


PicoC is a very small C interpreter for scripting. It was originally written as the script language for a UAV’s on-board flight system. It’s also very suitable for other robotic, embedded and non-embedded applications. The core C source code is around 4500 lines of code. It’s not intended to be a complete implementation of ISO C but it has all the essentials. When compiled it only takes very little code space and is also very sparing of data space. This means it can work well in small embedded devices. It’s also a fun example of how to create a very small language implementation while still keeping the code readable. The overall structure and it’s open source nature is the key reason to choose Picoc as a prototype interpreter in current xv6 os.

2.2.2 Introduction to dietlibc


Dietlibc is a C standard library released under the GNU General Public License Version 2, but there are also commercial licences available. It was developed with the help of about 100 volunteers by Felix von Leitner with the goal to compile and link programs to the smallest possible size. Dietlibc was developed from scratch and thus only implements the most important and commonly used functions. It is mainly used in embedded devices. Dietlibc is easy to build on linux operating systems and have quite flexible licensing policy which makes it the best choice for using this as a standard library in current xv6 kernel.