NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.

Slides:



Advertisements
Similar presentations
Module 17: Distributed-File Systems Background Naming and Transparency Remote File Access Stateful versus Stateless Service File Replication Example Systems.
Advertisements

CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
1DT057 DISTRIBUTED INFORMATION SYSTEM DISTRIBUTED FILE SYSTEM 1.
Chapter 12 File-System Implementation
Other File Systems: LFS and NFS. 2 Log-Structured File Systems The trend: CPUs are faster, RAM & caches are bigger –So, a lot of reads do not require.
Chapter 11: File System Implementation. File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management.
Chapter 11: File System Implementation. 2 File System Implementation File System Implementation File-System Structure File-System Implementation Directory.
11.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 11: File System Implementation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
Distributed-File Systems
Dr. Kalpakis CMSC 421, Operating Systems File System Implementation.
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
File Systems (2). Readings r Silbershatz et al: 11.8.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
O/S 4740 Chapter 10 File-System Implementation. File system It gives us access to persistent data –Info will survive termination of your process –provides.
Networked File System CS Introduction to Operating Systems.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 AE4B33OSS Chapter 11: File System Implementation Chapter 11: File System.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
1DT057 DISTRIBUTED INFORMATION SYSTEM DISTRIBUTED FILE SYSTEM 1.
Distributed File Systems Distributed file system (DFS) – a distributed implementation of the classical time-sharing model of a file system, where multiple.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 11: File System Implementation.
XE33OSA Chapter 11: File System Implementation. 11.2XE33OSA Silberschatz, Galvin and Gagne ©2005 Chapter 11: File System Implementation Chapter 11: File.
12.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 12: File System Implementation Chapter 12: File System Implementation.
Ridge Xu 12.1 Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation Directory Implementation.
Presented By: Samreen Tahir Coda is a network file system and a descendent of the Andrew File System 2. It was designed to be: Highly Highly secure Available.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 11-2: File System Implementation Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Chapter 11: Implementing File Systems Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 11: Implementing File Systems Chapter.
Chapter 11: File System Implementation. 11.2Operating System – CSCI 380 Chapter 11: File System Implementation Chapter 11: File System Implementation.
Operating System Concepts 7th Edition Abraham SilBerschatz Peter Baer Galvin Greg Gagne Prerequisite: CSE212.
Chapter 11: Implementing File Systems Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 11: Implementing File Systems Chapter.
Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File System Implementation Chapter.
Advanced Operating Systems - Spring 2009 Lecture 20 – Wednesday April 1 st, 2009 Dan C. Marinescu Office: HEC 439 B.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Structure.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 11: File.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File System Implementation Chapter.
Silberschatz, Galvin and Gagne  Operating System Concepts Distributed File Systems Distributed file system (DFS) – a distributed implementation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 11: File.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 11: File.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: Implementing File-Systems.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Outline n File-System.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Distributed File Systems Distributed file system (DFS) – a distributed implementation.
Case Study -- Sun’s Network File System (NFS) NFS is popular and widely used. NFS was originally designed and implemented by Sun Microsystems for use on.
CSE Operating System Principles File System Interface.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 11: File System Implementation.
Chapter 12: File System Implementation
File System Implementation
Chapter 15: Advanced File System
Chapter 11: File System Implementation
File System Implementation
Chapter 12: File System Implementation
Chapter 15: File System Internals
Multiple Processor Systems
Chapter 11: File System Implementation
Distributed File Systems
Distributed File Systems
Distributed File Systems
Multiple Processor and Distributed Systems
Chapter 15: File System Internals
Distributed File Systems
Chapter 15: File System Internals
Distributed File Systems
Network File System (NFS)
Presentation transcript:

NFS

The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation is part of the Solaris and SunOS operating systems running on Sun workstations using an unreliable datagram protocol (UDP/IP protocol and Ethernet), which has become widely accepted throughout the computer industry, known as NFS. The mechanism allows a computer to run a server that makes some or all of its files available for remote access, and allow applications on other computers to access those files.

Remote File Access Vs Transfer When an application accesses a file that resides on a remote machine, the program’s operating system invokes client software that contacts a file server on the remote machine and performs the requested operations on the file. Unlike a file transfer, the application’s system does not retrieve or store an entire file at once; instead, it requests transfer of one small block of data at a time.

Basics Interconnected workstations viewed as a set of independent machines with independent file systems, which allows sharing among these file systems in a transparent manner. Subject to access-rights, potentially any file system (or directory within a file system), can be mounted remotely on top of any local directory. A remote directory is mounted over a local file system director. The mounted directory looks like an integral sub tree of the local file system, replacing the sub tree descending from the local directory.

Basics (Cont) The NFS specification distinguishes between the services provided by a mount mechanism and the actual remote-file-access services. Specification of the remote directory for the mount operation is nontransparent; the host name of the remote directory has to be provided. Files in the remote directory can then be accessed in a transparent manner.

File Access Among Heterogeneous Computers NFS is designed to operate in a heterogeneous environment of different machines, operating systems, and network architectures; the NFS specifications independent of these media. Because a remote file access service connects two machines, it must handle differences in the way the client and server systems name files, denote paths through directories, and store information about files. This independence is achieved through the use of RPC primitives.

NFS and UNIX File Semantics The NFS designers adopted UNIX file system semantics when defining the meaning of individual operations. It honors the same open-read-write-close paradigm as UNIX, and offers most of the same services. Like UNIX, NFS assumes a hierarchical naming system. It considers the file hierarchy to be composed of directories and files.

NFS Mount Protocol In UNIX, the mount mechanism construct a single, unified naming hierarchy from individual file systems on multiple disks. UNIX implementation of NFS client code use an extended version of the mount mechanism to integrate remote file systems into the naming hierarchy along with local file systems. The chief advantage of using the mount mechanism is consistency: all file names have the same form. An application program cannot tell whether a file is local or remote from the name syntax alone.

NFS Mount Protocol Mount operation includes name of remote directory to be mounted and name of server machine storing it –Mount request is mapped to corresponding RPC and forwarded to mount server running on server machine. –Export list – specifies local file systems that server exports for mounting, along with names of machines that are permitted to mount them. Following a mount request that conforms to its export list, the server returns a file handle—a key for further accesses. File handle – a file-system identifier, and an inode number to identify the mounted directory within the exported file system. The mount operation changes only the user’s view and does not affect the server side.

NFS Protocol Provides a set of remote procedure calls for remote file operations. The procedures support the following operations: –searching for a file within a directory –reading a set of directory entries –manipulating links and directories –accessing file attributes –reading and writing files Modified data must be committed to the server’s disk before results are returned to the client (lose advantages of caching) The NFS protocol does not provide concurrency- control mechanisms

Stateless Servers The NFS design stores state information at the client site, allowing servers to remain stateless. Because the server is stateless, disruption in service will not affect client operation. A client will be able to continue file access after a stateless server crashes and reboots; the application program, which runs on the client system, can remain unaware of the server reboot. Because a stateless server does not need to allocate resources for each client, a stateless design can scale to handle more clients than a stateful design.

File Positioning with A Stateless Server Because NFS uses a stateless server design, the client stores all file position information and each request sent to the server must specify the file position to use. In UNIX implementation, NFS uses the local file table to store the position for a remote file just as UNIX uses it to store position in a local file. If the client calls lseek, the system records the new file position in the table without sending a message to the server. Any subsequent access operation extracts the file position from the table and sends it to the server along with the access request.

Reading a Directory Statelessly Because directories can be arbitrarily large and communication networks impose a fixed limit on the size of a single message, reading the contents of a directory may require multiple requests. Because NFS servers are stateless, the server cannot keep a record of each client’s position in the directory. To overcome this limitation, NFS server returns a position identifier when it answers a request for an entry from a directory.

Three Major Layers of NFS Architecture UNIX file-system interface (based on the open, read, write, and close calls, and file descriptors) Virtual File System (VFS) layer – distinguishes local files from remote ones, and local files are further distinguished according to their file-system types –The VFS activates file-system-specific operations to handle local requests according to their file-system types –Calls the NFS protocol procedures for remote requests NFS service layer – bottom layer of the architecture –Implements the NFS protocol

Schematic View of NFS Architecture

NFS Path-Name Translation The path name syntax used by the remote file system may differ from that of the client machine; To keep applications on client machines independent of file locations and server computer systems, NFS requires that only clients interpret full path names. A client traces a path through the server’s hierarchy by sending the server one component at a time and receiving information about the file or directory it names.

NFS Path-Name Translation For example, look up path name /a/b/c on a server, it begins by obtaining information about the server’s root directory, then look up name a in that directory, then look up name b in that directory a, then look up name c in b. To make lookup faster, a directory name lookup cache on the client’s side holds the vnodes for remote directory names.

Summary To allow many clients to access a server and to keep the servers isolated from client crashes, NFS uses stateless servers. To accommodate heterogeneity, NFS requires the client to parse path names and look up each component individually and the server returns a handle. NFS adopted the open-read-write-close paradigm used in UNIX, along with basic file types and file protection modes.