ArticleslgStudy

computer science

9P (protocol)

9P (protocol) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand 9P (protocol) rather than just read about it. In short: 9P (or the Plan 9 Filesystem Protocol or Styx) is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9.

Key takeaways

  • 9P (protocol) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect 9P (protocol) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of 9P (protocol) from memory before moving on to harder problems.

Reference excerpt

9P (or the Plan 9 Filesystem Protocol or Styx) is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows, network connections, processes, and almost anything else available in the operating system. 9P was revised for the 4th edition of Plan 9 under the name 9P2000, containing various improvements. Some of the improvements made are the removal of certain filename restrictions, the addition of a 'last modifier' metadata field for directories, and authentication files. The latest version of the Inferno operating system also uses 9P2000. The Inferno file protocol was originally called Styx, but technically it has always been a variant of 9P. A server implementation of 9P for Unix, called u9fs, is included in Plan 9. A 9P MacOS client kernel extension is provided by Mac9P. A kernel client driver implementing 9P with some extensions for Linux is part of the v9fs project. 9P and its derivatives have also found application in embedded environments, such as the Styx-on-a-Brick project for Lego Mindstorms Bricks.

Server applications Many of Plan 9's applications use 9P file servers. Examples include:

Acme: a text editor/development environment rio: the Plan 9 windowing system plumber: interprocess communication ftpfs: an FTP client that presents the files and directories on a remote FTP server in the local namespace wikifs: a wiki editing tool that presents a remote wiki as files in the local namespace webfs: a file server that retrieves data from URLs and presents the contents and details of responses as files in the local namespace Outside of Plan 9, the 9P protocol is still used when a lightweight remote file system is required:

NixOS: a Linux distribution that uses the Nix package manager. NixOS can rebuild itself inside a virtual machine, where the client uses 9P to mount the package store directory of the host. GNU Guix: a package manager that can instantiate and manage Unix-like operating systems. It can instantiate a system inside a virtual machine in the same manner that NixOS does. Windows Subsystem for Linux (WSL): since Windows 10 version 1903, the subsystem implements 9P as a server and the host Windows operating system acts as a client. Crostini: a custom 9P server is used to provide access to files outside of a Linux VM QEMU: the VirtFS device allows for filesystem sharing over 9P, which is accelerated with kernel drivers and shared memory

See also Distributed file system Everything is a file – Unix philosophy IL – Transport-layer protocol designed at Bell Labs for the Plan 9 OS

References

External links 9P Resources page at cat-v.org 9P Manual The Styx Architecture for Distributed Systems by Rob Pike and Dennis Ritchie The Organization of Networks in Plan 9 by Dave Presotto and Phil Winterbottom Security in Plan 9

Worked examples

Example 1 — a first encounter with 9P (protocol)

Start with the simplest possible case. Write down what 9P (protocol) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to 9P (protocol) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about 9P (protocol) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of 9P (protocol)

In research
9P (protocol) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses 9P (protocol) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
9P (protocol) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Application layer protocols, Computer-related introductions in 1992, Inferno (operating system), so understanding it makes those chapters shorter.
In everyday life
Look for 9P (protocol) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “9P (protocol)” →

How to study 9P (protocol) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what 9P (protocol) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain 9P (protocol) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is 9P (protocol) in simple terms?

9P (or the Plan 9 Filesystem Protocol or Styx) is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9.

Why does 9P (protocol) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study 9P (protocol)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on 9P (protocol).

Tags

  • Application layer protocols
  • Computer-related introductions in 1992
  • Inferno (operating system)
  • Inter-process communication
  • Internet Protocol based network software
  • Network file systems
  • Network file transfer protocols
  • Plan 9 from Bell Labs

Keep exploring