THE ANDREW FILE SYSTEM BY: HAYDER HAMANDI

Similar documents
The Andrew File System (AFS)

The Andrew File System (AFS)

Distributed File Systems

Distributed File Systems I

Background. 20: Distributed File Systems. DFS Structure. Naming and Transparency. Naming Structures. Naming Schemes Three Main Approaches

NFS: Naming indirection, abstraction. Abstraction, abstraction, abstraction! Network File Systems: Naming, cache control, consistency

Chapter 17: Distributed-File Systems. Operating System Concepts 8 th Edition,

Distributed File Systems. Case Studies: Sprite Coda

AN OVERVIEW OF DISTRIBUTED FILE SYSTEM Aditi Khazanchi, Akshay Kanwar, Lovenish Saluja

Network File Systems

Distributed File Systems. CS432: Distributed Systems Spring 2017

Distributed File Systems. CS 537 Lecture 15. Distributed File Systems. Transfer Model. Naming transparency 3/27/09

Chapter 17: Distributed-File Systems. Operating System Concepts 8 th Edition,

Bhaavyaa Kapoor Person #

DFS Case Studies, Part 2. The Andrew File System (from CMU)

Chapter 8: Distributed File Systems. Introduction File Service Architecture Sun Network File System The Andrew File System Recent advances Summary

CSE 486/586: Distributed Systems

Chapter 11: File System Implementation. Objectives

Lecture 14: Distributed File Systems. Contents. Basic File Service Architecture. CDK: Chapter 8 TVS: Chapter 11

Network File System (NFS)

Network File System (NFS)

University of Wisconsin-Madison

Crash Consistency: FSCK and Journaling. Dongkun Shin, SKKU

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #4 Tuesday, December 15 th 11:00 12:15. Advanced Topics: Distributed File Systems

Chapter 18 Distributed Systems and Web Services

Section 14: Distributed Storage

Announcements. Persistence: Log-Structured FS (LFS)

Introduction. Chapter 8: Distributed File Systems

Announcements. P4: Graded Will resolve all Project grading issues this week P5: File Systems

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Nov 28, 2017 Lecture 25: Distributed File Systems All slides IG

416 Distributed Systems. Distributed File Systems 1: NFS Sep 18, 2018

Network File System (NFS)

Current Topics in OS Research. So, what s hot?

416 Distributed Systems. Distributed File Systems 2 Jan 20, 2016

Distributed File Systems Issues. NFS (Network File System) AFS: Namespace. The Andrew File System (AFS) Operating Systems 11/19/2012 CSC 256/456 1

Distributed Systems 8L for Part IB. Additional Material (Case Studies) Dr. Steven Hand

Distributed File Systems. File Systems

Filesystems Lecture 13

Announcements. Persistence: Crash Consistency

Filesystems Lecture 11

Distributed System. Gang Wu. Spring,2018

Today CSCI Coda. Naming: Volumes. Coda GFS PAST. Instructor: Abhishek Chandra. Main Goals: Volume is a subtree in the naming space

Lecture 7: Distributed File Systems

File System Implementations

Introduction to Multiprocessors (Part II) Cristina Silvano Politecnico di Milano

Distributed file systems

Distributed File Systems Part II. Distributed File System Implementation

An Overview of The Global File System

CSE 153 Design of Operating Systems

Advanced Operating Systems

DISTRIBUTED FILE SYSTEMS & NFS

Distributed File System

FS Consistency & Journaling

ò Server can crash or be disconnected ò Client can crash or be disconnected ò How to coordinate multiple clients accessing same file?

CMSC 611: Advanced Computer Architecture

NFS. Don Porter CSE 506

Week 11/12: Distributed File Systems & RPC Reading: Text, Chapter 8.2.4, 8.3,

Presented by: Alvaro Llanos E

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

Designing Next-Generation Data- Centers with Advanced Communication Protocols and Systems Services. Presented by: Jitong Chen

Chapter 7: File-System

FlexCache Caching Architecture

Distributed Systems. Lec 9: Distributed File Systems NFS, AFS. Slide acks: Dave Andersen

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall 2008.

CSE325 Principles of Operating Systems. File Systems. David P. Duggan. March 21, 2013

Extreme computing Infrastructure

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/25

To Everyone... iii To Educators... v To Students... vi Acknowledgments... vii Final Words... ix References... x. 1 ADialogueontheBook 1

The Google File System

Distributed File Systems. Directory Hierarchy. Transfer Model

File Systems. Chapter 11, 13 OSPP

The Google File System (GFS)

Module 17: Distributed-File Systems

Chapter 17: Distributed Systems (DS)

The Google File System

Distributed Systems - III

NTFS Recoverability. CS 537 Lecture 17 NTFS internals. NTFS On-Disk Structure

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9b: Distributed File Systems INTRODUCTION. Transparency: Flexibility: Slide 1. Slide 3.

MEMBRANE: OPERATING SYSTEM SUPPORT FOR RESTARTABLE FILE SYSTEMS

Announcements. Reading: Chapter 16 Project #5 Due on Friday at 6:00 PM. CMSC 412 S10 (lect 24) copyright Jeffrey K.

EC 513 Computer Architecture

Distributed File Systems. Jonathan Walpole CSE515 Distributed Computing Systems

Networks and distributed computing

3/4/14. Review of Last Lecture Distributed Systems. Topic 2: File Access Consistency. Today's Lecture. Session Semantics in AFS v2

Lecture 10 File Systems - Interface (chapter 10)

NETWORKED STORAGE AND REMOTE PROCEDURE CALLS (RPC)

Distributed File Systems: Design Comparisons

Distributed File Systems. Distributed Systems IT332

Distributed File Systems II

Operating Systems Design 16. Networking: Remote File Systems

Advanced Data Management Technologies

Name: Instructions. Problem 1 : Short answer. [48 points] CMU / Storage Systems 20 April 2011 Spring 2011 Exam 2

NAME: STUDENT ID: MIDTERM 235 POINTS. Closed book, closed notes 70 minutes

File System: Interface and Implmentation

Page 1. Goals for Today" Remote Procedure Call" Raw messaging is a bit too low-level for programming! RPC Details"

Module 17: Distributed-File Systems

Problem Overhead File containing the path must be read, and then the path must be parsed and followed to find the actual I-node. o Might require many

CMSC 611: Advanced. Distributed & Shared Memory

DISTRIBUTED FILE SYSTEMS CARSTEN WEINHOLD

Transcription:

THE ANDREW FILE SYSTEM BY: HAYDER HAMANDI

PRESENTATION OUTLINE Brief History AFSv1 How it works Drawbacks of AFSv1 Suggested Enhancements AFSv2 Newly Introduced Notions Callbacks FID Cache Consistency Between Different Machines On the Same Machine The Last Writer Wins Approach Crash Recovery AFSv2 vs NFS Summary

Brief History Introduced by researchers at CMU in the 1980 s Project led by Prof. M. Satyanarayanan ( Satya for short) Goals of project: Create a scalable DFS to support as many clients as possible. Design and implementation of protocol between clients and servers in an DFS environment. Implement simple cache consistency. Overcome the limited scalability problem facing NFS. NFS forces clients to check with server periodically to determine if cached contents have changed; each check uses resources (CPU, net. Bandwidth). Thus, frequent checks will limit the no. of clients a server can handle.

AFSv1 Actual name is ITC DFS How it works: Basic idea is whole-file caching on the local disk of the client machine. When you open() a file, the entire file is fetched from the server and stored on your local disk. Subsequent read() and write() operations are done locally without any network communication. In other words, treated as LFS. Locally the file is cached as blocks in client memory (somewhat similar to NFS) Once a close() command is issued, the file (if modified) is flushed back to the server.

AFSv1: How it works (contd.) AFS Server Running (Vice) Notes.txt Find path to: /home/remzi/notes.txt Send notes.txt to client Notes.txt has not been modified Client Running (Venus) Open(notes.txt) Files is a remote file: Fetch(/home/remzi/notes.txt) Read() Write() Close(notes.txt) Store(/home/remzi/notes.txt) Open(notes.txt) TestAuth(/home/remzi/notes.txt) Notes.txt

Drawbacks of AFSv1 Path-traversal costs are too high: In Fetch() and Store(), client sends the entire pathname to the server. Server must perform full pathname traversal looking in all the directories in the path. Ex: find root directory, then home, then remzi, and so on. With multiple clients, the server will spend all of its CPU time simply walking down directory paths. Client issues too many TestAuth protocol messages: Large amount of traffic just to check whether a file is valid or not. Server spend to much CPU time to check the file validity. Most of the time, the reply was the file is valid. CPU became bottleneck and can only handle 20 clients. Load was not balanced across servers. Server used single distinct process per client. Context switching overhead.

Suggested Enhancements Solve the load imbalance problem by introducing volumes. Solve the context switching problem by building threads instead of processes. And we know that switching between threads (LWP) creates much less overhead. Minimize the number of server interactions to solve the CPU bottleneck problem. Many enhancements led to the introduction of AFSv2.

AFSv2 Callbacks: Reduce the number of client/server interactions. More scalable: each server supports up to 50 clients. A promise from the server to the client that the former will inform the latter when a file the latter is caching has been modified. Client no longer needs to contact the server to find out if a cached file is valid. Client assumes that the file is valid unless the server tells it otherwise. Interrupts are used instead of polling.

AFSv2 (contd.) File Identifier (FID): Used instead of pathnames to specify files. Consist of: Volume Identifier File identifier Uniquifier (to enable reuse of the volume and file IDs when a file is deleted). Client walks pathname, one piece at a time, caching the results and reducing the load on the server. Ex: Client want to access the file (/home/remzi/notes.txt) Fetch directory contents of home and load them into local disk cache Setup callback on home Fetch directory remzi, put on local disk and setup callback Fetch notes.txt, cache to local disk and setup callback Return file descriptor to the calling application

AFSv2: How it works fd = open( /home/remzi/notes.txt,...); Send Fetch (home FID, remzi ) Receive Fetch reply write remzi to local disk cache record callback status of remzi Send Fetch (remzi FID, notes.txt ) Receive Fetch request look for remzi in home dir establish callback(c1) on remzi return remzi s content and FID Receive Fetch reply write notes.txt to local disk cache record callback status of notes.txt local open() of cached notes.txt return file descriptor to application Receive Fetch request look for notes.txt in remzi dir establish callback(c1) on notes.txt return notes.txt s content and FID AFS Server Running (Vice) Remzi Client C1 Running (Venus) read(fd, buffer,max); perform local read() on cached copy close(fd); do local close() on cached copy if file has changed, flush to server Notes.txt Notes.txt fd = open( /home/remzi/notes.txt,...); Foreach dir (home, remzi) if (callback(dir) == VALID) use local copy for lookup(dir) else Fetch (as above) if (callback(notes.txt) == VALID) open local cached copy return file descriptor to it else Fetch (as above) then open and return fd

AFSv2 Cache Consistency Update Visibility: When will the server be updated with a new version of the file Cache Staleness: Once the server has a new version, how long before clients see the new version instead of an older cached copy? Case 1: Consistency between processes on different machines Case 2: Consistency between processes on the same machine Case 3 (Cross-machine): processes on different machines modifying the same file at the same time.

AFSv2 Cache Consistency (contd.) Case 1: Different Machines Client updates (writes) to a file are not visible to the server as well as other machines until the files is closed. When an updated file is closed by a client, AFS makes updates visible on the server and invalidates cached copies simultaneously. Subsequent opens of the file will require a re-fetch of the new version of the file from the server. Case 2: Same Machine Client updates (writes) are immediately visible to other processes on the same machine (local processes). Processes do not have to wait until the file is closed to see the latest updates.

Open(F) Write(A). Open(F) Write(B).. Open(F) Write(D) P1 Case 3: The Last Writer Wins Approach (Last Closer Wins) A D B Open(F) Read() - A. Open(F) Read() - B P2 Client C1 Running (Venus) AFS Server Running (Vice) C D A B Client C2 Running (Venus) C D B Open(F) Read() - A.. Open(F) Read() -- B Open(F) Write(C) Open(F) Read() -- D P3

Crash Recovery Client Recovery: Imagine same scenario above (Server S with two clients C1 and C2) C1, C2 and S had the same cached copy of file F. C1 has rebooted the machine. Meanwhile, C2 has updated the file F and flushed the new version of the file back to S. S tried to contact C1 via callback in order to inform C1 to invalidate its copy of F. However, since C1 is rebooting it is unable to receive the invalidation messages from S. Now that C1 is back online, C1 should treat all its cached contests as suspect. Thus, C1 will send TestAuth protocol message to S to check whether its copy of F is still valid for use; if not, C1 will fetch the newer version of F from S. Server Recovery: When a crashed server reboot, it has no idea which client has which files. Each client must realize that the server has crashed, and thus treat all their cached contents as suspect. Can be implemented in two ways: Server send messages to all clients Don t trust your cache contents after it recovers from the crash Clients check that the server is alive periodically using Heartbeat messages

AFS vs NFS N s : #Blocks for small file, N m : #Blocks for medium file, N L : #Blocks for large file. L net : Access time for 1 remote block, L disk : Access time for 1 block on local disk, L mem : Access time for 1 block in memory L net > L disk > L mem

Summary AFS minimizes client/server interactions through whole-file caching and callbacks. Supports many clients; thus, reducing the number of servers needed. Consistency model is simple to understand. AFS provides global namespace to clients, thus ensuring all files were named the same way on all client machines. However, a program that uses a particular pathname to access a file on AFS must be changed in order to run on a different client, due to the fact that mount points differ from one machine to another. Incorporates security mechanisms to authenticate users. Provides flexible user managed access control to files. Adds tools to enable simpler management of servers by system administrators.

THANK YOU