Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.

Slides:



Advertisements
Similar presentations
File-System Interface
Advertisements

Chapter 4 : File Systems What is a file system?
The Zebra Striped Network File System Presentation by Joseph Thompson.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Jan. 2014Dr. Yangjun Chen ACS Database recovery techniques (Ch. 21, 3 rd ed. – Ch. 19, 4 th and 5 th ed. – Ch. 23, 6 th ed.)
Chapter 11: File System Implementation
Distributed Systems 2006 Styles of Client/Server Computing.
File System Implementation
File System Implementation
Computer Science Lecture 17, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Other File Systems: LFS and NFS. 2 Log-Structured File Systems The trend: CPUs are faster, RAM & caches are bigger –So, a lot of reads do not require.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 23 Database Recovery Techniques.
Chapter 19 Database Recovery Techniques. Slide Chapter 19 Outline Databases Recovery 1. Purpose of Database Recovery 2. Types of Failure 3. Transaction.
Ceng Operating Systems
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
1 File Management in Representative Operating Systems.
Chapter 12 File Management Systems
04/07/2010CSCI 315 Operating Systems Design1 File System Implementation.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Case Study - GFS.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Networked File System CS Introduction to Operating Systems.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
File System Implementation
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File System Implementation Chapter.
CS 346 – Chapter 11 File system –Files –Access –Directories –Mounting –Sharing –Protection.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Presentation-2 Group-A1 Professor:Mohamed Khalil Anita Kanuganti Hemanth Rao.
File Systems. 2 What is a file? A repository for data Is long lasting (until explicitly deleted).
I MPLEMENTING FILES. Contiguous Allocation:  The simplest allocation scheme is to store each file as a contiguous run of disk blocks (a 50-KB file would.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Distributed File Systems Group A5 Amit Sharma Dhaval Sanghvi Ali Abbas.
Lecture Topics: 11/29 File System Interface –Files and Directories –Access Methods –Protection –Consistency.
Review CS File Systems - Partitions What is a hard disk partition?
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
Computer Science Lecture 20, page 1 CS677: Distributed OS Today: Distributed File Systems Issues in distributed file systems Sun’s Network File System.
File-System Management
Chapter 12: File System Implementation

Database recovery techniques
Database Recovery Techniques
Database Recovery Techniques
Transactions and Reliability
Chapter 11: File System Implementation
File System Implementation
Journaling File Systems
Chapter 12: File System Implementation
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the.
Chapter 11: File System Implementation
Chapter 15: File System Internals
Database Recovery 1 Purpose of Database Recovery
Last Class: Fault Tolerance
Presentation transcript:

Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication Distributed commit –Two phase commit –Three phase commit Failure recovery –Checkpointing –Message logging

Computer Science Lecture 19, page 2 CS677: Distributed OS Recovery Techniques thus far allow failure handling Recovery: operations that must be performed after a failure to recover to a correct state Techniques: –Checkpointing: Periodically checkpoint state Upon a crash roll back to a previous checkpoint with a consistent state

Computer Science Lecture 19, page 3 CS677: Distributed OS Independent Checkpointing Each processes periodically checkpoints independently of other processes Upon a failure, work backwards to locate a consistent cut Problem: if most recent checkpoints form inconsistent cut, will need to keep rolling back until a consistent cut is found Cascading rollbacks can lead to a domino effect.

Computer Science Lecture 19, page 4 CS677: Distributed OS Coordinated Checkpointing Take a distributed snapshot [discussed in Lec. 11] Upon a failure, roll back to the latest snapshot –All process restart from the latest snapshot

Computer Science Lecture 19, page 5 CS677: Distributed OS Message Logging Checkpointing is expensive –All processes restart from previous consistent cut –Taking a snapshot is expensive –Infrequent snapshots => all computations after previous snapshot will need to be redone [wasteful] Combine checkpointing (expensive) with message logging (cheap) –Take infrequent checkpoints –Log all messages between checkpoints to local stable storage –To recover: simply replay messages from previous checkpoint Avoids recomputations from previous checkpoint

Computer Science Lecture 19, page 6 CS677: Distributed OS Today: Distributed File Systems Overview of stand-alone (UNIX) file systems Issues in distributed file systems Next two classes: case studies of distributed file systems NFS Code xFS Log-structured file systems (time permitting)

Computer Science Lecture 19, page 7 CS677: Distributed OS File System Basics File: named collection of logically related data –Unix file: an uninterpreted sequence of bytes File system: –Provides a logical view of data and storage functions –User-friendly interface –Provides facility to create, modify, organize, and delete files –Provides sharing among users in a controlled manner –Provides protection

Computer Science Lecture 19, page 8 CS677: Distributed OS File Types and Attributes File types –Directory, regular file –Character special file: used for serial I/O –Block special file: used to model disks [buffered I/O] –Strongly v/s weakly typed files File attributes: varies from OS to OS –Name, type, location, size, protection info, password, owner, creator, time and date of creation, last modification, access File operations: –Create, delete, open, close, read, write, append, get/set attributes

Computer Science Lecture 19, page 9 CS677: Distributed OS Directories Tree structure organization most common Access to a file specified by absolute file name User can assign a directory as the current working directory –Access to files can be specified by relative name relative to the current directory Possible organizations: linear list of files, hash table

Computer Science Lecture 19, page 10 CS677: Distributed OS Unix File System Review User file: linear array of bytes. No records, no file types Directory: special file not directly writable by user File structure: directed acyclic graph [directories may not be shared, files may be shared (why?) ] Directory entry for each file –File name –inode number –Major device number –Minor device number All inodes are stored at a special location on disk [super block] –Inodes store file attributes and a multi-level index that has a list of disk block locations for the file

Computer Science Lecture 19, page 11 CS677: Distributed OS Inode Structure Fields –Mode –Owner_ID, group_id –Dir_file –Protection bits –Last access time, last write time, last inode time –Size, no of blocks –Ref_cnt –Address[0], … address[14] Multi-level index: 12 direct blocks, one single, double, and triple indirect blocks

Computer Science Lecture 19, page 12 CS677: Distributed OS Distributed File Systems File service: specification of what the file system offers –Client primitives, application programming interface (API) File server: process that implements file service –Can have several servers on one machine (UNIX, DOS,…) Components of interest –File service –Directory service

Computer Science Lecture 19, page 13 CS677: Distributed OS File Service Remote access model –Work done at the server Stateful server (e.g., databases) Consistent sharing (+) Server may be a bottleneck (-) Need for communication (-) Upload/download mode –Work done at the client Stateless server Simple functionality (+) Moves files/blocks, need storage (-)

Computer Science Lecture 19, page 14 CS677: Distributed OS Directory Service Create/delete files Hierarchical directory structure Arbitrary graph

Computer Science Lecture 19, page 15 CS677: Distributed OS System Structure: Server Type Stateless server –No information is kept at server between client requests –All information needed to service a requests must be provided by the client with each request (what info?) –More tolerant to server crashes Stateful server –Server maintains information about client accesses –Shorted request messages –Better performance –Idempotency easier –Consistency is easier to achieve

Computer Science Lecture 19, page 16 CS677: Distributed OS System Structure Client v/s server implementations possibilities –Same process implements both functionality –Different processes, same machine –Different machines (a machine can either be client or server) Directory/file service – same server? –Different server processes: cleaner, more flexible, more overhead –Same server: just the opposite

Computer Science Lecture 19, page 17 CS677: Distributed OS Naming Issues Path name lookup can be iterative or recursive –/usr/freya/bin/netscape

Computer Science Lecture 19, page 18 CS677: Distributed OS Naming Issues: Mounting Mounting: file system can be mounted to a node of the directory Depending on the actual mounts, different clients see different view of the distributed file system

Computer Science Lecture 19, page 19 CS677: Distributed OS File Sharing Semantics Unix semantics –Read after write returns value written System enforces absolute time ordering on all operations Always returns most recent value Changes immediately visible to all processes Difficult to enforce in distributed file systems unless all access occur at server (with no client caching) Session semantics –Local changes only visible to process that opened file –File close => changes made visible to all processes –Allows local caching of file at client –Two nearly simultaneous file closes => one overwrites other?

Computer Science Lecture 19, page 20 CS677: Distributed OS Other File Sharing Semantics Immutable files –Create/delete only; no modifications allowed –Delete file in use by another process Atomic transactions –Access to files protected by transactions –Serializable access –Costly to implement