Winter 20021 CMPE 155 Week 6. Winter 20022 Yet more servers… NFS and NIS.

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

Remote Procedure Call Design issues Implementation RPC programming
1 UNIX Internals – the New Frontiers Distributed File Systems.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
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.
Distributed Processing, Client/Server, and Clusters
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE CS582: Distributed Systems Lecture 13, 14 -
Spring 2004 CMPE 151: Network Administration Lecture 5.
File System Implementation
Spring 2004 CMPE 151: Network Administration Lecture 4.
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.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Winter 2005 CMPE 151: Network Administration Servers II.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Administration Class web-page: suraj.lums.edu.pk/~cs582a03.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
University of Pennsylvania 11/21/00CSE 3801 Distributed File Systems CSE 380 Lecture Note 14 Insup Lee.
1 DNS,NFS & RPC Rizwan Rehman, CCS, DU. Netprog: DNS and name lookups 2 Hostnames IP Addresses are great for computers –IP address includes information.
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.
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM R. Sandberg, D. Goldberg S. Kleinman, D. Walsh, R. Lyon Sun Microsystems.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Distributed File Systems Steve Ko Computer Sciences and Engineering University at Buffalo.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
Distributed File Systems 1 CS502 Spring 2006 Distributed Files Systems CS-502 Operating Systems Spring 2006.
Networked File System CS Introduction to Operating Systems.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
Distributed file systems, Case studies n Sun’s NFS u history u virtual file system and mounting u NFS protocol u caching in NFS u V3 n Andrew File System.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
NFS : Network File System SMU CSE8343 Prof. Khalil September 27, 2003 Group 1 Group members: Payal Patel, Malka Samata, Wael Faheem, Hazem Morsy, Poramate.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Distributed File Systems Group A5 Amit Sharma Dhaval Sanghvi Ali Abbas.
Implementing Remote Procedure Calls Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Published: ACM Transactions on Computer Systems,
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Systems: Distributed File Systems Ghada Ahmed, PhD. Assistant Prof., Computer Science Dept. Web:
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
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.
File System Implementation
NFS and AFS Adapted from slides by Ed Lazowska, Hank Levy, Andrea and Remzi Arpaci-Dussea, Michael Swift.
DISTRIBUTED COMPUTING
Chapter 15: File System Internals
Multiple Processor Systems
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
Distributed File Systems
Distributed File Systems
CSE 451: Operating Systems Spring Module 21 Distributed File Systems
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM
Distributed File Systems
Multiple Processor and Distributed Systems
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
Chapter 15: File System Internals
University of Southern California Information Sciences Institute
Outline Review of Quiz #1 Distributed File Systems 4/20/2019 COP5611.
Distributed File Systems
Chapter 15: File System Internals
Lecture 7: RPC (exercises/questions)
Distributed File Systems
Network File System (NFS)
Presentation transcript:

Winter CMPE 155 Week 6

Winter Yet more servers… NFS and NIS.

Winter Network File System (NFS)

Winter File Systems Provide set of primitives that abstract users from details of storage access and management.

Winter Distributed File Systems Promote sharing across machine boundaries. Transparent access to files. Make diskless machines viable. Increase disk space availability by avoiding duplication. Balance load among multiple servers.

Winter Sun Network File System De facto standard: –Mid 80’s. –Widely adopted in academia and industry. Provides transparent access to remote files. Uses Sun RPC and XDR. –NFS protocol defined as set of procedures and corresponding arguments. –Synchronous RPC: Client blocks until it gets results from server.

Winter Stateless server Remote procedure calls are self-contained. Servers don’t need to keep state about previous requests. –Flush all modified data to disk before returning from RPC call. Robustness. –No state to recover. –Clients retry.

Winter Location Transparency Client’s file name space includes remote files. –Shared remote files are exported by server. –They need to be remote-mounted by client.

Winter File system hierarchy Client /root vmunix usr staff students Server 1 /root export users joebob Server 2 /root nfs users ann eve

Winter Achieving Transparency Mount service. –Mount remote file systems in the client’s local file name space. –Mount service process runs on each node to provide RPC interface for mounting and unmounting file systems at client. –Runs at system boot time or user login time.

Winter Automounter Dynamically mounts file systems. Runs as user-level process on clients (daemon). Resolves references to unmounted pathnames by mounting them on demand. Maintains a table of mount points and the corresponding server(s); sends probes to server(s). Primitive form of replication.

Winter Transparency? Early binding. –Mount system call attaches remote file system to local mount point. –Client deals with host name once. –But, mount needs to happen before remote files become accessible.

Winter Other Functions NFS file and directory operations: –read, write, create, delete, getattr, etc. Access control: –File and directory access permissions. Path name translation: –Lookup for each path component. –Caching.

Winter Implementation Unix FS NFS client VFS Client Unix Kernel NFS server Unix FS VFS Server Unix Kernel Client process RPC

Winter Observations NFS didn’t change the file system API. –Users access remote files with the same operations used for local ones. –If access is to remote file, NFS client makes a remote procedure call to NSF server where file resides.

Winter Remote Procedure Call (RPC) Builds on message passing. Main idea: extend traditional (local) procedure call to perform transfer of control and data across network. Easy to use: analogous to local calls. But, procedure is executed by a different process, probably on a different machine. Fits very well with client-server model.

Winter RPC Mechanism 1. Invoke RPC. 2. Calling process suspends. 3. Parameters passed across network to target machine. 4. Procedure executed remotely. 5. When done, results passed back to caller. 6. Caller resumes execution. Is this synchronous or asynchronous?

Winter RPC Advantages Easy to use. Well-known mechanism. Abstract data type –Client-server model. –Server as collection of exported procedures on some shared resource. –Example: file server. Reliable.

Winter RPC Semantics (1) Delivery guarantees. “Maybe call”: –Clients cannot tell for sure whether remote procedure was executed or not due to message loss, server crash, etc. –Usually not acceptable.

Winter RPC Semantics (2) “At-least-once” call: –Remote procedure executed at least once, but maybe more than once. –Retransmissions but no duplicate filtering. –Idempotent operations OK; e.g., reading data that is read-only.

Winter RPC Semantics (3) “At-most-once” call –Most appropriate for non-idempotent operations. –Remote procedure executed 0 or 1 time, ie, exactly once or not at all. –Use of retransmissions and duplicate filtering. –Example: Birrel et al. implementation. Use of probes to check if server crashed.

Winter RPC Implementation (1) work CallerCallee Call packet Result User stub RPC runtime RPC runtime Server stub Server call pck args xmit rcv unpk call return pck result xmit rcv unpk result return

Winter RPC Implementation (2) RPC runtime mechanism responsible for retransmissions, acknowledgments. Stubs responsible for data packaging and un-packaging; –AKA marshalling and un-marshalling: putting data in form suitable for transmission. Example: Sun’s XDR.

Winter Binding How to determine where server is? Which procedure to call? –“Resource discovery” problem Name service: advertises servers and services. Example: Birrel et al. uses Grapevine. Early versus late binding. –Early: server address and procedure name hard-coded in client. –Late: go to name service.

Winter Synchronous and Asynchronous RPC SynchronousAsynchronous Client Server

Winter RPC Performance Sources of overhead –data copying –scheduling and context switch. Light-Weight RPC –Shows that most invocations took place on a single machine. –LW-RPC: improve RPC performance for local case. –Optimizes data copying and thread scheduling for local case.

Winter Transport protocol Originally used UDP. –Better performance in LANs. –NFS and RPC do their own reliability checks. Most current implementations use TCP. –WANs: congestion control. TCP officially integrated in NFS v.3.

Winter Virtual File System (1) VFS added to UNIX kernel. –Location-transparent file access. –Distinguishes between local and remote client: –Processes file system system calls to determine whether access is local (passes it to UNIX FS) or remote (passes it to NFS server: –NFS server receives request and passes it to local FS through VFS.

Winter VFS (2) If local, translates file handle to internal file id’s (in UNIX i-nodes). V-node: If file local, reference to file’s i-node. If file remote, reference to file handle. File handle: uniquely distinguishes file. File system id I-node #I-node generation #

Winter NFS caching File contents and attributes. Client versus server caching. Client Server $$

Winter Server caching Read: –Same as UNIX FS. –Caching of file pages and attributes. –Cache replacement uses LRU. Write: –Write through (as opposed to delayed writes of conventional UNIX FS). Why? –[Delayed writes: modified pages written to disk when buffer space needed, sync operation (every 30 sec), file close].

Winter Client caching (1) Timestamp-based cache invalidation. Read: –Cached entries have TS with last-modified time. –Blocks assumed to be valid for TTL. TTL specified at mount time. Typically 3 sec for files.

Winter Client caching (2) Write: –Modified pages marked and flushed to server at file close or sync (every 30 sec). Consistency? –Not always guaranteed! –E.g., client modifies file; delay for modification to reach servers + 3-sec window for cache validation from clients sharing file.

Winter Cache validation Validation check performed when: –First reference to file after TTL expires. –File open or new block fetched from server. Done for all files (even if not being shared). Expensive! –Potentially, every 3 sec get file attributes. –If needed invalidate all blocks. – Fetch fresh copy when file is next accessed.

Winter Network Information Service (NIS)

Winter NIS Originally called Sun Yellow Pages. –NIS commands still start with “yp”. Administrative database. –Spans server and its clients. –Server keeps authoritative copies of system files. –Server propagates database over network. –Maps in /var/yp.

Winter Data files and the NIS database Data files edited with text editor. Updated files are then converted into database format (hashing) using e.g., ypmake. Example data file: /etc/passwd, /etc/group

Winter Replication Slave servers can replicate network maps. When master copy is updated, updated copy needs to be pushed out to slavs ( yppush and ypxfr ).

Winter NIS Operation ypbind runs on every machine; detects a NIS server and returns its id to client. Server used for all remaining queries. ypserv runs on servers (master and slaves) accepting and answering queries by looking up NIS maps.