RTUComputer ScienceYr 2020 · Sem 82020

Q15Distributed Systems

Question

4 marks

Discuss the architecture of Sun Network File System (NFS).

Answer

An architectural exposition of the Sun Network File System (NFS). Details its stateless mathematical design, VFS integration, and how it violently abstracts remote server storage into local UNIX directory structures.

Sun NFS is the absolute foundational architecture for distributed file sharing in UNIX environments. It allows a client machine to mathematically mount a hard drive located on a physical server 1,000 miles away, presenting it perfectly to the local user as if it were a local /home directory.

The genius of NFS is its integration with the OS kernel via VFS. When a user executes a cat /data/file.txt command, the kernel violently intercepts it at the VFS layer. VFS mathematically analyzes the inode. If it is local, it sends the command to the local hard drive (ext4). If the inode mathematically points to NFS, VFS instantly routes the request to the NFS Client daemon, completely hiding the physical network from the user application.

NFSv2 and NFSv3 were designed strictly as Stateless Servers. This is a massive architectural decision.

  • The NFS server mathematically remembers absolutely nothing about the clients. It does not track who has which file open.
  • Every single RPC request from the client (e.g., READ) must mathematically contain the complete File Handle, the exact Offset, and the byte length.
  • The Merit: If the NFS Server mathematically crashes and reboots, it does not need to execute catastrophic state recovery. The clients simply keep sending their RPC requests until the server wakes up and blindly answers them.

To prevent the network from bottlenecking on every single read, the NFS Client aggressively caches data blocks in its local physical RAM. However, this introduces catastrophic Cache Consistency issues. If Client A modifies the file in its RAM, Client B might mathematically read stale data until the blocks are violently synced back to the master server.

Back to Paper