SlideShare a Scribd company logo
1 of 39
Download to read offline
Plan 9
From Bell Labs

“UNIX++ Anyone?”
Anant Narayanan
Malaviya National Institute of Technology
FREED.IN 2007
What is it?

Advanced technology transferred via mind-control
from aliens in outer space
Humans are not expected to understand it
(Due apologies to lisperati.com)
Yeah Right
• More realistically, a distributed operating
system

• Designed by the creators of C, UNIX, AWK,
UTF-8, TROFF etc. etc.

• Widely acknowledged as UNIX’s true
successor

• Distributed under terms of the Lucent

Public License, which appears on the OSI’s
list of approved licenses, also considered free
software by the FSF
What For?
“Not only is UNIX dead, it’s starting to smell really bad.”
-- Rob Pike (circa 1991)

• UNIX was a fantastic idea...
• ...in it’s time - 1970’s
• Designed primarily as a “time-sharing”
system, before the PC era
A closer look at Unix
TODAY
It Works!
But that doesn’t mean we don’t develop superior alternates
GNU/Linux
• GNU’s not UNIX, but it is!
• Linux was inspired by Minix, which was in
turn inspired by UNIX

• GNU/Linux (mostly) conforms to ANSI and
POSIX requirements

• GNU/Linux, on the desktop, is playing

“catch-up” with Windows or Mac OS X,
offering little in terms of technological
innovation
Ok, and...
• Most of the “modern ideas” we use today
were “bolted” on an ancient underlying
system

• Don’t believe me?
A “modern” UNIX
Terminal
Where did it go wrong?
• Early UNIX, “everything is a file”
• Brilliant!
• Only until people started adding “features”
to the system...
Networking
• More computers were beginning to be

networked, UNIX had to do something...

• BSD came in with the “wonderful” socket
idea - added a handful of system calls...
The Irony
• We should represent devices as files too!
• More filesystems began to appear and we
had a VFS layer introduced along with the
sockets

• Hey, what about filesystems in user-space?!
• Welcome the FUSE and sysfs projects
• That’s not all, ever understood ioctl?
Linux Today
• Multiple interfaces, Multiple resources
• The original path and file model broke
completely

• /etc/passwd, /dev/sda, /proc/cpuinfo are NOT
the same and require different interfaces for
interaction

• 300 system calls and counting...
X11
• The graphics system for Linux
• Why isn’t “everything a file” all of a sudden?
• You only need to learn around 1000 function
prototypes starting with ‘X’ to create
graphical programs
The “bindings” rat-race
• Oh no - system, sockets, and X11 calls are
available only in C!

• Hey, no problem, we can “bind” these

function calls to equivalent ones in other
languages

• 1/10th of FOSS projects consist of these
“bindings”, a race you’ll never win
What’s the solution?
• Take a step back and think about the
“everything is a file” approach

• Throw the POSIX specification into the
dustbin
Welcome Plan 9!
• Uniform interface to all resources
• Why should I care if a device is a ‘char’ or a
‘block’?

• No files are more “special” than others
9P
• One protocol to bind them all
• 9P is Plan 9’s “VFS”
• 13 basic operations including read, write, stat
et. al.

• All resources are required to implement
them

• Minimalist and Lightweight, can work over

any reliable transport: TCP, Shared Memory,
Serial Ports, PCI Bus etc.
The File Server
• Unlike what you may expect, a file server in
Plan 9 is just something that “serves”
resources in the form of files

• Hence, the kernel is often called a “server
multiplexer”, not an “I/O multiplexer” like
UNIX was

• Thanks to 9P, it doesn’t matter whether

resources are local or remote, applications
use them transparently without even
knowing
Example “Servers”
• Networking: /net
• Email: /mail/fs
• Graphics: /dev/draw
• Window System: /dev/wsys
• Process Control: /proc
• cdfs, webfs, tarfs, ftpfs, wikifs
Namespaces
• Per-process namespaces
• A process’ own “view” of the filesystem
• Can be used to implement some neat stuff!
• Start a window manager inside another

transparently, because /dev/draw for the
one inside is different that the one for the
parent!
No bindings!
• Since everything is file-based, you don’t need
to:

• Use C all the time
• Write bindings for every new feature-set

• As long as your language can read and write
files, you’re good to go
Trivia
Plan 9 was named after
the worst movie ever
made in the history of
American Film
(Lookup IMDB)
Applications
Rio
• Plan 9’s Window Manager
• A window in Rio is a real window, not a

“terminal emulator” because we don’t use
terminal anymore

• Everything is just text - cut / copy / paste at
will!

• And yes, you need a (3-button) mouse :)
Acme
• The programmer’s editor
• Again, all text is editable
• Can also be used as a file manager
• No, there’s no syntax coloring (yet!)
Compiler Suite
• One compiler and linker per architecture

(MC68000/020, ARM, Alpha, x86, AMD64,
SPARC, SPARC64, PowerPC, MIPS and more
on the way)

• A new “Makefile” style system for
maintaining code - mk

• Very fast - No dynamic libraries
• Robust debugging system acid
Fossil and Venti
• Venti - block storage indexed by hash;
duplicated blocks stored only once

• Fossil: Uses Venti for storing snapshots of
files

• Try the history and yesterday commands
• Mac OS X comes up with this idea for

Leopard in 2007, was in Plan 9 since before I
was born!
Factotum
• Much like a “keyring”, does authentication on
your behalf

• Speaks a variety of protocols
• All your keys are stored in secstore
encrypted in a “master” key
Security
• There is no root user
• Everyone has the same privileges (i.e.
nothing)

• Namespaces provide isolation by default
• The file-server has a “sys” group, add

yourself to it if you want to, for example,
install a new kernel for everyone to use
Concurrency
• Did you also remember to throw pthreads
into the dustbin?

• “Communicating Sequential Processes”
introduced by Hoare in 1978 based on
Dijkstra’s work

• OS handled processes, co-routines within a
process are called threads

• C/libthread, Limbo, Occam, Erlang
Native UTF-8
• UTF-8 was invented by Ken Thomson and
Rob Pike for Plan 9

• All text in Plan 9 is UTF-8 (which is why it is
backward-compatible with ASCII)

• Internationalization was added to Linux as
an afterthought

• This is especially relevant in countries like
India
What Plan 9 Doesn’t
Have
• root, suid, tty, curses
• ioctl, sockets, select, poll, symlinks
• pthreads, mmap
• locales
• gcc, C++, emacs, vi
• X11, XML, “Web 2.0”
• ... and that’s a good thing (TM)
But we also don’t have
• Good video players
• A 3D graphics system
• Eye-candy
• Javascript-enabled web browser
• Most people have been managing by vnc’ing
into other machines, so far

• That’s where YOU, as a developer, come in
The Community

You thought the BSD folks were arrogant?
You ain’t seen nothing yet!
Contributing
• Be prepared to unlearn what you have learnt
so far

• Plan 9 has an in-built patch and update

system, any user can submit patches straight
from the OS

• Not a conventional FOSS project, there’s no
“version control” or “ticketing system” as
such

• The mailing list and IRC channels are usually
active
Not Ready for it yet?
• Smooth your transition with:
• “Plan 9 From User Space” - A port of the
most common Plan 9 utilities to POSIX
systems

• Inferno - A operating system inspired by

Plan 9, can be run in “hosted mode” which
essentially means the OS in your current
OS (runs on POSIX systems and
Windows)

• Standalone versions of Acme
Any Questions?
Any Rants?
Thank You!
anant@kix.in
http://plan9.kix.in/
http://plan9.bell-labs.com/plan9/
http://swtch.com/plan9port/
http://www.vitanuova.com/inferno/
#plan9 on irc.freenode.net
#linux-india is fun too!

More Related Content

What's hot

Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxplarsen67
 
001 linux revision
001 linux revision001 linux revision
001 linux revisionSherif Mousa
 
The Coming Firmware Revolution
The Coming Firmware RevolutionThe Coming Firmware Revolution
The Coming Firmware Revolutionbcantrill
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixSherif Mousa
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchSherif Mousa
 
Open source software siddique
Open source software siddiqueOpen source software siddique
Open source software siddiqueSiddique Ibrahim
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxLuis Terron
 
Embedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandEmbedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandAhmed El-Arabawy
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionSherif Mousa
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux pptOmi Vichare
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Ahmed El-Arabawy
 
Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu Ahmed El-Arabawy
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoSherif Mousa
 
Course 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsCourse 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsAhmed El-Arabawy
 
Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?bcantrill
 
ZendCon - Linux 101
ZendCon - Linux 101ZendCon - Linux 101
ZendCon - Linux 101Justin Reock
 

What's hot (20)

Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
001 linux revision
001 linux revision001 linux revision
001 linux revision
 
The Coming Firmware Revolution
The Coming Firmware RevolutionThe Coming Firmware Revolution
The Coming Firmware Revolution
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
Linux distributions
Linux    distributionsLinux    distributions
Linux distributions
 
Open source software siddique
Open source software siddiqueOpen source software siddique
Open source software siddique
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Embedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandEmbedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS Land
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
 
Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu
 
Linux for everyone
Linux for everyoneLinux for everyone
Linux for everyone
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
Course 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsCourse 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded Systems
 
Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?
 
ZendCon - Linux 101
ZendCon - Linux 101ZendCon - Linux 101
ZendCon - Linux 101
 

Viewers also liked

Rc - The Plan 9 Shell
Rc - The Plan 9 ShellRc - The Plan 9 Shell
Rc - The Plan 9 Shelltwopoint718
 
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell LabsRyousei Takano
 
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...Roberto Hashioka
 
Start Up PPt
Start Up PPtStart Up PPt
Start Up PPtBeohar
 
Entrepreneurship powerpoint slide
Entrepreneurship powerpoint slideEntrepreneurship powerpoint slide
Entrepreneurship powerpoint slideMahlatsi Lerato
 
Free Download Powerpoint Slides
Free Download Powerpoint SlidesFree Download Powerpoint Slides
Free Download Powerpoint SlidesGeorge
 

Viewers also liked (7)

Rc - The Plan 9 Shell
Rc - The Plan 9 ShellRc - The Plan 9 Shell
Rc - The Plan 9 Shell
 
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs
 
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
 
Start Up PPt
Start Up PPtStart Up PPt
Start Up PPt
 
Creating Start-Up Success
Creating Start-Up SuccessCreating Start-Up Success
Creating Start-Up Success
 
Entrepreneurship powerpoint slide
Entrepreneurship powerpoint slideEntrepreneurship powerpoint slide
Entrepreneurship powerpoint slide
 
Free Download Powerpoint Slides
Free Download Powerpoint SlidesFree Download Powerpoint Slides
Free Download Powerpoint Slides
 

Similar to Introducing Plan9 from Bell Labs

Linux – an introduction
Linux – an introductionLinux – an introduction
Linux – an introductionWingston
 
Manta: a new internet-facing object storage facility that features compute by...
Manta: a new internet-facing object storage facility that features compute by...Manta: a new internet-facing object storage facility that features compute by...
Manta: a new internet-facing object storage facility that features compute by...Hakka Labs
 
Presentation on o s for bca iv
Presentation on o s for bca ivPresentation on o s for bca iv
Presentation on o s for bca ivAjit Singh
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Hajime Tazaki
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUAhmed El-Arabawy
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdfxiso
 
Introduction to GNU/Linux
Introduction to GNU/LinuxIntroduction to GNU/Linux
Introduction to GNU/LinuxRupam Das
 
2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekingeProf. Wim Van Criekinge
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of LinuxNayan Seth
 
20180324 leveraging unix tools
20180324 leveraging unix tools20180324 leveraging unix tools
20180324 leveraging unix toolsDavid Horvath
 
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0dominion
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systemsVandana Salve
 
Windows V/S Linux OS - Comparison
Windows V/S Linux OS - ComparisonWindows V/S Linux OS - Comparison
Windows V/S Linux OS - ComparisonHariharan Ganesan
 

Similar to Introducing Plan9 from Bell Labs (20)

Linux – an introduction
Linux – an introductionLinux – an introduction
Linux – an introduction
 
Manta: a new internet-facing object storage facility that features compute by...
Manta: a new internet-facing object storage facility that features compute by...Manta: a new internet-facing object storage facility that features compute by...
Manta: a new internet-facing object storage facility that features compute by...
 
Linux
LinuxLinux
Linux
 
Presentation on o s for bca iv
Presentation on o s for bca ivPresentation on o s for bca iv
Presentation on o s for bca iv
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNU
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
 
Introduction to GNU/Linux
Introduction to GNU/LinuxIntroduction to GNU/Linux
Introduction to GNU/Linux
 
2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Linux
LinuxLinux
Linux
 
20180324 leveraging unix tools
20180324 leveraging unix tools20180324 leveraging unix tools
20180324 leveraging unix tools
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
 
P1 2017 python
P1 2017 pythonP1 2017 python
P1 2017 python
 
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
Windows V/S Linux OS - Comparison
Windows V/S Linux OS - ComparisonWindows V/S Linux OS - Comparison
Windows V/S Linux OS - Comparison
 
P1 2018 python
P1 2018 pythonP1 2018 python
P1 2018 python
 

More from Anant Narayanan

Enterprise Scale Knowledge Graphs
Enterprise Scale Knowledge GraphsEnterprise Scale Knowledge Graphs
Enterprise Scale Knowledge GraphsAnant Narayanan
 
Building an Intelligent Assistant
Building an Intelligent AssistantBuilding an Intelligent Assistant
Building an Intelligent AssistantAnant Narayanan
 
WebRTC: A Practical Introduction
WebRTC: A Practical IntroductionWebRTC: A Practical Introduction
WebRTC: A Practical IntroductionAnant Narayanan
 
Message Passing vs. Data Synchronization
Message Passing vs. Data SynchronizationMessage Passing vs. Data Synchronization
Message Passing vs. Data SynchronizationAnant Narayanan
 
Firebase: Tales from the Trenches
Firebase: Tales from the TrenchesFirebase: Tales from the Trenches
Firebase: Tales from the TrenchesAnant Narayanan
 
Error Handling in WebRTC
Error Handling in WebRTCError Handling in WebRTC
Error Handling in WebRTCAnant Narayanan
 
WebRTC: User Security & Privacy
WebRTC: User Security & PrivacyWebRTC: User Security & Privacy
WebRTC: User Security & PrivacyAnant Narayanan
 
Firefox Architecture Overview
Firefox Architecture OverviewFirefox Architecture Overview
Firefox Architecture OverviewAnant Narayanan
 
Next Generation Browser Add-Ons
Next Generation Browser Add-OnsNext Generation Browser Add-Ons
Next Generation Browser Add-OnsAnant Narayanan
 
An Overview of Distributed Debugging
An Overview of Distributed DebuggingAn Overview of Distributed Debugging
An Overview of Distributed DebuggingAnant Narayanan
 
A Brief Incursion into Botnet Detection
A Brief Incursion into Botnet DetectionA Brief Incursion into Botnet Detection
A Brief Incursion into Botnet DetectionAnant Narayanan
 
Mozilla Weave: Integrating Services into the Browser
Mozilla Weave: Integrating Services into the BrowserMozilla Weave: Integrating Services into the Browser
Mozilla Weave: Integrating Services into the BrowserAnant Narayanan
 
Distributed File Systems: An Overview
Distributed File Systems: An OverviewDistributed File Systems: An Overview
Distributed File Systems: An OverviewAnant Narayanan
 
Innovating with Mozilla Labs
Innovating with Mozilla LabsInnovating with Mozilla Labs
Innovating with Mozilla LabsAnant Narayanan
 

More from Anant Narayanan (20)

Enterprise Scale Knowledge Graphs
Enterprise Scale Knowledge GraphsEnterprise Scale Knowledge Graphs
Enterprise Scale Knowledge Graphs
 
Building an Intelligent Assistant
Building an Intelligent AssistantBuilding an Intelligent Assistant
Building an Intelligent Assistant
 
WebRTC: A Practical Introduction
WebRTC: A Practical IntroductionWebRTC: A Practical Introduction
WebRTC: A Practical Introduction
 
Message Passing vs. Data Synchronization
Message Passing vs. Data SynchronizationMessage Passing vs. Data Synchronization
Message Passing vs. Data Synchronization
 
Firebase: Tales from the Trenches
Firebase: Tales from the TrenchesFirebase: Tales from the Trenches
Firebase: Tales from the Trenches
 
WebRTC: An Overview
WebRTC: An OverviewWebRTC: An Overview
WebRTC: An Overview
 
Error Handling in WebRTC
Error Handling in WebRTCError Handling in WebRTC
Error Handling in WebRTC
 
WebRTC Demystified
WebRTC DemystifiedWebRTC Demystified
WebRTC Demystified
 
WebRTC: User Security & Privacy
WebRTC: User Security & PrivacyWebRTC: User Security & Privacy
WebRTC: User Security & Privacy
 
Firefox Architecture Overview
Firefox Architecture OverviewFirefox Architecture Overview
Firefox Architecture Overview
 
πP
πPπP
πP
 
Next Generation Browser Add-Ons
Next Generation Browser Add-OnsNext Generation Browser Add-Ons
Next Generation Browser Add-Ons
 
An Overview of Distributed Debugging
An Overview of Distributed DebuggingAn Overview of Distributed Debugging
An Overview of Distributed Debugging
 
A Brief Incursion into Botnet Detection
A Brief Incursion into Botnet DetectionA Brief Incursion into Botnet Detection
A Brief Incursion into Botnet Detection
 
Mozilla Weave: Integrating Services into the Browser
Mozilla Weave: Integrating Services into the BrowserMozilla Weave: Integrating Services into the Browser
Mozilla Weave: Integrating Services into the Browser
 
about:labs
about:labsabout:labs
about:labs
 
Distributed File Systems: An Overview
Distributed File Systems: An OverviewDistributed File Systems: An Overview
Distributed File Systems: An Overview
 
Innovating with Mozilla Labs
Innovating with Mozilla LabsInnovating with Mozilla Labs
Innovating with Mozilla Labs
 
Mozilla Prism
Mozilla PrismMozilla Prism
Mozilla Prism
 
Making Gentoo Tick
Making Gentoo TickMaking Gentoo Tick
Making Gentoo Tick
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Introducing Plan9 from Bell Labs

  • 1. Plan 9 From Bell Labs “UNIX++ Anyone?” Anant Narayanan Malaviya National Institute of Technology FREED.IN 2007
  • 2. What is it? Advanced technology transferred via mind-control from aliens in outer space Humans are not expected to understand it (Due apologies to lisperati.com)
  • 3. Yeah Right • More realistically, a distributed operating system • Designed by the creators of C, UNIX, AWK, UTF-8, TROFF etc. etc. • Widely acknowledged as UNIX’s true successor • Distributed under terms of the Lucent Public License, which appears on the OSI’s list of approved licenses, also considered free software by the FSF
  • 4. What For? “Not only is UNIX dead, it’s starting to smell really bad.” -- Rob Pike (circa 1991) • UNIX was a fantastic idea... • ...in it’s time - 1970’s • Designed primarily as a “time-sharing” system, before the PC era
  • 5. A closer look at Unix TODAY It Works! But that doesn’t mean we don’t develop superior alternates
  • 6. GNU/Linux • GNU’s not UNIX, but it is! • Linux was inspired by Minix, which was in turn inspired by UNIX • GNU/Linux (mostly) conforms to ANSI and POSIX requirements • GNU/Linux, on the desktop, is playing “catch-up” with Windows or Mac OS X, offering little in terms of technological innovation
  • 7. Ok, and... • Most of the “modern ideas” we use today were “bolted” on an ancient underlying system • Don’t believe me?
  • 9. Where did it go wrong? • Early UNIX, “everything is a file” • Brilliant! • Only until people started adding “features” to the system...
  • 10. Networking • More computers were beginning to be networked, UNIX had to do something... • BSD came in with the “wonderful” socket idea - added a handful of system calls...
  • 11. The Irony • We should represent devices as files too! • More filesystems began to appear and we had a VFS layer introduced along with the sockets • Hey, what about filesystems in user-space?! • Welcome the FUSE and sysfs projects • That’s not all, ever understood ioctl?
  • 12. Linux Today • Multiple interfaces, Multiple resources • The original path and file model broke completely • /etc/passwd, /dev/sda, /proc/cpuinfo are NOT the same and require different interfaces for interaction • 300 system calls and counting...
  • 13. X11 • The graphics system for Linux • Why isn’t “everything a file” all of a sudden? • You only need to learn around 1000 function prototypes starting with ‘X’ to create graphical programs
  • 14. The “bindings” rat-race • Oh no - system, sockets, and X11 calls are available only in C! • Hey, no problem, we can “bind” these function calls to equivalent ones in other languages • 1/10th of FOSS projects consist of these “bindings”, a race you’ll never win
  • 16. • Take a step back and think about the “everything is a file” approach • Throw the POSIX specification into the dustbin
  • 17. Welcome Plan 9! • Uniform interface to all resources • Why should I care if a device is a ‘char’ or a ‘block’? • No files are more “special” than others
  • 18. 9P • One protocol to bind them all • 9P is Plan 9’s “VFS” • 13 basic operations including read, write, stat et. al. • All resources are required to implement them • Minimalist and Lightweight, can work over any reliable transport: TCP, Shared Memory, Serial Ports, PCI Bus etc.
  • 19. The File Server • Unlike what you may expect, a file server in Plan 9 is just something that “serves” resources in the form of files • Hence, the kernel is often called a “server multiplexer”, not an “I/O multiplexer” like UNIX was • Thanks to 9P, it doesn’t matter whether resources are local or remote, applications use them transparently without even knowing
  • 20. Example “Servers” • Networking: /net • Email: /mail/fs • Graphics: /dev/draw • Window System: /dev/wsys • Process Control: /proc • cdfs, webfs, tarfs, ftpfs, wikifs
  • 21. Namespaces • Per-process namespaces • A process’ own “view” of the filesystem • Can be used to implement some neat stuff! • Start a window manager inside another transparently, because /dev/draw for the one inside is different that the one for the parent!
  • 22. No bindings! • Since everything is file-based, you don’t need to: • Use C all the time • Write bindings for every new feature-set • As long as your language can read and write files, you’re good to go
  • 23. Trivia Plan 9 was named after the worst movie ever made in the history of American Film (Lookup IMDB)
  • 25. Rio • Plan 9’s Window Manager • A window in Rio is a real window, not a “terminal emulator” because we don’t use terminal anymore • Everything is just text - cut / copy / paste at will! • And yes, you need a (3-button) mouse :)
  • 26. Acme • The programmer’s editor • Again, all text is editable • Can also be used as a file manager • No, there’s no syntax coloring (yet!)
  • 27. Compiler Suite • One compiler and linker per architecture (MC68000/020, ARM, Alpha, x86, AMD64, SPARC, SPARC64, PowerPC, MIPS and more on the way) • A new “Makefile” style system for maintaining code - mk • Very fast - No dynamic libraries • Robust debugging system acid
  • 28. Fossil and Venti • Venti - block storage indexed by hash; duplicated blocks stored only once • Fossil: Uses Venti for storing snapshots of files • Try the history and yesterday commands • Mac OS X comes up with this idea for Leopard in 2007, was in Plan 9 since before I was born!
  • 29. Factotum • Much like a “keyring”, does authentication on your behalf • Speaks a variety of protocols • All your keys are stored in secstore encrypted in a “master” key
  • 30. Security • There is no root user • Everyone has the same privileges (i.e. nothing) • Namespaces provide isolation by default • The file-server has a “sys” group, add yourself to it if you want to, for example, install a new kernel for everyone to use
  • 31. Concurrency • Did you also remember to throw pthreads into the dustbin? • “Communicating Sequential Processes” introduced by Hoare in 1978 based on Dijkstra’s work • OS handled processes, co-routines within a process are called threads • C/libthread, Limbo, Occam, Erlang
  • 32. Native UTF-8 • UTF-8 was invented by Ken Thomson and Rob Pike for Plan 9 • All text in Plan 9 is UTF-8 (which is why it is backward-compatible with ASCII) • Internationalization was added to Linux as an afterthought • This is especially relevant in countries like India
  • 33. What Plan 9 Doesn’t Have
  • 34. • root, suid, tty, curses • ioctl, sockets, select, poll, symlinks • pthreads, mmap • locales • gcc, C++, emacs, vi • X11, XML, “Web 2.0” • ... and that’s a good thing (TM)
  • 35. But we also don’t have • Good video players • A 3D graphics system • Eye-candy • Javascript-enabled web browser • Most people have been managing by vnc’ing into other machines, so far • That’s where YOU, as a developer, come in
  • 36. The Community You thought the BSD folks were arrogant? You ain’t seen nothing yet!
  • 37. Contributing • Be prepared to unlearn what you have learnt so far • Plan 9 has an in-built patch and update system, any user can submit patches straight from the OS • Not a conventional FOSS project, there’s no “version control” or “ticketing system” as such • The mailing list and IRC channels are usually active
  • 38. Not Ready for it yet? • Smooth your transition with: • “Plan 9 From User Space” - A port of the most common Plan 9 utilities to POSIX systems • Inferno - A operating system inspired by Plan 9, can be run in “hosted mode” which essentially means the OS in your current OS (runs on POSIX systems and Windows) • Standalone versions of Acme
  • 39. Any Questions? Any Rants? Thank You! anant@kix.in http://plan9.kix.in/ http://plan9.bell-labs.com/plan9/ http://swtch.com/plan9port/ http://www.vitanuova.com/inferno/ #plan9 on irc.freenode.net #linux-india is fun too!