Plan9 Operating System
Total Page:16
File Type:pdf, Size:1020Kb
PLAN9 OPERATING SYSTEM A SEMINAR REPORT Submitted by ASHISH RANJAN in partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY In COMPUTER SCIENCE & ENGINEERING SCHOOL OF ENGINEERING COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY COCHIN – 682022 SEPTEMBER 2008 DIVISION OF COMPUTER SCIENCE AND ENGINEERING SCHOOL OF ENGINEERING COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY COCHIN – 682022 Certificate Certified that this is bonafide record of seminar entitled Plan9 Operating System Presented by following student ASHISH RANJAN Of the VIIth semester ,Computer Science and Engineering in the year 2008 in the partial fulfillment of the requirements to the award of Degree of Bachelor of Technology in Computer Science of Engineering of Cochin University of Science and Technology. LATA NAIR Dr. David Peter S Seminar Guide Head of the Department Computer Science and Engineering, Computer Science and Engineering, School of Engineering. School of Engineering. Date: ACKNOWLEDGEMENT It is with greatest pleasure and pride that I present this report before you. At this moment of triumph, it would be unfair to neglect all those who helped me in the successful completion of this seminar. First of all, I would like to place myself at the feet of God Almighty for his everlasting love and for the blessings & courage that he gave me, which made it possible to me to see through the turbulence and to set me in the right path. I would also like to thank our Head of the Department, Mr. David Peter S for all the help and guidance that she provided to me. I am grateful to my seminar guide, Lata Nair ,for his guidance and whole hearted support and very valued constructive criticism that has driven to complete the seminar successfully. I would take this opportunity to thank my friends who were always a source of encouragement. i ABSTRACT Plan 9 from Bell Labs is a distributed operating system, primarily used as a research vehicle. It was developed as the research successor to Unix by the Computing Sciences Research Center at Bell Labs between the mid-1980s and 2002. Plan 9 replaced Unix at Bell Labs as the organization's primary platform for research and explores several changes to the original Unix model that improve the experience of using and programming the system, notably in distributed multi-user environments. One of the key features a.dopted from Unix was the use of the file system to access resources. 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 window system, compilers, file server, and network services are all freshly written for Plan 9.Plan 9's designers were interested in goals similar to those of microkernels , but made different architecture and design choices to achieve them. Plan 9's design goals included: Resources as files: all resources are represented as files within a hierarchical file system Namespaces: the application view of the network is a single, coherent namespace that appears as a hierarchical file system but may represent physically separated (locally or remotely) resources Standard communication protocol: a standard protocol, called 9P, is used to access all resources, both local and remote ii Table of Contents Chapter Title Page No. No. 1 Introduction to Plan9 1 2 Introduction to Unix 2 3 Installation of Plan9 3 4 Configurability And Administration 5 5 Design Issues Of Plan9 7 5.1 Resources As Files 7 5.2 Namespaces 7 5.3 Standard communication protocol 8 6 The Command-Level View 9 7 Plan9 File System 11 8 The File Server 13 9 File Caching 15 10 File Permissions 16 11 Organisation Of Network In Plan9 18 11.1 Kernel Network Support 18 11.2 The File System Protocol 18 11.3 Kernel Organization 19 12 Kernel Structure For Network 21 13 Portability And Compilation 22 14 Parallel Programming 25 15 Hardware Requirements 26 16 Features Of Plan9 29 17 Performance 30 18 Applications of Plan9 31 19 Conclusion 32 20 References 33 List of figures Sl. No. Images Page No. 1 Installation 3 2 Kernel Organization 21 Plan9 Operating System 1 INTRODUCTION TO PLAN9 It was developed as the research successor to Unix by the Computing Sciences Research Center at Bell Labs between the mid-1980s and 2002. Plan 9 replaced Unix at Bell Labs as the organization's primary platform for research and explores several changes to the original Unix model that improve the experience of using and programming the system, notably in distributed multi-user environments. Plan 9 from Bell Labs is a distributed operating system. One of the key features adopted from Unix was the use of the file system to access resources. Plan 9 is an operating system , 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 window compilers , file server, and network services are all freshly written for Plan 9. Plan 9 is most notable for representing all system interfaces, including those required for networking and the user-interface, through the file system rather than specialized interfaces. Plan 9 aims to provide users with a workstation-independent working environment through the use of the 9P protocols. Plan 9 continues to be used and developed in some circles as a research operating system and by hobbyists. Division of Computer Science & Engineering, SOE, CUSAT 1 Plan9 Operating System 2 INTRODUCTION TO UNIX Unix (officially trademarked as UNIX®) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT&T as well as various commercial vendors and non-profit organizations. As of 2007, the owner of the trademark UNIX® is The Open Group, an industry standards consortium. Only systems fully compliant with and certified to the Single UNIX Specification qualify as "UNIX®" (others are called "Unix system-like" or "Unix-like"). During the late 1970s and early 1980s, Unix's influence in academic circles led to large-scale adoption of Unix (particularly of the BSD variant, originating from the University of California, Berkeley) by commercial startups, the most notable of which is Sun Microsystems. Today, in addition to certified Unix systems, Unix-like operating systems such as Linux and BSD derivatives are commonly encountered.Sometimes, "traditional Unix" may be used to describe a Unix or an operating system that has the characteristics of either Version 7 Unix or UNIX System V. Division of Computer Science & Engineering, SOE, CUSAT 2 Plan9 Operating System 3 INSTALLATION OF PLAN9 Figure 1. INSTALLATION Division of Computer Science & Engineering, SOE, CUSAT 3 Plan9 Operating System When a terminal is powered on, it must be told the name of a file server to boot from, the operating system kernel to boot, and a user name and password. Once it is complete, the terminal loads the Plan 9 kernel, which sets some environment variables and builds an initial namespace from the user input (‘$cputype’, ‘$objtype’, ‘$user’, ‘$home’, union of ‘/$cputype/bin’ and ‘/rc/bin’ into ‘/bin’). Eventually, the terminal runs ‘rc’ on ‘/usr/$user/lib/profile’. The user name becomes the terminal’s ID. The password is converted into a 56-bit DES key and saved as the machine key. When a CPU or a file server boots, it reads a key, an ID, and a domain name from non-volatile RAM. This allows the servers to reboot without one operator intervention. A terminal runs programs depending on how it uses resources (e.g., heavy computations on a CPU server, frequent file I/O close to the file system). A call to the command ‘cpu’ starts an ‘rc’ shell on a CPU server. ‘cpu’ is invoked in a ‘rio’ window. Standard input, output, and error files are connected to the ‘/dev/cons’ in the namespace where the ‘cpu’ command was invoked. The namespace for the new ‘rc’ is similar to the one from which the ‘cpu’ command was invoked; only architecture-dependent bindings such as ‘/bin’ may change; CPU-local devices such as fast file systems are still local; only terminal- local devices are imported; the terminal becomes a file server of the CPU. The result is different from ‘rlogin’ which moves to a distinct namespace.The result is different from NFS which keeps the namespace but runs the process locally. Division of Computer Science & Engineering, SOE, CUSAT 4 Plan9 Operating System 4 CONFIGURABILITY AND ADMINISTRATION The uniform interconnection of components in Plan 9 makes it possible to configure a Plan 9 installation many different ways. A single laptop PC can function as a standard alone Plan 9 system; at the other extreme, our setup has central multiprocessor CPU servers and file servers and scores of terminals ranging from small PCs to high end graphics workstations. It is such large installations that best represent how Plan 9 operates. The system software is portable and the same operating system runs on all hardware. Except for performance, the appearance of the system on, say, an SGI workstation is the same as on a laptop. Since computing and file services are centralized, and terminals have no permanent file storage, all terminals are functionally identical. In this way, Plan 9 has one of the good properties of old timesharing systems, where a user could sit in front of any machine and see the same system. In the modern workstation community, machines tend to be owned by people who customize them by storing private information on local disk.