SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Plan 9
from Bell Labs

“UNIX++ Anyone?”
Anant Narayanan
Malaviya National Institute of Technology
FOSS.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...
Why you shouldn’t be
working with GNU/Linux
• The Socket API
• POSIX
• X11
• The Bindings “rat-race”
• 300 system calls and counting...
• Why isn’t everything a file all of a sudden?
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)
Ok, I’m convinced
How can I help?
Learn the “Plan 9 Way”
Tools at your disposal
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
Getting Involved
• Subscribe to the 9fans list (you get to
interact with legends as a side-effect)

• Hang out in our IRC Channels
• Install Plan 9 (on your VM?)
• Get Hacking!
• Encounter a problem? Post...
• Rinse and Repeat
• Announce your creation proudly (but be
prepared for the bashing!)
What you can do
• Develop applications for Plan 9
• Port applications to Plan 9 (not fun and
definitely not recommended, but...)

• Improve Plan 9 itself
• Fix Bugs
• Port Plan 9 applications to other OSes
(plan9port)

• Frequent contributors get their very own
‘contrib’ directory
The Rewards
• The warm fuzzy feeling of contributing to
FOSS

• You learn a lot more than you would

contributing to your run-of-the-mill FOSS
project

• You work with the tools of the future, not
the present

• You change the way you look at
computer science. No kidding.
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://www.kix.in/plan9/
http://plan9.bell-labs.com/plan9/
http://swtch.com/plan9port/
http://www.vitanuova.com/inferno/
#plan9 on irc.freenode.net

Contenu connexe

Tendances

The Hack Spectrum: Tips, Tricks, and Hacks for Unity
The Hack Spectrum: Tips, Tricks, and Hacks for UnityThe Hack Spectrum: Tips, Tricks, and Hacks for Unity
The Hack Spectrum: Tips, Tricks, and Hacks for UnityRyan Hipple
 
Monitoring in CloudStack
Monitoring in CloudStackMonitoring in CloudStack
Monitoring in CloudStackShapeBlue
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Kubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native PragueKubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native PragueHenning Jacobs
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityJérôme Petazzoni
 
Troubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentTroubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentSadique Puthen
 
How shit works: the CPU
How shit works: the CPUHow shit works: the CPU
How shit works: the CPUTomer Gabel
 
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Altinity Ltd
 
Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Samsung Open Source Group
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisorChing-Hsuan Yen
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDanny Abukalam
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleKnoldus Inc.
 
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce APIUpgrading To The New Map Reduce API
Upgrading To The New Map Reduce APITom Croucher
 
Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)Yoshifumi Kawai
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and BeyondAndreas Granig
 

Tendances (20)

The Hack Spectrum: Tips, Tricks, and Hacks for Unity
The Hack Spectrum: Tips, Tricks, and Hacks for UnityThe Hack Spectrum: Tips, Tricks, and Hacks for Unity
The Hack Spectrum: Tips, Tricks, and Hacks for Unity
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
Monitoring in CloudStack
Monitoring in CloudStackMonitoring in CloudStack
Monitoring in CloudStack
 
Configuration Management in Ansible
Configuration Management in Ansible Configuration Management in Ansible
Configuration Management in Ansible
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Kubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native PragueKubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native Prague
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and security
 
Troubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentTroubleshooting containerized triple o deployment
Troubleshooting containerized triple o deployment
 
How shit works: the CPU
How shit works: the CPUHow shit works: the CPU
How shit works: the CPU
 
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
 
Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisor
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMU
 
Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce APIUpgrading To The New Map Reduce API
Upgrading To The New Map Reduce API
 
Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyond
 

Similaire à Unix++: Plan 9 from Bell Labs

Introducing Plan9 from Bell Labs
Introducing Plan9 from Bell LabsIntroducing Plan9 from Bell Labs
Introducing Plan9 from Bell LabsAnant Narayanan
 
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
 
20180324 leveraging unix tools
20180324 leveraging unix tools20180324 leveraging unix tools
20180324 leveraging unix toolsDavid Horvath
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinalProf. Wim Van Criekinge
 
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
 
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
 
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
 
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
 
Chapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptxChapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptxgowthamiv26
 
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 [2005]
Linux [2005]Linux [2005]
Linux [2005]Raul Soto
 
Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!All Things Open
 
introduction to ubuntu
introduction to ubuntuintroduction to ubuntu
introduction to ubuntuasifnawaz144wb
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Hajime Tazaki
 
Plan9: Bad Movie, Good Operating System
Plan9: Bad Movie, Good Operating SystemPlan9: Bad Movie, Good Operating System
Plan9: Bad Movie, Good Operating SystemQuentin Fennessy
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of LinuxNayan Seth
 

Similaire à Unix++: Plan 9 from Bell Labs (20)

Introducing Plan9 from Bell Labs
Introducing Plan9 from Bell LabsIntroducing Plan9 from Bell Labs
Introducing Plan9 from Bell Labs
 
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
 
P1 2017 python
P1 2017 pythonP1 2017 python
P1 2017 python
 
P1 2018 python
P1 2018 pythonP1 2018 python
P1 2018 python
 
20180324 leveraging unix tools
20180324 leveraging unix tools20180324 leveraging unix tools
20180324 leveraging unix tools
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
 
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?
 
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
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNU
 
Chapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptxChapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptx
 
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 [2005]
Linux [2005]Linux [2005]
Linux [2005]
 
Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!
 
introduction to ubuntu
introduction to ubuntuintroduction to ubuntu
introduction to ubuntu
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
Plan9: Bad Movie, Good Operating System
Plan9: Bad Movie, Good Operating SystemPlan9: Bad Movie, Good Operating System
Plan9: Bad Movie, Good Operating System
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 

Plus de 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
 
Glendix: The Why and the How
Glendix: The Why and the HowGlendix: The Why and the How
Glendix: The Why and the HowAnant Narayanan
 

Plus de 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
 
Glendix: The Why and the How
Glendix: The Why and the HowGlendix: The Why and the How
Glendix: The Why and the How
 
Mozilla Prism
Mozilla PrismMozilla Prism
Mozilla Prism
 

Dernier

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Unix++: Plan 9 from Bell Labs

  • 1. Plan 9 from Bell Labs “UNIX++ Anyone?” Anant Narayanan Malaviya National Institute of Technology FOSS.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. Why you shouldn’t be working with GNU/Linux • The Socket API • POSIX • X11 • The Bindings “rat-race” • 300 system calls and counting... • Why isn’t everything a file all of a sudden?
  • 12. • Take a step back and think about the “everything is a file” approach • Throw the POSIX specification into the dustbin
  • 13. 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
  • 14. 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.
  • 15. 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
  • 16. Example “Servers” • Networking: /net • Email: /mail/fs • Graphics: /dev/draw • Window System: /dev/wsys • Process Control: /proc • cdfs, webfs, tarfs, ftpfs, wikifs
  • 17. 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!
  • 18. 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
  • 19. Trivia Plan 9 was named after the worst movie ever made in the history of American Film (Lookup IMDB)
  • 20. Ok, I’m convinced How can I help? Learn the “Plan 9 Way”
  • 21. Tools at your disposal
  • 22. 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 :)
  • 23. 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!)
  • 24. 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
  • 25. 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!
  • 26. 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
  • 27. 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
  • 28. 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
  • 29. 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
  • 30. What Plan 9 Doesn’t Have
  • 31. • 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)
  • 32. 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
  • 33. The Community You thought the BSD folks were arrogant? You ain’t seen nothing yet!
  • 34. 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
  • 35. Getting Involved • Subscribe to the 9fans list (you get to interact with legends as a side-effect) • Hang out in our IRC Channels • Install Plan 9 (on your VM?) • Get Hacking! • Encounter a problem? Post... • Rinse and Repeat • Announce your creation proudly (but be prepared for the bashing!)
  • 36. What you can do • Develop applications for Plan 9 • Port applications to Plan 9 (not fun and definitely not recommended, but...) • Improve Plan 9 itself • Fix Bugs • Port Plan 9 applications to other OSes (plan9port) • Frequent contributors get their very own ‘contrib’ directory
  • 37. The Rewards • The warm fuzzy feeling of contributing to FOSS • You learn a lot more than you would contributing to your run-of-the-mill FOSS project • You work with the tools of the future, not the present • You change the way you look at computer science. No kidding.
  • 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://www.kix.in/plan9/ http://plan9.bell-labs.com/plan9/ http://swtch.com/plan9port/ http://www.vitanuova.com/inferno/ #plan9 on irc.freenode.net