Unformatted text preview:

CS162 Operating Systems and Systems Programming Lecture 25 Distributed File Systems November 26 2008 Prof John Kubiatowicz http inst eecs berkeley edu cs162 Review RPC Information Flow Machine B Server callee 11 26 08 return Client Stub send Packet Handler receive unbundle mbox2 ret vals bundle ret vals return Server send Stub call receive unbundle args Kubiatowicz CS162 UCB Fall 2008 Network Machine A call Network Client caller bundle args mbox1 Packet Handler Lec 25 2 Goals for Today Finish Remote Procedure Call Examples of Distributed File Systems Cache Coherence Protocols for file systems Note Some slides and or pictures in the following are adapted from slides 2005 Silberschatz Galvin and Gagne Slides on Testing from George Necula CS169 11 26 08 Kubiatowicz CS162 Fall 2008 notes by Lec 25 3 Many slides generated from UCB my lecture RPC Details continued How does client know which mbox to send to Need to translate name of remote service into network endpoint Remote machine port possibly other info Binding the process of converting a user visible name into a network endpoint This is another word for naming at network level Static fixed at compile time Dynamic performed at runtime Dynamic Binding Most RPC systems use dynamic binding via name service Name service provides dynamic translation of service mbox Why dynamic binding Access control check who is permitted to access service Fail over If server fails use a different one What if there are multiple servers Could give flexibility at binding time Choose unloaded server for each new client Could provide same mbox router level redirect Choose unloaded server for each new request Only works if no state carried from one call to next What if multiple clients Pass pointer to client specific return mbox in request 11 26 08 Kubiatowicz CS162 UCB Fall 2008 Lec 25 4 Problems with RPC Non Atomic failures Different failure modes in distributed system than on a single machine Consider many different types of failures User level bug causes address space to crash Machine failure kernel bug causes all processes on same machine to fail Some machine is compromised by malicious party Before RPC whole system would crash die After RPC One machine crashes compromised while others keep working Can easily result in inconsistent view of the world Did my cached data get written back or not Did server do what I requested or not Answer Distributed transactions Byzantine Commit Performance Cost of Procedure call same machine RPC network RPC Means programmers must be aware that RPC is not free Caching can help but may make failure handling complex 11 26 08 Kubiatowicz CS162 UCB Fall 2008 Lec 25 5 Cross Domain Communication Location Transparency How do address spaces communicate with one another Shared Memory with Semaphores monitors etc File System Pipes 1 way communication Remote procedure call 2 way communication RPC s can be used to communicate between address spaces on different machines or the same machine Services can be run wherever it s most appropriate Access to local and remote services looks the same Examples of modern RPC systems CORBA Common Object Request Broker Architecture DCOM Distributed COM RMI Java Remote Method Invocation 11 26 08 Kubiatowicz CS162 UCB Fall 2008 Lec 25 6 Microkernel operating systems Example split kernel into application level servers File system looks remote even though on same machine App App App file systemWindowing VM Networking Threads App File sys windows address spaces threads RPC Monolithic Structure Microkernel Structure Why split the OS into separate domains Fault isolation bugs are more isolated build a firewall Enforces modularity allows incremental upgrades of pieces of software client or server Location transparent service can be local or remote For example in the X windowing system Each X client can be on a separate machine from X server Neither has machineCS162 with UCB the Fall frame 11 26 08 to run on the Kubiatowicz 2008buffer Lec 25 7 Distributed File Systems Read File Network Client Data Distributed File System Server Transparent access to files stored on a remote disk Naming choices always an issue Hostname localname Name files explicitly No location or migration transparency Mounting of remote file systems mount kubi jan e System manager mounts remote file system by giving name and local mount point Transparent to user all reads and writes look like local reads and writes to user e g users sue foo sue foo on server A single global name space every file in the world has unique name Location Transparency servers mount can change and files can move coeus su e without involving user 11 26 08 Kubiatowicz CS162 UCB Fall 2008 mount kubi pro g Lec 25 8 Virtual File System VFS VFS Virtual abstraction similar to local file system Instead of inodes has vnodes Compatible with a variety of local and remote file systems provides object oriented way of implementing file systems VFS allows the same system call interface the API to be used for different types of file systems The API is to the VFS interface rather than any specific type of file system 11 26 08 Kubiatowicz CS162 UCB Fall 2008 Lec 25 9 Simple Distributed File System Read RPC Return Data Client C P R e t i Wr K AC Servercache Client Remote Disk Reads and writes forwarded to server Use RPC to translate file system calls No local caching can be caching at server side Advantage Server provides completely consistent view of file system to multiple clients Problems Performance Going over network is slower than going to local memory Lots of network traffic not well pipelined Server can be a bottleneck 11 26 08 Kubiatowicz CS162 UCB Fall 2008 Lec 25 10 Administrivia MIDTERM II Wednesday December 3th One week from today 5 30 8 30 10 Evans All material up to next Monday lectures 13 26 Includes virtual memory One page of handwritten notes both sides Final Exam December 18th 8 00 11 00am Bechtel Auditorium Covers whole course except last lecture Two pages of handwritten notes both sides Final Topics Any suggestions 11 26 08 Kubiatowicz CS162 UCB Fall 2008 Lec 25 11 Use of caching to reduce network load read f1 V1 cache read f1 V1 read f1 V1 F1 V1 Client read f1 V1 write f1 OK read f1 V2 cache F1 V2 Read RPC Return Data C P R e it r W K AC Servercache F1 V2 F1 V1 Client Idea Use caching to reduce network load In practice use buffer cache at source and destination Advantage if open read write close can be done locally don t need to do any network traffic fast


View Full Document

Berkeley COMPSCI 162 - Lecture 25 Distributed File Systems

Documents in this Course
Lecture 1

Lecture 1

12 pages

Nachos

Nachos

41 pages

Security

Security

39 pages

Load more
Loading Unlocking...
Login

Join to view Lecture 25 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 Lecture 25 Distributed File Systems 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?