1 Network and Distributed File Systems With content from Distributed Communication Systems Christophe Bisciglia, Aaron Kimball, & Sierra Michels-Slettvet.

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

Remote Procedure Call Design issues Implementation RPC programming
©2009 Operačné systémy Procesy. 3.2 ©2009 Operačné systémy Process in Memory.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Distributed Storage March 12, Distributed Storage What is Distributed Storage?  Simple answer: Storage that can be shared throughout a network.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
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.
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
Network Operating Systems Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by: –Logging into the.
L-7 RPC 1. Last Lecture Important Lessons - Naming Naming is a powerful tool in system design  A layer of indirection can solve many problems Name+context.
Consistency in NFS and AFS. Network File System (NFS) Uses client caching to reduce network load Built on top of RPC Server cache: X Client A cache: XClient.
Distributed Systems Lecture #3: Remote Communication.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Distributed File System: Design Comparisons II Pei Cao Cisco Systems, Inc.
02/02/2004CSCI 315 Operating Systems Design1 Interprocesses Communication Notice: The slides for this lecture have been largely based on those accompanying.
Communication in Distributed Systems –Part 2
02/01/2010CSCI 315 Operating Systems Design1 Interprocess Communication Notice: The slides for this lecture have been largely based on those accompanying.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
PRASHANTHI NARAYAN NETTEM.
.NET Mobile Application Development Remote Procedure Call.
Interprocess Communication. Process Concepts Last class.
Distributed File Systems Sarah Diesburg Operating Systems CS 3430.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Networked File System CS Introduction to Operating Systems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.
Chapter 20 Distributed File Systems Copyright © 2008.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
Operating Systems Chapter 14 Distributed File Systems Hung Q. Ngo KyungHee University Spring 2009
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Shuman Guo CSc 8320 Advanced Operating Systems
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Distributed File Systems Architecture – 11.1 Processes – 11.2 Communication – 11.3 Naming – 11.4.
The Mach System Silberschatz et al Presented By Anjana Venkat.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
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?
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
Implementing Remote Procedure Call Landon Cox February 12, 2016.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in 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.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Operating Systems Distributed-System Structures. Topics –Network-Operating Systems –Distributed-Operating Systems –Remote Services –Robustness –Design.
Lecture 5: RPC (exercises/questions). 26-Jun-16COMP28112 Lecture 52 First Six Steps of RPC TvS: Figure 4-7.
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Distributed File Systems
DISTRIBUTED COMPUTING
Sarah Diesburg Operating Systems COP 4610
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
Lecture 6: RPC (exercises/questions)
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
Last Class: Communication in Distributed Systems
Presentation transcript:

1 Network and Distributed File Systems With content from Distributed Communication Systems Christophe Bisciglia, Aaron Kimball, & Sierra Michels-Slettvet

2 From Local to Network File System So far, we have assumed that files are stored on local disk … How can we generalize the design to access files stored on a remote server? Need to invoke file creation and management methods on the remote server Basic mechanisms:  Message passing primitives  Remote Procedure Calls (RPC)

3 A network file system is likely to be better than a local file system in what respects?  A. Read/write performance  B. Availability  C. Fault tolerance  D. Ease of management

4 Communication and synchronization based on...  Shared memory  Assume processes/threads can read & write a set of shared memory locations  Inter-process communication is implicit, synchronization is explicit Process Coordination Two fundamental approaches thread Execution Stack Program Code Data Execution Stack receive(message ) process send(message) Message passing Inter-process communication is explicit, synchronization is implicit

5 Process Coordination Shared Memory v. Message Passing Shared memory  Efficient, familiar  Difficult to provide across machine boundaries. send(int id, String message); receive(int id, String message); send(int id, String message); receive(int id, String message); Canonical syntax: process foo begin : x := 1 : end foo process bar begin : while(x==0) ; : end bar global int x = 0; Message passing Extensible to communication in distributed systems

6 Message Passing Naming communicants How do processes refer to each other?  Does a sender explicitly name a receiver? Can a receiver receive from a group? (a reduction operation) “Mailbox” S S R1R1 R1R1 R2R2 R2R2 RmRm RmRm... “Port” R R S1S1 S1S1 S2S2 S2S2 SnSn SnSn... S S R R Can a message be sent to a group?

7 Web requests conform to what model? 1. Many-to-one 2. One-to-one 3. One-to-many

8 Message Passing Issues Synchronization semantics When does a send/receive operation terminate? OS Kernel SenderReceiver OS Kernel SenderReceiver Partially blocking/non-blocking: send() / receive() with timeout Non-blocking: Send operation “immediately” returns Receive operation returns if no message is available Blocking: Sender waits until its message is received Receiver waits if no message is available

9 Semantics of Message Passing send(receiver, message) Send message to receiver Wait until message is accepted. Broadcast message to all receivers. Wait until message is accepted by all Send message to receiver Broadcast message to all receivers BlockingNon-blocking Explicit (single) Implicit (group) Synchronization Naming

10 Semantics of Message Passing receive(sender, message) Wait for a message from sender Wait for a message from any sender If there is a message from sender then receive it, else continue If there is a message from any sender then receive it, else continue BlockingNon-blocking Explicit (single) Implicit (group) Synchronization Naming

11 Which do you think would be easier to program? A. A message passing program that blocks. B. A message passing program that does not block.

12 RPC is not message passing Regular client-server protocols involve sending data back and forth according to shared state Client: Server: HTTP/1.0 index.html GET 200 OK Length: 2400 (file data) HTTP/1.0 hello.gif GET 200 OK Length: …

13 Remote Procedure Call RPC servers will call arbitrary functions in dll, exe, with arguments passed over the network, and return values back over network Client: Server: foo.dll,bar(4, 10, “hello”) “returned_string” foo.dll,baz(42) err: no such function …

14 RPC: Message Passing Evolves Remote procedure calls abstract out the send/await-reply paradigm into a “procedure call” Remote procedure calls can be made to look like “local” procedure calls by using a stub that hides the details of remote communication OS Kernel “Client”“Server” Stub File Server Application Stub

15 Remote Procedure Call process P1 begin : call Function(args) : end P1 process P1 begin : call Function(args) : end P1 procedure realFunction(args) begin : return(results) end realFunction procedure realFunction(args) begin : return(results) end realFunction ClientServerNetwork procedure Function(args) begin send(FunctionServer,params) receive(FunctionServer,results) return(results) end Function procedure Function(args) begin send(FunctionServer,params) receive(FunctionServer,results) return(results) end Function process FunctionServer begin loop sender := select() receive(sender,params) call realFunction(args) send(sender,results) end loop end FunctionServer process FunctionServer begin loop sender := select() receive(sender,params) call realFunction(args) send(sender,results) end loop end FunctionServer

16 RPC (Cont’d.) Similarities between procedure call and RPC  Parameters  request message  Result  reply message  Name of procedure  passed in request message  Return address  mailbox of the client Implementation issues:  Stub generation  Can be automated  Requires the signature of the procedure  How does a client locate a server? … Binding  Static – fixed at compile-time  Dynamic – determined at run-time with the help of a name service  Why run-time binding?  Automatic fail-over

17 Problems with RPC Failure handling  A program may hang because of  Failure of a remote machine; or  Failure of the server application on the remote machine  An inherent problem with distributed systems, not just RPC  Lamport: “A distributed system is one where you can’t do work because some machine that you have never heard of has crashed” Performance  Cost of procedure call << same machine RPC << network RPC

18 Java RMI (remote method invocation) is an example of an RPC system. A. Yes B. No A. Programmer convenience B. Improve performance C. Simplify implementation D. Simplify API Why use RPC?

19 Network and Distributed File Systems Provide transparent access to files stored on remote disks Issues:  Naming: How do we locate a file?  Performance: How well does a distributed file system perform as compared to a local file system?  Failure handling: How do applications deal with remote server failures?  Consistency: How do we allow multiple remote clients to access the same files?

20 Naming Issues Two Approaches To File Naming  Explicit naming:  E.g., windows file shares  //witchel-laptop/Users/witchel/Desktop  Implicit naming  Location transparency: file name does not include name of the server where the file is stored Server must be identified. Most common solution (e.g., NFS)  Static, location-transparent mapping  Example: NFS Mount protocol  Mount/attach remote directories as local directories  Maintain a mount table with directory  server mapping, e.g., mount zathras:/vol/vol0/users/witchel /home/witchel

21 Performance Issues: Simple Case Simple case: straightforward use of RPC  Use RPC to forward every file system request (e.g., open, seek, read, write, close, etc.) to the remote server  Remote server executes each operation as a local request  Remote server responds back with the result Advantage:  Server provides a consistent view of the file system to distributed clients. What does consistent mean? Disadvantage:  Poor performance Solution: Caching

22 Why does turning every file system operation into an RPC to a server perform poorly? 1. Disk latency is larger than network latency 2. Network latency is larger than disk latency 3. No server-side cache 4. No client-side cache

23 Sun’s Network File System (NFS) Cache data blocks, file headers, etc. both at client and server  Generally, caches are maintained in memory; client-side disk can also be used for caching  Cache update policy: write-back or write-through Advantage:  Read, Write, Stat etc. can be performed locally  Reduce network load and  Improve client performance Problem: How to deal with failures and cache consistency?  What if server crashes? Can client wait for the server to come back up and continue as before?  Data in server memory can be lost  Client state maintained at the server is lost (e.g., seek + read)  Messages may be retried  What if clients crash?  Loose modified data in client cache

24 NFS Protocol: Statelessness Stateful vs. stateless server architectures NFS uses a stateless protocol  Server maintains no state about clients or open files (except as hints to improve performance)  Each file request must provide complete information  Example: ReadAt(inode, position) rather than Read(inode)  When server crashes and restarts, it processes requests as if nothing has happened ! Idempotent operations  All requests can be repeated without any adverse effects Result:  Server failures are (almost) transparent to clients  When server fails, clients hang until the server recovers or crash after a timeout

25 NFS Protocol: Consistency What if multiple clients share the same file?  Easy if both are reading files …  But what if one or more clients start modifying files? Client-initiated weak consistency protocol  Clients poll the server periodically to check if the file has changed  When a file changes at a client, server is notified  Generally, using a delayed write-back policy  Clients on detecting a new version of file at the server obtain a new version Consistency semantics determined by the cache update policy and the file-status polling frequency Other possibility: server-initiated consistency protocol

26 NFS: Summary Key features:  Location-transparent naming  Client-side and server-side caching for performance  Stateless, client-driven architecture  Weak consistency semantics Advantages:  Simple  Highly portable Disadvantages:  Inconsistency problems

27 Andrew File System (AFS): A Case Study Originally developed at CMU  later adapted to DFS by IBM Key features:  Callbacks: server maintains a list of who has which files  Write-through on file close  On receiving a new copy, server notifies all clients with a file copy  Consistency semantics:  Updates are visible only on file close  Caching:  Use local disk of clients as caches  Can store larger amount in cache  smaller server load  Handling server failures:  Loose all callback state  need a recovery protocol to rebuild state Pros and cons:  Use of local disk as a cache reduces server load  Callbacks  server is not involved in read-only files at all  Central server is still the bottleneck (for writes, failures, …)