Docsity

Log Structured File Systems-Advance Operating System-Lecture Slides, Slides of Advanced Operating Systems

Partial preview of the text

Download Log Structured File Systems-Advance Operating System-Lecture Slides and more Slides Advanced Operating Systems in PDF only on Docsity!

Lecture No.

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.

Implementation

 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.

File system Log

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.

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

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

Primary Objects in VFS

 Superblock 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

Schematic View of NFS Architecture