Eknigu top
Home / lib / 0pre-Library / 2003-07_sorted /

ocr-030708023651 UNIX internals new frontierers Uresh Vahalia 632p.djvu



Size 10.0Mb
Date Nov 29, 2003

Besides publishing the protocol, Sun also licensed a reference implementation, which was
used by vendors to port NFS to several operating systems...
For the same reason, the READ
and WRITE requests pass the starting offset as a parameter, unlike read and write operations on local
files, which obtain the offset from the open file object (see Section 8.2.3)...
If this is received by a big-endian machine, it would (in absence
of prior conventions) be interpreted as 0x0301 (decimal 769)...
Since the VAX is little-endian (byte 0 is least significant byte), the sender would have to convert
each integer to big-endian form (mandated by XDR), and the receiver would have to convert it back
to little-endian form...
It also allows the cli-
ent to cache attributes of remote files, so that it can perform some operations without accessing the
server...
Since the clients are sending
valid file handles in NFS requests, the server can assume that a successful mount had taken place
previously and rebuild its internal records...
When the client receives the reply, it allocates a new mode and vnode for the file (if this file
had been looked up previously, the client may already have a vnode for it)...
The Retransmissions Cache
In order to provide reliable transmission, RPC clients repeatedly retransmit requests until they re-
ceive a response...
The only
line of defense is to restrict NFS access to known clients that can be trusted or monitored...
The usual approach is for servers to map the su-
peruser from any client to the user nobody...
Asynchronous writes are optional in NFSv3, and specific clients or servers may not support
them...
While its basic objective is similar to that of NFS, RFS has a funda-
mentally different architecture and design...
For instance, vn open could simply use the RF5 OPEN re-
quest, whereas vn_setattr required an RFS_OPEN, folΎowed by one or more of R_CHMOO,
RFS_CHOWN, and RFS UTIME...
The vnode operations invoke RFS client functions, which extract the file handle
from the vnode and pass it in RFS requests to the server...
The RFS cache has been designed to provide a strong degree of consistency,
meaning that there can be no situations where users can get obsolete data from the cache...
These clients invalidate any
cached data for this file and temporarily disable caching for it...
AFS 2.0 uses a less restrictive consistency protocol,
called session semantics, which performs cache consistency operations only at file open or close...
AFS solves this by simply discarding the data and
12 Prior to AFS 3.0, clients discarded the stale data only on the next open...
As long as the client holds a lock token, it does not need to contact
the server to lock the file, since it is guaranteed that the server will not
grant a conflicting lock to another client...
These include:
Fileset location database (fidb) This is a global, replicated database that contains the
location of each volume...
Replication also allows online backup of individual
filesets, since a replica is a frozen, consistent snapshot of the fileset...
In 1982, UNIX was typically run on a VAX 11/780,
which had a 1-mips (million instructions per second) CPU and 4-8 megabytes of RAM, and was
shared by several users...
Crash recovery is
performed by a program called jgck, which traverses the entire file system, finding and
fixing problems as best as it can...
Increasing the block size to 8 kilo-
bytes will reduce the rotdelay to 1 and increase throughput to one-half the disk bandwidth...




Please wait[ Download ocr-030708023651 UNIX internals new frontierers Uresh Vahalia 632p.djvu ]