UT CS 372 - Network and Distributed File Systems

Unformatted text preview:

kdiibdNetwork and DistributedFile SystemsWithcontentfromDistributedCommunicationSystemsChristopheBisciglia,AaronKimball,&SierraMichels‐Slettvet1From Local to Network File SystemSo far, we have assumed that files are stored on local disk …How can we generalize the design to access files stored on aHow can we generalize the design to access files stored on a remote server?Need to invoke file creation and management methods on the remote serverBasic mechanisms: 2¾ Message passing primitives¾ Remote Procedure Calls (RPC)A network file system is likely to be better than a local file system in what respects?¾AR d/ it f¾A. Read/write performance¾ B. Availability¾ C. Fault tolerance¾ D. Ease of management3Communication and synchronization based on...¾ Shared memory Assume processes/threads can d& it t f h dProcess CoordinationTwo fundamental approachesProgram Coderead & write a set of shared memory locations Inter-process communication isimplicit, synchronization is explicitthreadthread threadthreadExecution StackExecution StackDataExecution StackMessage passingInterprocess communication is 4receive(message )processprocess processprocesssend(message)Inter-process communication is explicit, synchronization is implicitProcess CoordinationShared Memory v. Message PassingShared memory¾ Efficient, familiar¾Difficult to provide acrossprocess foobeginprocess barbeginglobal int x = 0;¾Difficult to provide across machine boundaries.Canonical syntax:g:x := 1:end foog:while(x==0) ;:end barMessage passingExtensible to communication in distributed systems5send(int id, String message);receive(int id, String message);Message PassingNaming communicantsHow do processes refer to each other?¾ Does a sender explicitly name a receiver?Can a receiver receive froma group? (a reduction operation)R1S1S RCan a message be sent to a group?6“Mailbox”S11R2R2RmRm...“Port”R1S12S2nSn...Web requests conform to what model?1Many-to-one1.Many-to-one2. One-to-one3. One-to-many7Message Passing IssuesSynchronization semanticsWhen does a send/receive operation terminate?OS KernelSender ReceiverBlocking:Sender waits until its message is receivedNon-blocking: Send operation “immediately” returnsReceive operation returns if no message is Sender waits until its message is receivedReceiver waits if no message is available8OS KernelSender ReceiverPartially blocking/non-blocking:send()/receive() with timeoutavailableSemantics of Message Passingsend(receiver, message)Blocking Non-blockingSynchronizationSend message to receiverWait until message is accepted.Broadcast message to all Send message to receiverBroadcast message to all Explicit(single)Impli itNaming9Broadcast message to all receivers. Wait until message is accepted by allBroadcast message to all receiversImplicit(group)Semantics of Message Passingreceive(sender, message)Blocking Non-blockingSynchronizationWait for a message from senderWait for a message from If there is a message from senderthen receive it, else continueIf there is a message from Explicit(single)Impli itNaming10Wait for a message from any senderIf there is a message from any sender then receive it, else continueImplicit(group)Which do you think would be easier to program?AA message passing program that blocksA.A message passing program that blocks.B. A message passing program that does not block.11RPC is not message passingRegular client-server protocols involve sending data back and forth according to shared stateClient: Server:Client: Server:HTTP/1.0 index.html GET 200 OKLength: 2400(file data)12HTTP/1.0 hello.gif GET200 OKLength: 81494…Remote Procedure CallRPC servers will call arbitrary functions in dll, exe, with arguments passed over the network, and return values back over networkClient: Server:foo.dll,bar(4, 10, “hello”)“returned_string”foo.dll,baz(42) err: no such function 13…RPC: Message Passing EvolvesRemote procedure calls abstract out the send/await-replyparadigm“Client” “Server”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 itiStubFileServerApplicationStub14communicationOSKernelRemote Procedure Callprocess P1begin:call Function(args):procedure realFunction(args)begin::return(results):end P1return(results)end realFunctionprocedure Function(args)begin<marshall parameters>d(Fi)process FunctionServerbeginloopsender := select()receive(sender,params)<unpack parameters>15Client ServerNetworksend(FunctionServer,params)receive(FunctionServer,results)<unpack results> return(results)end Functionunpack parameterscall realFunction(args)<marshall results>send(sender,results)end loopend FunctionServerRPC (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 clientImplementation issues:¾ Stub generation Can be automated Requires the signature of the procedure¾ How does a client locate a server? … Binding16g Static – fixed at compile-time Dynamic – determined at run-time with the help of a name service¾ Why run-time binding? Automatic fail-overProblems with RPC Failure handling¾ A program may hang because of Failure of a remote machine; or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”Pf17Performance¾ Cost of procedure call << same machine RPC << network RPCJava RMI (remote method invocation) is an example of an RPC system.YA.YesB. NoA. Programmer convenienceIfWhy use RPC?18B.Improve performanceC. Simplify implementationD. Simplify APINetwork and Distributed File SystemsProvide transparent access to files stored on remote disksIssues:¾ 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?19server failures?¾ Consistency: How do we allow multiple remote clients to access the same files?Naming IssuesTwo Approaches To File Naming¾ Explicit naming: <file server: file name >E g windows file sharesE.g., windows


View Full Document

UT CS 372 - Network and Distributed File Systems

Documents in this Course
MapReduce

MapReduce

17 pages

Processes

Processes

19 pages

MapReduce

MapReduce

17 pages

Load more
Download Network and Distributed File Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Network and Distributed File Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Network and Distributed File Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?