Sprite
Overview
- What is Sprite?
- Network OS
- Name and Location transparency: remote file access as local; From user point, do not know where the file locates;
- Process Migration: migrate to idle machine make process run faster
- After 2004, turn off idle machine, to save power and temperature
- Magnetic disks virgil to temperature
- Caching network file system
Motivation
- Networks
- Large memories, large caches, Collections of distributed workstations
- Multiprocessors
Overview
- a set of kernel calls to allow:
- processes on same workstation to share memory
- processes to migrate between workstations
- [ ] use prefix tables to implement a single file name space
- The kernel contains a remote procedure call (RPC) facility that allows the kernel of each workstation to invoke operations on other workstations. The RPC mechanism is used extensively in Sprite to implement other features, such as the network file system and process migration.
- Although the Sprite file system is implemented as a collection of domains on different server machines, it appears to users as a single hierarchy that is shared by all the workstations. Sprite uses a simple mechanism called prefix tables to manage the name space; these dynamic structures facilitate system administration and reconfiguration.
- To achieve high performance in the file system, and also to capitalize on large physical memories, Sprite caches file data both on server machines and client machines. A simple cache consistency mechanism guarantees that applications running on different workstations always use the most up-to-date versions of files, in exactly the same fashion as if the applications were executing on a single machine.
- The virtual memory system uses ordinary files for backing storage; this simplifies the implementation, facilitates process migration, and may even improve performance relative to schemes based on a special-purpose swap area. Sprite retains the code segments for programs in main memory even after the programs complete, in order to allow quick start-up when programs are reused. Lastly, the virtual memory system negotiates with the file system over physical memory usage, in order to permit the file cache to be as large as possible without degrading virtual memory performance.
- Sprite guarantees that processes behave the same whether migrated or not. This is achieved by designating a home machine for each process and forwarding location-dependent kernel calls to the process’s home machine.
Goal
- Provide simple and efficient mechanisms that capitalize on the three technology trends.
- hide the distribution as much as possible
File System
- Network transparency: users should be able to manipulate files n the same ways they did under single machine.
- Name transparency: the location of a file is not indicated directly by its name.
- Namespace is global (single file hierarchy) in Sprite, as compared to the customized namespace in Plan9.
Sharing Address Space
Motivation
- Multiple processes
- multiprocessors
Difference with UNIX
Process Migration
- Proc_Migrate: move a process or group of processes to an idle machine.
- make: invokes the recompilations sequentially
- pmake: invokes multiple recompilations concurrently
Kernel
- multi-threaded synchronization
- monitor-like sytle with many small locks (instead of a single overall lock)
- RPC
- stubs
- RPC transport
- Only used by kernels
- only two packets are transmitted for each remote calls
Cache
- using large caches of recently-used file blocks stored in the main memory of both clients and servers.
- handles sequential write-sharing using version numbers
Extend UNIX in 3 interesting ways
- single uniform name space for files and devices
- name trasnparncey
- all files and devices on all machines accessible anywhere in network
- shared memory among processes
- process migration
- single uniform name space for files and devices
What are the semantics of shared memory
- Code always shared when possible
- Data all or nothing
Two interesting kernel structure
- Support for multiprocessor
- UNIX: one process could make a system call,
- Support for RPC
- Standard RPC mechanism
- As with V, larget transfer across multiple packets are only ACKed once
- Support for multiprocessor
Note: Sprite RPC is an internal OS feature, not exposed to applications
Prefix Table
- Today distributed system all have this kind of table
What are prefix tables and domains, and how are they used?
- Prefix table is a hint, information could be not up-to-date
- Server does not have data, disk broadcast the request/ask the master, change prefix table
How does it compare with UNIX’s NFS mounts?
'Remote links' are used to distinguish a mount point. How do clients resolve unknown mappings?
- How is reconfiguration handles?
Caching
One important aspect of Sprite it that it caches file data on both clients and servers.
- client caches absorb read reuse and delayed writes
- server caches
- very large memories
- exploit sharing among many client
- Note: Vk kernel avoided caching
Cache Consistency
- How to maintain consistency
- Each data have a version number
- ‘Eventual’ consistency
- Two cache consistency situations and how are they handled?
- sequential write-sharing: written by one machine, then read by another
- concurrent write-sharing: written by both machines
- Disable caches
Consistency vs. Correct Synchronization
- Sprite provide consistency not guarantee applications perform reads/writes in synchronized ways. What does it mean? Why are they different?
- Sync : prevent two people access sth at the same time
- Consistency: because system have multiple copies
VM
- Sprite differs from UNIX in its use of files as backing store. Why?
- uniform naming across network
- facilitates process migration
- can aggregate backing store for multiple diskless clients onto one machine
- don’t have to commit separate disk space to backing store
- can cache client backing store pages in server cache
- Put vm into img file, reload to another machine
- Why use separate backing store files for stack and data?
What is double caching? How to handle it? What is double caching an artifact of?
- Files could be cached by file system buffering cache, use memory twice. With xxx,
Summary
Sprite is primarily remembered for
- file caching protocol
- dynamic balance between VM and file buffer cache usage
- argument about large client and server caches