Maps to: CMU 15-440/640 Spring 2026, theme “naming” and the learning outcome on communication (“control semantics and language limitations”, “integration with threading”) as applied to the course’s first large system. Readings (optional, course list):
- J. H. Morris et al., Andrew: A Distributed Personal Computing Environment (CACM 29(3), 1986);
- J. H. Howard et al., Scale and Performance in a Distributed File System (ACM TOCS 6(1), 1988);
- M. Satyanarayanan, Scalable, Secure, and Highly Available Distributed File Access (IEEE Computer 23(5), 1990);
- D. C. Steere, J. J. Kistler and M. Satyanarayanan, Efficient User-Level File Cache Management on the Sun Vnode Interface (USENIX Summer 1990).
Projects:
- P1 interposes on C file calls and forwards them to a server;
- P2 adds whole-file caching.
This lecture gives the concepts behind both, not their designs.
Sources: the readings above. Background:
- R. Sandberg et al., Design and Implementation of the Sun Network File System (USENIX 1985); RFC 1094 (NFS v2) and RFC 1813 (v3);
- S. Kleiman, Vnodes: An Architecture for Multiple File System Types in Sun UNIX (USENIX 1986);
- J. Ousterhout et al., A Trace-Driven Analysis of the UNIX 4.2 BSD File System (SOSP 1985);
- M. Satyanarayanan, The Influence of Scale on Distributed File System Design (IEEE TSE 18(1), 1992);
- Tanenbaum & van Steen, ch. 5 (naming).
The slides are not public; this is not a transcript. Numbers from papers are labelled as such. Every other number comes from
code/lecture05/, run on the author’s machine (Apple M4 Pro, macOS, Python 3.13 and 3.9). Code:code/lecture05/. Reading time: ~90 minutes, plus ~20 to run the demos.
0. How to read this lecture
0.1 Learning goals
After this lecture you should be able to:
- Explain what a distributed file system is for, and which kinds of transparency it tries to provide.
- Describe the remote-access model (NFS) and the upload/download, whole-file model (AFS), and predict which sends more messages, loads the server more, and answers the first byte faster.
- Explain why NFS’s server is stateless, what that buys (trivial crash recovery, at-least-once RPC) and what it costs (non-idempotent operations, weak consistency, constant validation traffic).
- Retell the AFS story: the prototype’s check-on-open overloaded its servers, and four changes made AFS-2 scale: callbacks, fids with client-side name resolution, one multi-threaded server process, and low-level storage access. Say what each change cost.
- Explain interposition (VFS/vnodes, user-level cache managers, library interposition) and what an interposition layer can and cannot see.
- Use the vocabulary of naming — names, identifiers, addresses; name spaces, mounting, resolution; location transparency vs. location independence — and explain why AFS separates pathnames, fids and volume locations, and why fids carry a uniquifier.
0.2 Prerequisites and scope
- Prerequisites:
- Lecture 1 (partial failure, scale);
- Lecture 2 (latency, bandwidth);
- Lectures 3–4 (RPC, idempotence, duplicate tables, epochs).
- Scope: the architecture of two classic file systems and the naming ideas they embody. Caching in general (locality, hit ratios) is Lecture 6. The consistency protocols themselves (check-on-use, callbacks, leases; what a reader may see) are Lecture 7. Replication and disconnected operation (Coda) are Lecture 22.
0.3 Section → code map
| Section | Idea | Demo in code/lecture05/ |
|---|---|---|
| §2 | what programs ask of a file system | 01_interposition.py Part A |
| §3 | NFS: remote access, statelessness | 02_remote_vs_whole_file.py, 04_stateless_vs_stateful.py Part A |
| §4 | AFS: whole files, check-on-open vs callbacks, scaling | 02_remote_vs_whole_file.py, 03_scaling.py, 04_stateless_vs_stateful.py Part B |
| §5 | interposition | 01_interposition.py Parts B–C |
| §6 | naming | 05_naming.py |
| all | the workload and the simulated file service | minibench.py, fsworld.py (each runs a self-test) |
Two shared modules carry the lecture:
-
minibench.pybuilds a 70-file, 195 KB source tree and runs five phases of ordinary file work on it. These are the same phases as the Andrew benchmark that Howard et al. used:- MakeDir: re-create the directory skeleton;
- Copy: copy every file;
- ScanDir: stat every file;
- ReadAll: read every byte;
- Make: “compile” each
.cfile and the headers it#includes, then “link”.
A tracer interposes on Python’s file functions and records every call the unmodified code makes.
-
fsworld.pyreplays that trace on a simulated file service built on Lecture 1’sdsim. The service is one server with one CPU and a queue, and clients that use one of four designs:local: a plain local disk;nfs: remote access;afs1: whole files, check on every open;afs2: whole files with callbacks.
The client program is a Python generator, so each design’s cache logic reads like straight-line code.
0.4 Notation
- Server CPU cost in the model: 1.0 ms per call, plus 0.5 ms per pathname component the server walks, plus 0.25 ms per KB moved. The client spends 200 ms of CPU per compiled file. The network is 0.8–1.2 ms each way. These costs are invented, fixed before the experiments, and printed by demo 02. Read results as ratios and shapes, not as predictions.
- A load unit is one client running the benchmark, the unit Howard et al. used.
- fid: AFS’s file identifier (volume, vnode, uniquifier). File handle: NFS’s opaque equivalent.
1. Why a distributed file system?
1.1 The intuition: keep the timesharing system’s shared disk, lose the timesharing
In 1983, CMU and IBM set out to give every student and faculty member a personal workstation — 5,000 to 10,000 of them. Personal machines are fast and responsive. But a timesharing system had one thing they lacked: a shared disk. Everyone’s files were in one place, any terminal could reach them, and sharing a file meant telling a colleague its name.
The Andrew project’s answer was a distributed file system: a set of servers (called Vice) that together look, to every workstation, like one large shared subtree of the local file system (/afs/...). A user can walk to any workstation, log in, and see the same files. A workstation’s disk becomes a cache; losing a workstation loses nothing.
That is still what distributed file systems are for: departmental home directories, a lab’s shared data, a cluster’s storage (Lecture 25).
1.2 What “transparent” should mean
A distributed file system succeeds if programs and people can mostly forget it is distributed. Each transparency hides one fact:
| transparency | hides | example |
|---|---|---|
| access | that the file is remote | an unmodified cat reads /afs/.../notes.txt |
| location | where the file is | the name does not mention a server |
| migration (location independence) | that the file moved | administrators move alice’s files; her paths still work |
| replication | that there are copies | read-only system binaries on several servers |
| failure | that something broke | a server reboot is a pause, not an error |
| concurrency | that others share the file | (only partly: see Lecture 7) |
No real system provides all of them fully. Lecture 1’s partial failures and Lecture 2’s latency make some of them expensive, and some impossible. This lecture shows which ones NFS and AFS chose, and what each choice cost.
1.3 Four questions every design answers
- How is a file accessed? Every read and write goes to the server (remote access), or the whole file is copied to the client and used locally (upload/download).
- Where and how is it cached? Memory or local disk; blocks or whole files.
- How is a cached copy kept fresh? Ask the server on every use, trust it for a while, or have the server promise to say when it changes.
- How is a file named and found? Paths, mount tables, identifiers, location databases.
NFS and AFS answer all four differently, and their answers are why they are still taught.
2. What do programs actually ask of a file system?
Before designing a file service, measure the workload. Demo 01 runs minibench.py’s five phases while a tracer replaces builtins.open, os.stat, os.mkdir and os.listdir with recording wrappers. The benchmark code is unaware of the tracer. That is already an act of interposition, the subject of §5.
The trace (deterministic; the same on every machine):
| phase | listdir | stat | mkdir | open r | open w | KB read | KB written |
|---|---|---|---|---|---|---|---|
| MakeDir | 7 | 76 | 7 | 0 | 0 | 0 | 0 |
| Copy | 7 | 76 | 0 | 70 | 70 | 195.1 | 195.1 |
| ScanDir | 7 | 76 | 0 | 0 | 0 | 0 | 0 |
| ReadAll | 7 | 76 | 0 | 70 | 0 | 195.1 | 0 |
| Make | 3 | 0 | 0 | 199 | 39 | 384.5 | 192.3 |
| total | 31 | 304 | 7 | 339 | 109 | 774.7 | 387.3 |
Three facts matter for everything that follows.
- Metadata calls outnumber data calls. There were 304 stats and 31 listdirs against 448 opens. One whole phase, ScanDir, reads no data at all. So a file system that must ask its server anything on a stat pays for it constantly. Howard et al.’s prototype measurements found the same, labelled as paper numbers here: two calls, “is my cached copy valid?” (TestAuth, 61.7%) and “give me this file’s status” (GetFileStat, 26.8%), made up nearly 90% of all server calls. Only 6% moved file data.
- Files are re-used. In Make, 199 opens touched only 90 distinct files, and the 123 header opens hit just 14 headers. That is temporal locality: what was used recently will be used again soon. It is why caching pays (Lecture 6).
- Files are read whole, front to back. In this benchmark that is true by construction. Ousterhout et al.’s 1985 traces of real UNIX systems found that most files were read in their entirety (paper claim). That fact is the foundation of AFS’s whole-file design.
The lesson. The expensive part of a distributed file system is not moving bytes. It is answering “what is this file, and is my copy still good?” — over and over. Hold on to this; it explains both designs.
3. Remote access: NFS
3.1 The design
Sun’s Network File System (1985) was built for a small group of trusted workstations on one Ethernet. Its structure:
- The client is in the kernel, under the VFS/vnode interface (§5.2). Programs need no change: an NFS directory is mounted into the local tree, and file calls on it become RPCs.
- The server is stateless: it keeps no record of which clients exist or which files they have open. Every request carries everything needed to execute it:
- a file handle, an opaque identifier the server can turn into a file: in practice file system id, inode number and a generation number — see §6.4;
- an explicit offset and count.
- Names are resolved one component at a time:
LOOKUP(dir handle, "src")→ handle ofsrc;LOOKUP(src handle, "lib")→ … The client’s kernel walks the path, because only the client knows its own mount table. - RPCs go over UDP, with retries at the operation level: at-least-once semantics (Lecture 4).
- Operations are designed to be idempotent where possible:
READ(handle, offset, count)andWRITE(handle, offset, data)give the same result if repeated. A “read the next bytes” call would not.
So an open + read of /src/lib/a.c (20 KB, cold) becomes:
LOOKUP× 3 (one per component);- one
GETATTR(is my information current?); READ× 3 (8 KB blocks).
That is 7 round trips. The demo’s NFS-like design does exactly this.
3.2 Why stateless?
Statelessness makes crash recovery trivial. If the server crashes and reboots:
- it has nothing to rebuild;
- clients simply retransmit until it answers;
- the file handles they hold still work, because a handle names a file on disk, not an entry in the server’s memory.
Demo 04 Part B checks this. The server was down from t = 2.0 s to 2.5 s. The NFS-like reader’s slowest read took 504 ms (it kept retransmitting through the outage), it never read stale data, and it needed no recovery protocol at all.
The price shows up in Part A of the same demo, which is Lecture 4’s lesson applied to files. Retries make every operation run at least once, which is fine only if running it twice is harmless. The demo ran 200 rounds of “create a temp file exclusively, write it, close it, remove it” with 10% of the server’s replies lost:
| server | calls executed twice | spurious EEXIST | spurious ENOENT | temp files left behind |
|---|---|---|---|---|
| no duplicate cache | CREATE 17, WRITE 22, REMOVE 24 | 17 | 22 | 17 |
| duplicate-request cache | 0 (69 retransmissions answered from the cache) | 0 | 0 | 0 |
- The 22 repeated WRITEs were harmless: the same bytes at the same offset.
- The 17 repeated CREATEs found “their own” file and failed with EEXIST. The program gave up on those rounds and left 17 files behind.
- The 24 repeated REMOVEs found nothing to remove and reported ENOENT.
Howard et al. hit exactly this in 1987 (paper observation). At ten or more load units, NFS benchmark runs failed with file-system errors. They traced the cause to lost RPC replies followed by retries of non-idempotent calls.
The fix — a duplicate request cache at the server (Juszczak 1989) — is state. It is kept in RAM, so it is “soft” state: losing it in a crash only reopens the narrow window it was closing. Statelessness turns out to be a matter of degree.
3.3 Caching in NFS, and what “consistency” means there
Asking the server for every block would make NFS unusable, so NFS clients cache too:
- data blocks in memory, valid only if the file’s attributes have not changed;
- attributes (size, modification time), trusted for a few seconds — typically 3 s for files and 30 s for directories (in real systems, configurable from 3 to 60 s);
- names (directory lookups), trusted like directory attributes.
On every open, the client asks the server for fresh attributes (GETATTR). If the file changed, the cached blocks are dropped. When a file is closed, its dirty blocks are written back. Together these give close-to-open consistency: if A closes a file and B opens it afterwards, B sees A’s writes.
Between opens, there are no guarantees:
- Two clients writing the same open file interleave unpredictably.
- A newly created file may be invisible to other clients for up to the directory timeout (Howard et al. quote 30 seconds).
- A
statmay return attributes up to 3 s old.
Howard et al. found NFS’s consistency semantics hard even to state precisely. That is the cost of a server that keeps no promises: the client can only guess, by timeouts, how long its copy stays good.
3.4 What remote access costs
Demo 02 replays the traced benchmark on one client of each design. Times are simulated milliseconds:
| design | MakeDir | Copy | ScanDir | ReadAll | Make | total | vs. local |
|---|---|---|---|---|---|---|---|
| local disk | 9 | 70 | 8 | 39 | 7,701 | 7,827 | +0% |
| NFS-like (remote access) | 281 | 992 | 30 | 502 | 8,946 | 10,751 | +37% |
| AFS-1 (check on open) | 398 | 1,455 | 378 | 720 | 8,986 | 11,938 | +53% |
| AFS-2 (callbacks) | 281 | 810 | 8 | 39 | 7,982 | 9,121 | +17% |
The NFS-like client made 900 RPCs:
- 339
GETATTRs, one for every open (close-to-open); - 238
READs and 116WRITEs, in 8 KB blocks; - 109
CREATEs, 77LOOKUPs (its name cache answered the other 2,103 component lookups), 14READDIRs and 7MKDIRs.
38% of its calls were validations.
Its knobs (Part D) move the traffic, but not the open-time checks:
| NFS variant | RPCs | READ | GETATTR | LOOKUP | total ms |
|---|---|---|---|---|---|
| defaults (256 KB memory cache, attributes 3 s, directories 30 s) | 900 | 238 | 339 | 77 | 10,751 |
| unlimited memory cache | 732 | 70 | 339 | 77 | 10,144 |
| 64 KB memory cache | 969 | 307 | 339 | 77 | 10,969 |
| no attribute or name caching | 3,324 | 238 | 643 | 2,180 | 18,025 |
| attributes and directories trusted 60 s | 900 | 238 | 339 | 77 | 10,751 |
Stretching the timeouts to 60 s changed nothing: the 339 remaining GETATTRs are the checks at every open, which no timeout removes. Only a server that tells the client when a file changes can remove them. That is AFS’s callback.
4. Upload/download: AFS
4.1 The Andrew design
AFS’s designers expected 5,000+ workstations, so they asked the scale question first: how many clients can one server support? Every design decision follows from making the server do as little as possible:
- Venus, a user-level process on each workstation, intercepts file calls, finds files in Vice, and caches them whole, on the local disk.
- Venus talks to a server only on open and close. Reads and writes of individual bytes go to the local copy and never involve Venus or the server.
- On close, a modified file is stored back to the server.
Howard et al. list why whole files (paraphrased):
- Locality of file references makes caching attractive: less server load, less network traffic.
- Contacting servers only on open and close keeps the far more numerous reads and writes off the network.
- Most files are read whole, so whole-file transfer can use efficient bulk transfer.
- Disk caches survive reboots, which were frequent on workstations.
- Whole-file caching is simpler: Venus tracks files, not pages.
They also list the drawbacks:
- workstations need local disks;
- a file larger than the cache cannot be used at all;
- UNIX’s semantics for concurrent reads and writes from different workstations cannot be emulated, because reads and writes are not intercepted;
- a distributed database built on such a file system would be very hard, perhaps impossible.
The bet was that, for a university’s users, these did not matter. Experience bore it out.
4.2 The prototype (AFS-1): check on every open
The first AFS (1984–85) was used by about 400 people on 100 workstations and 6 servers. Its cache was pessimistic. Before using a cached file, Venus asked the server whether it was still current — the TestAuth call. Every open therefore cost at least one server interaction, even when the cached copy was valid.
Then it got worse. Many programs stat a file before opening it, some two or three times, and in the prototype every stat was also a validity check. The server also did more work per call than it should have:
- clients named files by full pathname, so the server walked every component (
namei) on every call; - every client had a dedicated server process, so the servers spent their CPU on context switches and paging.
Demo 02’s AFS-1 design reproduces the first two problems:
- 491 of its 899 RPCs were TESTAUTH validations, and with GETSTATP 64% were validations (cf. the prototype’s ~88%, paper);
- its server spent 1,253 of 2,300 CPU ms walking pathnames the clients sent it;
- it was the slowest design even with one client (+53%).
The prototype’s measured behaviour (paper numbers):
- the benchmark ran 70% slower than on a stand-alone workstation at one load unit, and 4.1× slower at ten;
- TestAuth’s response time went from 87 ms at load 1 to 1,050 ms at load 10;
- the bottleneck was the server CPU (about 40% average over eight hours, 75% over five-minute peaks), not the disks (under 15%);
- about 20 active users per server was the practical limit.
4.3 AFS-2: four changes
The redesign kept the architecture — whole files cached on workstations, autonomous servers — and changed its realization in four places:
- Callbacks. Venus stops checking with the server on each open and instead assumes its cached entries are valid until told otherwise. When the server hands out a file or directory, it records a callback: a promise to notify that client before allowing anyone else to modify it. A cached entry with a callback is used with no message at all.
- Two-level names. Each file and directory gets a fixed-length fid (32-bit volume, 32-bit vnode, 32-bit uniquifier). Directories, cached on the client like files, map names to fids. Venus walks the pathname itself and presents fids to the server, so servers never see pathnames. Callbacks make this possible: without them, every component of every path would need a validity check.
- One server process with a handful of non-preemptive lightweight processes (LWPs, typically five), bound to a client only for one operation. This stopped the context switching and paging.
- Low-level storage: the server reaches a file’s data by its inode, through new system calls, instead of by pathname.
Demo 02’s AFS-2 design has changes 1 and 2 (the model has no processes or disks):
- 379 RPCs instead of 899;
- 525 server CPU ms instead of 2,300, of which 0 went on pathnames;
- a ScanDir of 8 ms and a ReadAll of 39 ms — exactly the local disk’s times, because a stat or open of an entry holding a callback sends nothing.
Its 20% “validations” are first-time status fetches (FETCHSTATUS for files it stats but never reads), not re-checks.
The paper’s numbers for AFS-2: the benchmark ran 19% slower than stand-alone (the prototype: 70%), and at 20 load units it took less than twice as long as at one (the prototype: 4.1× at 10).
4.4 Many clients: the scaling experiment
The question that mattered was how the slowdown grows with load. Demo 03 runs 1 to 20 clients at once against one server. Each client runs its own benchmark in its own target folder, and all of them read the same shared source tree:
| design | 1 client | 2 | 5 | 10 | 15 | 20 clients |
|---|---|---|---|---|---|---|
| NFS-like | 10.8 s | 10.8 (×1.00) | 12.7 (×1.19) | 17.4 (×1.62) | 22.9 (×2.13) | 28.1 (×2.61) |
| AFS-1 | 11.9 | 12.3 (×1.03) | 17.3 (×1.45) | 26.0 (×2.18) | 35.3 (×2.96) | 46.1 (×3.86) |
| AFS-2 | 9.1 | 9.1 (×1.00) | 10.1 (×1.10) | 12.1 (×1.33) | 14.2 (×1.55) | 16.2 (×1.78) |
Server CPU utilization tells why:
| design | 1 | 2 | 5 | 10 | 15 | 20 |
|---|---|---|---|---|---|---|
| NFS-like | 11% | 22% | 45% | 69% | 83% | 91% |
| AFS-1 | 19% | 37% | 66% | 88% | 97% | 99% |
| AFS-2 | 6% | 11% | 26% | 43% | 55% | 64% |
The server never became slower; requests waited longer in its CPU queue. Lecture 11 develops the queueing theory. For now, notice that utilization at one client predicts the whole ordering: 19% / 11% / 6%. A design that puts less work on the server per client supports more clients, in proportion.
Which phases suffer? The time at 20 clients divided by the time at 1:
| design | MakeDir | Copy | ScanDir | ReadAll | Make |
|---|---|---|---|---|---|
| NFS-like | ×6.5 | ×8.6 | ×43.3 | ×8.1 | ×1.4 |
| AFS-1 | ×10.5 | ×10.8 | ×10.6 | ×10.4 | ×1.6 |
| AFS-2 | ×6.6 | ×7.6 | ×1.0 | ×1.0 | ×1.0 |
- AFS-2’s ScanDir and ReadAll do not slow down at all: they send nothing, so the server’s queue cannot touch them. Howard et al. saw the same: in AFS-2, ScanDir and ReadAll were hardly affected by load, while Copy and Make, which store files, were most sensitive.
- NFS’s ScanDir slowed ×43, which was not planned. It trusts attributes for 3 s. At 20 clients, Copy took 8.6 s, so the attributes cached during Copy had expired by the time ScanDir used them. Each client lost 121 attribute-cache hits and sent 121 more GETATTRs (339 → 460). A time-based cache loses its hits when the system slows down, and the extra requests slow it further. This positive feedback is worth remembering for Lecture 12.
- Make, dominated by local compilation, barely moves for anyone.
Is this an artifact of the invented costs? Part E reruns the sweep with compile costs of 100 and 400 ms per file:
| compile CPU per file | NFS ×20/×1 | AFS-1 ×20/×1 | AFS-2 ×20/×1 |
|---|---|---|---|
| 100 ms | ×3.71 | ×5.63 | ×2.33 |
| 200 ms | ×2.61 | ×3.86 | ×1.78 |
| 400 ms | ×1.92 | ×2.59 | ×1.42 |
The ranking holds at every cost; the costs only move where saturation begins.
The real 1987 comparison (paper numbers; Sun-3 workstations and server, 10 Mbps Ethernet):
- NFS took 511 s at one load unit and 1,279 s at 18 (×2.5);
- Andrew took 588 s cold and 564 s warm at one, and 874 s and 697 s at 18;
- NFS was slightly faster at low load; the crossover came at about 3–4 load units;
- at one load unit the NFS server’s CPU was 22% busy and the Andrew server’s about 3%;
- at 18, NFS’s CPU was saturated (100%) and one of its disks ~95% busy, against Andrew’s ~40% CPU;
- NFS sent 10,225 packets for one benchmark run, Andrew 3,824.
Our model cannot reproduce NFS’s small-load advantage. It charges AFS nothing for being a user-level process writing fetched files to a local disk; real Venus paid for both.
4.5 The first byte: what whole files cost
Whole-file caching has a price that the benchmark hides: nothing can be read until the whole file has arrived. Demo 02 Part C opens a file, reads one byte and closes it, over a 10 Mbps link with 1 ms latency each way:
| file size | NFS cold | NFS warm | AFS-2 cold | AFS-2 warm |
|---|---|---|---|---|
| 3 B | 9.8 ms | 3.5 ms | 3.5 ms | 0.3 ms |
| 10 KB | 18.4 | 3.5 | 14.5 | 0.3 |
| 100 KB | 18.4 | 3.5 | 113.5 | 0.3 |
| 1 MB | 18.4 | 3.5 | 1,103.5 | 0.3 |
| 10 MB | 18.4 | 3.5 | 11,003.5 | 0.3 |
Remote access fetches only the block it needs, so its first byte costs the same at any size. Whole-file caching is slow for a cold big file and unbeatable when warm.
The paper’s Table XIV shows the same pattern (paper numbers). An Andrew cold open + read of one byte took 160 ms for a 3-byte file and 515 ms for 24 KB; warm, 16 ms; NFS, about 16 ms at any size. The fix came in AFS-3: Venus caches files in 64 KB chunks (Satyanarayanan 1990), which bounds the first-byte delay and allows files larger than the cache.
The same experiment exposed something the plan did not anticipate. With an ordinary 1-second RPC timeout:
- the 1 MB fetch (1.1 s when sent once) was retransmitted while still in progress;
- the server sent the whole file twice;
- the next, tiny call waited behind the duplicate: a warm open took 950 ms instead of 4.
A retransmission timeout tuned for small calls cannot tell a long transfer from a lost one. This is why AFS’s RPC package moved file data with a separately optimized bulk-transfer protocol (paper) instead of plain RPC replies.
4.6 Callbacks are state, and state must survive crashes
Callbacks moved the cost of consistency from the network to the server’s memory:
- In demo 03 the AFS-2 server held 3,880 callback promises for 20 clients (194 for one).
- Every store must break the promises of every other holder.
- A popular, frequently changed file — the paper’s example is the bulletin boards — generates constant breaks and re-fetches.
- If the callback state on the server and on a client ever disagree, a client may use a stale file.
The paper names these costs. To bound them:
- a server may break callbacks to reclaim memory;
- Venus treats every cached entry as suspect after a client reboot and revalidates it on first use;
- Venus probes servers periodically, so lost callbacks are noticed.
Demo 04 Part B shows why the last rule matters. A reader opens a file every 200 ms; a writer changes it at t = 3.3, 5.3 and 7.3 s; the server is down from 2.0 to 2.5 s:
| design | stale reads | delay until the reader saw each write | reader messages |
|---|---|---|---|
| NFS-like (no server state) | 0 | 47 / 88 / 124 ms | 101 |
| AFS-2, no crash | 0 | 105 / 117 / 123 ms | 15 |
| AFS-2, crash, no probes | 28 of 45 | never / never / never | 6 |
| AFS-2, crash, probe every 5 s | 8 | 1,707 / 123 / 129 ms | 21 |
| AFS-2, crash, probe every 1 s | 0 | 114 / 126 / 132 ms | 39 |
- After the reboot the server had forgotten the reader’s callback. It never sent a break, and a reader that never contacts the server reads its old copy forever.
- A periodic probe that returns the server’s epoch (Lecture 4) lets the client notice the restart. It then drops all its callbacks and revalidates. The probe interval bounds the damage. At 1 s, the reboot was noticed before the first write and nothing was stale — at the price of more messages.
Caching also buys availability: AFS-2 served 3 reads from its cache while the server was down, while every NFS read in that window waited. Coda built a whole system on that observation (Lecture 22).
A time limit on every promise — a lease — removes the need to remember promises across a crash. Lecture 7 develops it.
4.7 The consistency AFS promised
Because it intercepts only open and close, AFS defined its semantics around them (paper):
- Writes to an open file are visible to other processes on the same workstation immediately, but invisible elsewhere.
- Once the file is closed, the changes are visible to new opens anywhere; already-open copies elsewhere do not change.
- Other operations (protection changes, directory operations — which are done at the server) are visible everywhere immediately.
- No implicit locking: applications that care about concurrent updates must synchronize themselves.
These are session (open–close) semantics. They are simple to explain and cheap to implement on whole files. What exactly a reader can see under them, and how they compare with one-copy semantics, is Lecture 7’s first topic.
5. Interposition: getting unmodified programs to use remote files
5.1 The idea
Both NFS and AFS let unmodified programs use remote files. The technique is interposition: insert a layer at an existing interface, so that callers of the interface reach your code without knowing it. Interfaces where a file system can be interposed, from closest to the program to farthest:
| layer | how | sees | misses |
|---|---|---|---|
| language runtime / library | replace functions (Python monkey-patching; LD_PRELOAD on C’s open, read …) | calls made through that library | static binaries, direct system calls, other languages |
| system calls | ptrace, seccomp, kernel hooks | every process’s calls | (high cost per call) |
| VFS / vnode interface | a file-system driver in the kernel (NFS, AFS, FUSE) | every file operation on the mounted subtree | nothing below it, nothing outside the mount |
| network | a proxy speaking the file protocol | everything clients send | only what crosses the network |
Demo 01 interposes at the library level in Python. Part A is the tracer of §2. Part B wraps fifteen os functions plus builtins.open while the standard library copies and walks the tree:
shutil.copytreeon 70 files made per file: 2.0open, 3.1os.stat, 1.1os.chmod, 1.1os.utime(and as manyos.chflags);os.walkover the whole tree made only 6lstatcalls, becauseos.scandiralready returns each entry’s type.
An interface that returns more per call saves calls, and in a distributed file system every saved call is a saved round trip. (NFS v3 added READDIRPLUS — a directory listing with attributes — for exactly this reason.)
And what interposition cannot see: on macOS the bytes were copied by fcopyfile, called from C inside shutil, so the wrapper never saw the copy itself. An interposition layer sees exactly the layer it replaces, no more.
5.2 The VFS/vnode layer, and the cost of crossing a boundary
Sun’s vnode interface (Kleiman 1986, introduced with NFS) turned the UNIX kernel into a file-system multiplexer:
- the kernel defines a fixed set of operations on a virtual inode:
lookup,getattr,open,read…; - each file-system type — local disk, NFS, later AFS — supplies a driver implementing them.
This is the classic way to plug a distributed file system in. One detail matters a lot: the kernel resolves pathnames one component at a time, calling the driver’s lookup for each.
That is fine for an in-kernel driver. It is a disaster for a user-level cache manager like Venus, because each lookup becomes a round trip from the kernel to a user process and back. Coda’s designers measured it (Steere et al. 1990, paper numbers):
- without help, the ScanDir and ReadAll phases took 44 s and 71 s;
- their fix was a small in-kernel MiniCache of names, attributes and symbolic links;
- with it, 26 s and 43 s, the same as AFS’s in-kernel driver;
- lookups reaching Venus fell from 5,369 to 0, and getattrs from 875 to 112.
Demo 01 Part C measures the ingredients on today’s hardware:
- a Python wrapper added nothing measurable to a 0.9 µs
os.stat; - a round trip to a helper process over a pipe cost about 12–13 µs, 14–15× the stat;
- the traced benchmark resolves 2,296 pathname components, of which only 193 are names it had not looked up before.
So an upcall per component would cost about 29 ms; an upcall only for new names, about 2.4 ms. The MiniCache idea still holds, and today’s FUSE file systems (user-level drivers) rely on kernel-side caching of names and attributes for the same reason.
5.3 Library interposition (the idea behind Project 1)
The cheapest interposition needs no kernel at all: load a library that defines open, read, close … before the C library does (LD_PRELOAD), and forward those calls somewhere else. It has three limitations:
- it works only for dynamically linked programs that call through the library;
- it sees calls, not intentions: a program that
stats three times before opening (the AFS-1 problem) looks like three independent requests; - it lives inside the application’s process, so any state it keeps — open-file tables, caches — dies with that process.
Project 1 uses this technique to forward file calls by RPC. How to marshal them (Lecture 3) and what to do when the server does not answer (Lecture 4) are its design problems; this lecture supplies only the map of where such a layer sits.
6. Naming
6.1 Names, identifiers, addresses
Every distributed system has to find things, and it helps to separate three kinds of reference (Tanenbaum & van Steen):
- Name: something people use, often meaningful and changeable:
/afs/cs.example.edu/user/alice/notes.txt. - Identifier: a name with three properties. It refers to at most one entity. Each entity has at most one identifier. It is never reused. Examples: an AFS fid, or an NFS file handle including its generation number.
- Address: where the entity can be reached now: a server and port, or a disk block. Addresses change when things move.
A good design resolves name → identifier → address in separate steps, so that each can change without breaking the others.
6.2 Name spaces, resolution and mounting
A hierarchical name space is a graph:
- directories are nodes that map names to children;
- a pathname is resolved by starting at a known node — the root, or the current directory: the closure mechanism, how you know where to start — and following one component at a time.
Resolution can be iterative (the client asks each server for the next step, as NFS’s LOOKUP does) or recursive (the first server forwards the rest of the path onward). Mounting grafts one name space into another at a mount point.
NFS lets each client build its own name space from mounts. Demo 05 Part A shows the consequence with three workstations:
| workstation | mounts | name of serverA:/export/home/alice/bin/tool |
|---|---|---|
| ws1 | /home → serverA, /proj → serverB | /home/alice/bin/tool |
| ws2 | /users → serverA, /proj → serverB | /users/alice/bin/tool |
| ws3 | /home → serverA, /mnt/b → serverB | /home/alice/bin/tool |
One file had 2 different names on 3 workstations, and a shared script using two absolute paths worked on 1 of the 3.
AFS puts the mount points inside the shared name space. Volumes are glued together at mount points that are themselves stored in AFS directories, so every client sees the same tree under /afs. A name means the same thing everywhere: a uniform name space.
6.3 Two-level naming, volumes, and location independence
AFS resolves a name in three steps:
- Pathname → fid, by walking directories the client has cached (with callbacks). Servers never see pathnames.
- fid → volume: the fid’s first 32 bits name a volume, a subtree of files that lives on one server. Typically there is one volume per user.
- volume → server, via the volume location database (VLDB), replicated on every server and cached by clients.
A fid contains no location. That is the key design decision, and it turns location transparency (the name does not say where) into location independence (the object can move without its name changing).
Demo 05 Part B moves alice’s volume from serverA to serverB:
- each AFS client spent one extra RPC — the old server answers “moved”, and the new location is cached — for 3 extra RPCs in total;
- no pathname changed, and no cached directory became invalid.
The NFS-style clients named serverA in their mount tables and in their file handles. Alice’s handles went stale (ESTALE), and every client needed a new mount entry for her directory — 3 manual edits.
Volumes did far more for operability than for naming (paper):
- moves while in use: a copy-on-write clone is shipped, then incremental changes, then a brief switchover;
- per-volume quotas;
- read-only replication of system software on several servers, with no callbacks needed;
- backup: a nightly read-only clone, shipped to tape asynchronously and also mounted in the user’s home directory, so users restore yesterday’s files themselves.
In early 1987 Andrew had about 400 workstations, 16 servers, 3,500 registered users and about 4,000 volumes holding 6,000 MB (paper). The authors called the volume abstraction “indispensable” in a large distributed file system.
6.4 Identifiers must never be reused
The third component of an AFS fid is a uniquifier. The vnode number indexes the server’s table of files, and to keep that table compact the slots of deleted files are reused.
Without the uniquifier, a client still holding the fid of a deleted file would reach whatever file now occupies its slot. Demo 05 Part C runs 3,000 random creates and deletes while a client keeps old fids and occasionally uses them:
| fid design | uses of an old fid | read the wrong file | ESTALE | vnode table size |
|---|---|---|---|---|
| (volume, vnode), slots reused | 433 | 390 | 36 | 163 |
| (volume, vnode, uniquifier), slots reused | 448 | 0 | 292 | 151 |
| (volume, vnode), slots never reused | 448 | 0 | 292 | 1,340 |
- Without a uniquifier, 390 uses silently read a different file — worse than an error.
- Never reusing slots is also safe, but the table grew to 1,340 entries for 128 live files.
- The uniquifier gives both a compact table and identifiers that are never reused.
NFS file handles carry an inode generation number for the same reason, and a stale handle earns the famous ESTALE.
6.5 Who pays for resolution?
Demo 05 Part D counts where the benchmark’s 2,180 pathname components were resolved (one client):
| design | resolved in the client’s cache | LOOKUP messages | walked by the server | server CPU on names |
|---|---|---|---|---|
| NFS-like | 2,103 | 77 | 0 | 0 |
| NFS-like, no name caching | 0 | 2,180 | 0 | 0 |
| AFS-1 | 0 | 0 | 2,506 | 1,253 ms (54%) |
| AFS-2 | 2,180 | 0 | 0 | 0 |
(AFS-1’s server walked more components than the client resolves, because each TESTAUTH and STOREP re-sends the full path.)
The work never disappears; it moves. The scalable designs move it to the place there is more of — the clients — and cache the results there. Satyanarayanan later summed up AFS’s lessons as design principles (The Influence of Scale on Distributed File System Design, 1992; not on the course list):
- workstations have the cycles to burn;
- cache whenever possible;
- exploit usage properties;
- minimize system-wide knowledge and change;
- trust the fewest possible entities;
- batch if possible.
This section is the first principle in action.
7. What happened next (and why it matters for the rest of the course)
- NFS adopted state. NFS v4 (2000s) added opens, locks and leases, plus delegations: the server lets a client cache a file and promises to recall it before others change it. Those are callbacks under another name, and leases bound what is lost when a client vanishes — Lecture 7.
- AFS lives on as OpenAFS (CMU’s
/afsstill runs it) and as the ancestor of Coda. Coda added server replication and disconnected operation: a laptop keeps working from its cache with no server at all — Lectures 10 and 22. - Cluster file systems (GFS, HDFS, Ceph — Lecture 25) chose large files, append-mostly writes and big chunks. They are whole-file thinking again, for a different workload.
- The design questions recur in every caching system you will meet: who validates, how often, what the server must remember, what a crash erases. Web browsers (HTTP’s
If-Modified-Sinceis a check-on-use;max-ageis a TTL), CDNs, DNS and CPU caches all answer them.
Summary
- A distributed file system tries to make remote files transparent: access, location, migration, failure. Each transparency has a price in messages, server state or semantics.
- Real workloads are dominated by metadata (304 stats and 31 listdirs vs. 448 opens in the traced benchmark) and show strong re-use (199 opens of 90 files in Make). The expensive question is “is my copy still good?”, not “send me the bytes”.
- NFS (remote access, stateless server):
- name lookup per component, block READ/WRITE with offsets, at-least-once RPC;
- crash recovery is free (the reader just retransmitted through a 500 ms outage);
- retries of non-idempotent calls produced 17 spurious EEXIST and 22 spurious ENOENT until a duplicate cache (soft state) was added;
- caching by timeouts gives close-to-open consistency and an open-time GETATTR that no timeout removes (339 of 900 RPCs).
- AFS (whole files on local disk, open/close only):
- the prototype’s check-on-open made validations 64% of calls, and its server spent 54% of its CPU walking pathnames (model); it saturated first;
- AFS-2’s callbacks and fids cut RPCs from 899 to 379 and server CPU from 2,300 to 525 ms, and made ScanDir and ReadAll as fast as a local disk;
- from 1 to 20 clients, AFS-2 slowed ×1.78 vs NFS-like ×2.61 and AFS-1 ×3.86 (model; the paper: <2× at 20 for AFS-2, 4.1× at 10 for the prototype);
- the price is state: 3,880 callbacks for 20 clients, breaks on every store, and forgotten promises after a server crash (28 of 45 reads stale until clients probe for a new epoch).
- Whole files cost first-byte latency (11 s for a cold 10 MB file at 10 Mbps vs 18 ms for remote access) and need a bulk-transfer protocol: a 1 s RPC timeout re-sent a 1 MB file while it was still arriving.
- Interposition (library, system call, VFS, network) is how unmodified programs reach a remote file system. Each layer sees only what passes through it. Crossing to a user-level manager per pathname component is costly (Coda’s MiniCache: 5,369 → 0 upcalls, paper; 2,296 → 193 in the trace).
- Naming:
- separate names, identifiers and addresses;
- per-client mounts gave one file 2 names on 3 clients, while AFS’s uniform name space gives one;
- fids with no location make moves cheap (3 extra RPCs vs 3 manual mount edits);
- uniquifiers keep identifiers from being reused (390 of 433 wrong-file reads without one).
Common pitfalls
- “Stateless means no state.” It means no state the server must keep for correctness. NFS servers still keep caches and duplicate tables, and lose them safely.
- Retrying non-idempotent file operations (create-exclusive, remove, rename) without a duplicate cache, and believing the error reply.
- Assuming a TTL cache gives a consistency guarantee. It gives a staleness bound at best, and its hit ratio falls when the system slows down (NFS ScanDir ×43).
- Forgetting that callbacks are state. A server that reboots without telling clients, or a client that misses a break, reads stale data indefinitely.
- Using one RPC timeout for small calls and bulk transfers. Long transfers get retransmitted while still in progress.
- Embedding locations in names (
/net/serverA/..., file handles with server names): moving data breaks every name and every cached reference. - Reusing identifiers (vnode slots, inode numbers) without a uniquifier or generation number: stale references silently reach the wrong object.
- Interposing at the wrong layer: a library shim cannot see static binaries or direct system calls; a VFS driver cannot see what a program meant.
Exercises
-
Count the messages. A program runs in one second: it stats 40 files in one directory, then opens and fully reads 10 of them (each 20 KB), then opens and reads the same 10 again. The client is cold. Count RPCs for the NFS-like design (8 KB blocks, a memory cache large enough, attributes trusted 3 s, every open does GETATTR), the AFS-1 design and the AFS-2 design. Ignore the root directory.
Answer
NFS-like: resolving the directory takes 1 LOOKUP. Each of the 40 stats needs a LOOKUP, which returns attributes, so the stat itself is answered from the attribute cache: 40. Each open does 1 GETATTR: 20. Each first read needs 3 READs (8+8+4 KB): 30; the second reads hit the block cache because the versions did not change. Total about 1 + 40 + 20 + 30 = 91. AFS-1: 40 GETSTATs. First opens: the files are only in the status cache, not the data cache, so the design fetches each one: 10 FETCHPs. Second opens: 10 TESTAUTHs. Total 60, and the server walks every path. AFS-2: 1 FETCH of the directory, 40 FETCHSTATUS for the stats, 10 FETCHes for the first opens (status-only entries need data), 0 for the second. Total 51; with callbacks, any later repetition costs 0. (Replaying this exact workload in `fsworld.py` gives 91, 60 and 52; the extra AFS-2 call is the FETCH of the root directory the question ignores.) -
Effect vs reply, file edition. For each NFS operation, say whether a retry after a lost reply is harmless in its effect and in its reply:
READ(fh, 8192, 4096),WRITE(fh, 0, data),GETATTR(fh),CREATE(dir, "x", exclusive),REMOVE(dir, "x"),RENAME(dir, "a", dir, "b"),MKDIR(dir, "d"). Why is a duplicate-request cache in RAM compatible with “stateless”?Answer
READ, WRITE at an explicit offset and GETATTR are harmless in both effect and reply. CREATE-exclusive, REMOVE, RENAME and MKDIR keep the right effect (the file exists / is gone / is renamed / the directory exists) but the retry returns EEXIST, ENOENT, ENOENT and EEXIST respectively. A duplicate cache in RAM is soft state: losing it in a crash does not make the server *incorrect* for any client it has never heard of. It only re-opens the small window in which a retry spanning the crash gets a misleading error. The server needs no recovery protocol. -
Sizing callback state. A server holds files for 2,000 clients; each client caches about 3,000 of them, and each callback record costs 16 bytes. (a) How much memory do the callbacks take? (b) A shared, writable file is cached by all 2,000 clients and updated once a minute. How many breaks per minute, and what follows each? (c) Why did AFS put system binaries in read-only volumes?
Answer
(a) 2,000 × 3,000 × 16 B = 96 MB — significant for a 1987 server, modest today, but it grows with clients × cache size. (b) 1,999 breaks per update, each likely followed by a re-fetch from every client that uses the file again: an update storm. (c) Read-only volumes never change except by an explicit release, so they need no callbacks at all: no per-client state, no breaks, and they can be replicated on several servers for availability and load. -
Recovering a callback server. Propose three ways for an AFS-2 server and its clients to recover from a server crash without stale reads, and give the cost of each.
Answer
(1) Clients detect the restart — an epoch in every reply and in periodic probes — and treat every cached entry as suspect. Cost: a revalidation per entry on first use, plus probe traffic; staleness is bounded by the probe interval (demo 04). (2) The server writes callback records to stable storage. Cost: a disk write per fetch, which is expensive and slows the common case to speed up the rare one. (3) The server, on restart, refuses to complete any write until every promise it might have made has expired, because promises carry a time limit. Cost: writes wait up to that limit after a reboot. This is leases (Lecture 7), and it needs bounded clock drift. -
Whole files vs blocks. A program reads 1 MB from the middle of a 2 GB video file stored on the server. How many bytes cross the network under NFS-like remote access, under AFS-2 whole-file caching, and under AFS-3 with 64 KB chunks? What if the client’s cache is 1 GB?
Answer
NFS-like: about 1 MB (128 blocks of 8 KB), plus a few lookups. AFS-2: the whole 2 GB before the first byte returns — and with a 1 GB cache the file cannot be opened at all. AFS-3 with chunks: 1 MB rounded up to 64 KB chunks, about 1 MB, and it fits in any reasonable cache. Chunking keeps the cache-management simplicity for small files and removes the size limit for large ones. -
Resolve with a mount table. A client’s mount table is
/(local disk),/home→ A:/export/home,/home/proj→ B:/export/proj,/usr/local→ C:/sw. Resolve/home/proj/x.c,/home/projects/y,/usr/local/bin/tool,/usr/lib/libc.so. What rule did you use, and which name would surprise a user?Answer
Longest matching prefix, on whole components: `/home/proj/x.c` → B:/export/proj/x.c; `/home/projects/y` → A:/export/home/projects/y (not `/home/proj`: `projects` is a different component); `/usr/local/bin/tool` → C:/sw/bin/tool; `/usr/lib/libc.so` → local disk. The surprise: `/home/proj` hides whatever directory A has called `proj` inside `/export/home`. A mount point covers the subtree beneath it, so A's own `proj` becomes invisible on this client. -
Generation numbers. An NFS server identifies files by (device, inode number) only. A client opens file
report(inode 4711), a second client deletesreportand createsnotes, which gets inode 4711. What does the first client’s next READ return? What does adding a generation number change, and why must the server store the generation on disk rather than in memory?Answer
Without a generation number the READ returns `notes`' data — silently the wrong file. With one, the handle (device, 4711, gen 3) no longer matches the inode's current generation 4, so the server returns ESTALE. The generation must be on disk (in the inode) because handles outlive server reboots: after a reboot, an in-memory counter could repeat values and reintroduce the confusion. -
Pick the interposition layer. For each goal, choose a layer from §5.1 and say what it will miss: (a) count file calls made by one Python script you own; (b) give every program on a lab’s workstations access to a shared tree; (c) add a cache in front of an existing file server without touching clients or server; (d) make a statically linked legacy binary use a remote file.
Answer
(a) Library level (monkey-patching, as demo 01): it misses work done in C below the patched functions. (b) VFS level, a kernel driver or FUSE: it sees every program, but nothing outside the mounted subtree, and nothing of the programs' intent. (c) Network level, a proxy speaking the file protocol: it sees only what crosses the network, cannot cache what clients already cache, and must preserve the protocol's consistency rules. (d) A library shim cannot reach a static binary; use the system-call level (ptrace or seccomp interception) or the VFS level.
Related project and problem set (concepts only)
- Project 1 forwards C file operations, intercepted with
LD_PRELOAD, to a server by RPC. §5.3 says where such a layer sits and what it cannot see. Lectures 3–4 cover marshalling and failure semantics. The protocol is yours to design. - Project 2 adds a caching proxy with whole-file caching, open–close session semantics and a freshness protocol. §4 is the historical background (why whole files, why callbacks were invented, what they cost). Lecture 7 covers the consistency protocols in general and Lecture 8 replacement. The proxy’s design is yours.
- Problem Set 2 asks about caching strategies and session semantics; the concepts are in this lecture and Lecture 7, the answers are not.
Further reading
- J. H. Howard et al., “Scale and Performance in a Distributed File System”, ACM TOCS 6(1), 1988 (course reading) — read §2 (prototype), §3 (changes), §5 (the NFS comparison) and §6 (volumes).
- J. H. Morris et al., “Andrew: A Distributed Personal Computing Environment”, CACM 29(3), 1986 (course reading) — the whole Andrew vision, beyond files.
- M. Satyanarayanan, “Scalable, Secure, and Highly Available Distributed File Access”, IEEE Computer 23(5), 1990 (course reading) — AFS-1 → AFS-2 → AFS-3, security, and the start of Coda.
- D. C. Steere, J. J. Kistler, M. Satyanarayanan, “Efficient User-Level File Cache Management on the Sun Vnode Interface”, USENIX Summer 1990 (course reading) — the MiniCache.
- R. Sandberg et al., “Design and Implementation of the Sun Network File System”, USENIX Summer 1985; B. Callaghan, NFS Illustrated (2000).
- S. Kleiman, “Vnodes: An Architecture for Multiple File System Types in Sun UNIX”, USENIX Summer 1986.
- J. Ousterhout et al., “A Trace-Driven Analysis of the UNIX 4.2 BSD File System”, SOSP 1985.
- M. Satyanarayanan, “The Influence of Scale on Distributed File System Design”, IEEE TSE 18(1), 1992 — the design principles.
- A. S. Tanenbaum and M. van Steen, Distributed Systems, 3rd ed., ch. 5 (naming) and §2–3 of ch. 10 in earlier editions (distributed file systems).
Preview of Lecture 6 — Caching fundamentals: locality and cache quality
This lecture used caching everywhere without asking why it works. Lecture 6 asks. Where does locality come from — loops, data structures, people? How did one idea travel from the Atlas computer’s one-level store (1961) through the IBM System/360 Model 85’s “cache” (1968) to file and web caches? Which numbers describe a cache’s quality: hit ratio, miss ratio, average access time, miss-ratio curves, working sets? And how big must a cache be, and where should it sit — client, proxy or server?
术语表 (Glossary, English → 中文)
| English | 中文 |
|---|---|
| distributed file system (DFS) | 分布式文件系统 |
| transparency (access / location / migration / replication / failure / concurrency) | 透明性(访问 / 位置 / 迁移 / 复制 / 故障 / 并发) |
| remote access model | 远程访问模型 |
| upload/download model | 上传/下载模型 |
| whole-file caching / transfer | 整文件缓存 / 传输 |
| block cache / page cache | 块缓存 / 页缓存 |
| attribute cache | 属性缓存 |
| metadata | 元数据 |
| NFS (Network File System) | 网络文件系统 |
| AFS (Andrew File System) | Andrew 文件系统 |
| Vice / Venus | Vice(服务器集合)/ Venus(客户端缓存管理器) |
| stateless / stateful server | 无状态 / 有状态服务器 |
| soft state | 软状态 |
| file handle | 文件句柄 |
| generation number | 代号(世代号) |
| fid (file identifier) | 文件标识符 |
| vnode / VFS (virtual file system) | 虚拟节点 / 虚拟文件系统 |
| uniquifier | 唯一化器(防重用标识) |
| idempotent operation | 幂等操作 |
| duplicate request cache | 重复请求缓存 |
| close-to-open consistency | 关闭-打开一致性 |
| session (open–close) semantics | 会话(打开-关闭)语义 |
| check-on-open / check-on-use | 打开时检查 / 使用时检查 |
| validation (TestAuth) | 有效性验证 |
| callback / callback break | 回调 / 回调撤销 |
| lease | 租约 |
| delegation (NFS v4) | 委托 |
| epoch / probe (keep-alive) | 纪元 / 探测(保活) |
| bulk data transfer | 批量数据传输 |
| first-byte latency | 首字节延迟 |
| chunk | 数据块(分块) |
| lightweight process (LWP) | 轻量级进程 |
| load unit | 负载单位 |
| utilization / saturation | 利用率 / 饱和 |
| server CPU bottleneck | 服务器 CPU 瓶颈 |
| volume | 卷 |
| volume location database (VLDB) | 卷位置数据库 |
| clone (copy-on-write) | 克隆(写时复制) |
| quota | 配额 |
| read-only replication | 只读复制 |
| operability | 可运维性 |
| interposition | 插入(拦截)技术 |
| monkey-patching | 猴子补丁(运行时替换) |
| LD_PRELOAD / library interposition | 预加载库 / 库拦截 |
| upcall | 上行调用 |
| MiniCache | 内核小缓存 |
| FUSE (Filesystem in Userspace) | 用户态文件系统 |
| name / identifier / address | 名字 / 标识符 / 地址 |
| name space / naming context | 名字空间 / 命名上下文 |
| name resolution (iterative / recursive) | 名字解析(迭代 / 递归) |
| closure mechanism | 闭包机制(解析起点) |
| pathname / component | 路径名 / 分量 |
| mount / mount point / mount table | 挂载 / 挂载点 / 挂载表 |
| uniform (global) name space | 统一(全局)名字空间 |
| location transparency / location independence | 位置透明 / 位置无关 |
| forwarding | 转发 |
| stale file handle (ESTALE) | 过期文件句柄 |
| temporal locality | 时间局部性 |
| trace / trace-driven simulation | 跟踪 / 跟踪驱动模拟 |
| benchmark | 基准测试 |