sun network file system presentation 3 group a4 sean hudson, syeda taib, manasi kapadia

17
Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Upload: alan-richard

Post on 14-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Sun Network File System

Presentation 3

Group A4

Sean Hudson, Syeda Taib, Manasi Kapadia

Page 2: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

ProblemHow can physically distributed computers share a file system?

Page 3: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Solution

Sun’s Network File System (NFS)

Page 4: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Background

Developed by Sun.The NFS specification is platform

independent:– Portable– Operates in a heterogeneous environment.

Page 5: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Fundamentals

NFS was developed to allow a machine to mount a disk partition on a remote machine as if it were local.

This allows for fast, seamless sharing of file across network.

There is no global naming hierarchy.NFS allows any machine to be client or

server.

Page 6: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

NFS Protocols

Mount ProtocolFile Access ProtocolTheir functionality is defined as a set of

Remote Procedure Calls (RPC).

Page 7: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Mount Protocol

usrServer

OpenOpen LocalLocal

homeClient

Dir1Dir1 Dir2Dir2

Mount

Request

Page 8: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Mount Protocol (cont.)

After mount request, server returns a file handle (a key for further access).

Mount operation changes only the user’s view.

Page 9: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

NFS Protocol

Client

RPC CallsRPC Calls

• Search • Read/Write • Manipulate links/directories

Server

Page 10: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Implementation

Three major layers of NFS architecture:System Call layer:

– This handles calls like OPEN, READ, and CLOSE.

Virtual File System (VFS) layer: – distinguishes local files from remote ones.

NFS service layer: – implements the RPC calls.

Page 11: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Schematic view of NFS

System call layer

Virtual file system layer

Local OS NFS client

Message to

serverLocal diskMessage

from client Local disk

Virtual file system layer

Local OSNFS server

Client Server

Page 12: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Pathname Translation

This is done by breaking the path into component names and performing a separate NFS lookup for every pair of component name and directory v-node.

Lookups are performed remotely by the server.

Page 13: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Performance

Clients cache file attributes (i-nodes) and file data.

Cached data blocks and directories are discarded periodically.

When a cached file is open, the time it was last modified is checked at the server. If necessary, a new copy is brought from the server.

Page 14: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Performance (cont.)

Servers keep a cache to reduce disk I/O.Read-ahead cachingWrite-behind caching

– Periodically, modified cache blocks are written back to servers.

Page 15: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Issues

Synchronization of file accesses are not well-defined.

Widely criticized for not implementing the UNIX semantics.

Page 16: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

Conclusion

NFS is a simple, popular and widely used file system!

Page 17: Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia

References

Casvant, Thomas and Singhal, Mukesh. Distributed Computing Systems. IEEE Press.

Mullender, Sape. Distributed Systems. ACM Press. Pradeep, Sinha K. Distributed Operating Systems. IEEE

Computer Society Press. Stallings, William. Operating Systems. Tanenbaum, Andrew. Distributed Operating Systems.