Synchronization in Distributed File System

Slides:



Advertisements
Similar presentations
Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Advertisements

Consistency and Replication Chapter 7 Part II Replica Management & Consistency Protocols.
1 Network File System (NFS) a)The remote access model. b)The upload/download model.
Computer Science Lecture 20, page 1 CS677: Distributed OS Today: Distributed File Systems Issues in distributed file systems Sun’s Network File System.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Distributed File Systems Chapter 11
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems CS Distributed File Systems- Part II Lecture 20, Nov 16, 2011 Majd F. Sakr, Mohammad Hammoud andVinay Kolar 1.
Jeff Chheng Jun Du.  Distributed file system  Designed for scalability, security, and high availability  Descendant of version 2 of Andrew File System.
PRASHANTHI NARAYAN NETTEM.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
File Systems (2). Readings r Silbershatz et al: 11.8.
Presented by: Alvaro Llanos E.  Motivation and Overview  Frangipani Architecture overview  Similar DFS  PETAL: Distributed virtual disks ◦ Overview.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Distributed File Systems Synchronization – 11.5 Consistency and Replication Fault Tolerance – 11.7.
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Eduardo Gutarra Velez. Outline Distributed Filesystems Motivation Google Filesystem Architecture The Metadata Consistency Model File Mutation.
A Low-bandwidth Network File System Athicha Muthitacharoen et al. Presented by Matt Miller September 12, 2002.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT By Jyothsna Natarajan Instructor: Prof. Yanqing Zhang Course: Advanced Operating Systems.
Synchronization in Distributed File Systems Advanced Operating System Zhuoli Lin Professor Zhang.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last class: Distributed File Systems Issues in distributed file systems Sun’s Network File System.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
Database Recovery Techniques
Transactions and Reliability
Distributed File Systems
Distributed File Systems
Distributed Shared Memory
ITEC 202 Operating Systems
Chapter 25: Advanced Data Types and New Applications
Multiprocessor Cache Coherency
Ivy Eva Wu.
Chapter 19: Distributed Databases
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT -Sumanth Kandagatla Instructor: Prof. Yanqing Zhang Advanced Operating Systems (CSC 8320)
NFS and AFS Adapted from slides by Ed Lazowska, Hank Levy, Andrea and Remzi Arpaci-Dussea, Michael Swift.
Viney Sindhu Dr. Yanqing Zhang
Distributed Systems CS
Distributed Systems CS
Outline Midterm results summary Distributed file systems – continued
Advanced Operating Systems Chapter 11 Distributed File systems 11
7.1. CONSISTENCY AND REPLICATION INTRODUCTION
Today: Coda, xFS Case Study: Coda File System
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
Distributed File Systems
EEC 688/788 Secure and Dependable Computing
Distributed File Systems
EEC 688/788 Secure and Dependable Computing
Cary G. Gray David R. Cheriton Stanford University
CSE 451: Operating Systems Spring Module 21 Distributed File Systems
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM
Distributed File Systems
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Database Recovery 1 Purpose of Database Recovery
Today: Distributed File Systems
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
THE GOOGLE FILE SYSTEM.
Introduction To Distributed Systems
Distributed File Systems
Distributed File Systems
EEC 688/788 Secure and Dependable Computing
Distributed File Systems
Presentation transcript:

Synchronization in Distributed File System Swathi Kiran Reddy Pallamreddy Dr. Yanqing Zhang

Overview Semantics of File Sharing. File Locking Sharing File in Coda Future Work Reference

Semantics of File Sharing On a single processor, when a read follows a write, the value returned by the read is the value just written.

In a distributed system with caching, obsolete values may be returned. If a client locally modifies a cached file and shortly thereafter another client reads the file from the server, the second client will get an obsolete file.

Four ways of dealing with the shared files in a distributed system. UNIX Semantics Session Semantics Immutable files Transactions

UNIX Semantics UNIX semantics can be achieved easily as long as there is only one file server and clients do not cache files. All reads and writes go directly to the file server, which processes them strictly sequentially.

Session semantics Changes to an open file are initially visible only to the process (or possibly machine) that modified the file. Only when the file is closed are the changes made visible to other processes.

Immutable Files Make all files immutable. The only operations on files are create and read. It becomes impossible to modify the file x but It can be replaced by a new file with the same name. Although files cannot be updated, directories can be.

transactions To access a file or a group of files, a process first executes BEGIN_TRANSACTION primitive to signal that what follows must be executed separately. When the requested work has been completed, an END_TRANSACTION primitive is executed. All the calls within the transaction are processed in order. If two or more transactions start up at the same time, the final result is the same as if they were all run in some sequential order.

File Locking The traditional way of doing this is to make use of a lock manager which follows a centralized locking scheme. Although a central lock manager is generally deployed, the complexity in locking comes from the need to allow concurrent access to the same file. For this reason we will be using NFSv4.

NFSv4 operations related to file sharing

Lock Operation lock is used to request a read or write lock on a consecutive range of bytes in a file. If the lock cannot be granted due to another conflicting lock, the client gets back an error message. The client can request to be put on FIFO list. As soon as the conflicting lock has been removed, the server will grant the next lock to the client at the top of the list

Lockt The lockt operation is used to test whether a conflicting lock exists. In the case of a conflict, the requesting client is informed exactly who is causing the conflict and on which range of bytes. Locku The lockt operation is used to remove a lock from a file.

Renew The renew operation used by a client to request the server to renew the lease on its lock. Unless the client renews the lease on a lock it has been granted, the server will automatically remove it.

Share reservation An implicit way to lock a file. Is independent from locking, can be used to implement NFS for Windows – based systems. When an OPEN request is sent for a file, the requester can indicate the type of access that should be denied to other requesters attempting to access the same file, which is NONE, READ, WRITE or BOTH.

Sharing files in coda The Coda file system uses a special allocation scheme that bears some similarities to share reservations in NFS. When a client opens a file, an entire copy of the file is transferred to the client’s machine. The server records that the client has a copy of the file.

Now if client A has opened file F for writing and another client B wants to open F as well, it will fail. This failure is caused by the fact that the server has recorded that client A might have already modified F. On the other hand, had client A opened F for reading, an attempt by client B to get a copy from the server for reading would succeed. An attempt by B to open for writing would succeed as well.

Only one client will be able to modify F at a time Only one client will be able to modify F at a time. If this client modifies F and subsequently closes the file, the file will be transferred back to the server. However, every other client may proceed to read its local copy despite the fact that the copy is actually outdated. Reason for this inconsistent behavior is that a session is treated as a transaction in Coda.

Assume A has opened F for reading, leading to session SA· Client B has opened f for writing, that is session S8· When B closes session S8' it transfers the updated version of f to the server, which will then send an invalidation message to A. A will now know that it is reading from an older version of F.

Future Work Currently most of the researches are concentrated on cloud-based synchronization of distributed file system. As the number of user-managed devices continues to increase, the need for synchronizing multiple file hierarchies distributed over devices with ad hoc connectivity, is becoming a significant problem. My future work is to research on an approach for efficient cloud- based synchronization of an arbitrary number of distributed file system hierarchies.

References Tanenbaum, A., & Van Steen, M. (2006). Distributed Systems Principles and Paradigms (Second ed.). Distributed File Systems, http://pages.cs.wisc.edu/~sschang/OS- Qual/fs/distributed_file_systems.htm Cloud-based synchronization of distributed file system hierarchies, Sandesh Uppoor, Michail D. Flouris & Angelos Bilas, (20-24 Sept. 2010), Publisher: IEEE

Thank YOU !!