Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS703 - Advanced Operating Systems

Similar presentations


Presentation on theme: "CS703 - Advanced Operating Systems"— Presentation transcript:

1 CS703 - Advanced Operating Systems
By Mr. Farhan Zaidi

2 Lecture No. 34

3 Log Structured File Systems
Log structured (or journaling) file systems record each update to the file system as a transaction. All transactions are written to a log. A transaction is considered committed once it is written to the log. However, the file system may not yet be updated.

4 Logging Idea: lets keep track of what operations are in progress and use this for recovery. It’s keep a “log” of all operations, upon a crash we can scan through the log and find problem areas that need fixing.

5 Implementation Log File system Add log area to disk.
Always write changes to log first – called write-ahead logging or journaling. Then write the changes to the file system. All reads go to the file system. Crash recovery – read log and correct any inconsistencies in the file system. Log File system

6 Issue - Log management Observation: Log only needed for crash recovery Checkpoint operation – make in-memory copy of file system (file cache) consistent with disk. After a checkpoint, can truncate log and start again. Most logging file systems only log metadata (file descriptors and directories) and not file data to keep log size down.

7 Issue - Performance Two disk writes (on different parts of the disk) for every change? Synchronous writes are on every file system change? Observation: Log writes are sequential on disk so even synchronous writes can be fast. Best performance if log on separate disk.

8 Current trend is towards logging FS
Fast recovery: recovery time O(active operations) and not O(disk size) Better performance if changes need to be reliable If you need to do synchronous writes, sequential synchronous writes are much faster than non-sequential ones. Examples: Windows NTFS Veritas on Sun Many competing logging file system for Linux

9 Linux Virtual File System
Uniform file system interface to user processes Represents any conceivable file system’s general feature and behavior Assumes files are objects that share basic properties regardless of the target file system

10

11

12 Primary Objects in VFS Superblock object Inode object Dentry object
Represents a specific mounted file system Inode object Represents a specific file Dentry object Represents a specific directory entry File object Represents an open file associated with a process

13 The Sun Network File System (NFS)
An implementation and a specification of a software system for accessing remote files across LANs (or WANs). The implementation is part of the Solaris and SunOS operating systems running on Sun workstations using an unreliable datagram protocol (UDP/IP protocol and Ethernet.

14 Schematic View of NFS Architecture


Download ppt "CS703 - Advanced Operating Systems"

Similar presentations


Ads by Google