DistOS-2011W Plan 9: Difference between revisions

From Soma-notes
Nlessard (talk | contribs)
No edit summary
Nlessard (talk | contribs)
mNo edit summary
Line 1: Line 1:
=Plan 9 from Bell Labs=
=Plan 9 from Bell Labs=
[[File:Glenda.jpg|thumb|alt= Glenda, The Plan 9 Mascot | Glenda, The Plan 9 Mascot]]


=Introduction=
=Introduction=

Revision as of 22:02, 28 February 2011

Plan 9 from Bell Labs

Glenda, The Plan 9 Mascot
Glenda, The Plan 9 Mascot

Introduction

Plan 9 from Bell Labs (here on referred to simply as Plan 9) is a Distributed Operating system created by the Computing Science Research Center of AT&T Bell Laboratories, Which was also the group that developed Unix, and the C programming language[3]. It was first released in 1993 to various universities, and given a full release to the general public in 1995[3]. The most unique and interesting aspect of Plan 9 is that it represents all system interfaces via the filesystem including things not normally treated as files, like networking and the user interface.[3] That is to say, everything can be treated like a file, and thus can have read and write operations preformed on it. You would for instance, write Data to the network as though it were a file, and another computer would read that data. It was designed to be used in a distributed capacity, with some central computers for computation, a File server and many terminals for access, all of which is treated as one large system.

This report will go through the various aspects of the Plan 9 operating system and it's Distributed Operating system properties. Plan 9 was envisioned with 3 primary goals in mind, and this report will go into detail on each. First, All resources of the system should be represented as files in the filesystem[3]. Second, Given Application view should see an entire system as belonging to a single coherent namespace.[3] This should be independent of whether or not a given resource is local or remotely accessed. Two given namespaces might not show the same data, but all the data a given application or system sees should be presented as one namespace. Finally, all communication should be done via a standard communication protocol, which is called 9P. This report will also go over how a standard plan9 network would be set up, and my failed attempts to set up a plan9 network myself.

A Standard Plan 9 System

Before we go into the details of a Plan 9 system, lets go over how a standard Plan 9 system would be implemented. A standard Plan 9 system is composed of 3 major parts; File servers for storage, CPU servers for computation, and Terminals for access.[7] File Servers and CPU Servers are normally centralized machines with multiprocessing capacities and many concurrent network connections. They require many fast network connections between each other, for maximized computation efficiency and request handling.

Terminals are can be either local or remote, and connected to the primary cluster via something as simple as an ethernet cable or something more complex such as a connection over the internet.[7] Terminal users can choose how they wish to distribute their workload; a local user could do most basic computation him or herself and only use the CPU servers for more complex tasks as they would be able to quickly access files on the Fileserver. A remote user could choose to do most basic computations on the CPU server, as it would be able to quickly access the Fileservers sending only the completed task to the remote terminal. This can be done because Both Terminals and CPU servers run on the same Kernel, making it easy for a Terminal user to assign a task to either his own terminal or a remote Server.[7]

Plan 9's 3 main concepts

This section will cover Plan 9's 3 basic concepts, which are the basis for the entire system.

System Objects as Files

The first concept is that all system Objects are presented as Named files that can be manipulated like files; they can be written to and read from. This includes things like networking, the window system, called Rio,


Namespaces

This whole process is facilitated by the the use of namespaces created by processes. A given process will create a view of the system, a namespace, to connect all the relevant resources together. A Namespace won't be a collection of disks or computers, but rather a single hierarchical view of the relevant parts of the system. It should be just as simple to assign a

9P

9P is the protocol around which much of Plan 9 is based. 9P is the network protocol for components of Plan 9 to communicate with each other, and is what the vast majority of communication on a Plan 9 network will be composed of.[8] The protocol is 17 basic messages, almost all relating to file manipulation and querying. The protocol communicates in files, not blocks, vaguely similar to the concept of an object store. You don't ask for thirty 512KB blocks on network hard disk A13, but rather navigate through the namespace, attach yourself to a given file, and then reading and writing to that file.[8]

9Ps 17 messages for communication show just how file oriented Plan 9 is. version makes sure to communicating devices are using the same version of 9P. To establish a connection to a given location there is auth and attach. The result of a successful connection is a “channel”, which gives the root of a server. clone can create a copy of the channel. flush can abort a message, and error sends a message telling you exactly what you'd expect it to. What's more interesting is the rest of the messages. walk is used to move from one file to another in the hierarchy. open and create are used to prepare a new or existing file ID for I/O. read and write do exactly as you would expect. clunk informs a file server that the current file isn't needed by whatever is using it, the File's ID can be “forgotten”. remove will remove a file from the fileserver, assuming the device accessing it had write access. Even if it doesn't the file will be “Clunked”. stat and wstat enquire about metadata relating to the file, such as it's name, length, the last time it was accessed, the files owner and so on. [8]




References

Give references in proper form (not just URLs if possible, give dates of access).

((They'll become real references later))

[1]http://plan9.bell-labs.com/plan9/

[2]http://plan9.bell-labs.com/wiki/plan9/installation_instructions/

[3]http://plan9.bell-labs.com/wiki/plan9/faq/index.html

[4]http://lsub.org/who/nemo/9.intro.pdf

[5]http://www.scribd.com/doc/6241731/Plan9-Network-Operating-System

[6]http://man.cat-v.org/plan_9/

[7]http://plan9.bell-labs.com/sys/doc/net/net.html

[8]http://plan9.bell-labs.com/sys/doc/names.html