17
Towards Automatic File Systems By Kanchan Damle Course Instructor Prof. Remzi Arpaci-Dusseau CS 736 Spring 2008

Towards Automatic File Systems

  • Upload
    nemo

  • View
    20

  • Download
    0

Embed Size (px)

DESCRIPTION

CS 736 Spring 2008. Towards Automatic File Systems. By Kanchan Damle Course Instructor Prof. Remzi Arpaci-Dusseau. Lot of Questions Implementation. Basic File System Design. FUSE Some Measures. Performance of File System. Conclusions Questions?. AGENDA. - PowerPoint PPT Presentation

Citation preview

Page 1: Towards Automatic File Systems

Towards Automatic File Systems

By Kanchan Damle

Course InstructorProf. Remzi Arpaci-Dusseau

CS 736

Spring 2008

Page 2: Towards Automatic File Systems

AGENDA• Lot of Questions

• Implementation.– Basic File System Design.– FUSE

• Some Measures.– Performance of File System.

• Conclusions

• Questions?

Page 3: Towards Automatic File Systems

The usual questions for any new idea !!

• What?

– User :Specifies

– Implementer: Will be Done!

• Why?

– User knows his needs better

– Flexibility

– Optimum Resource Usage

• How?

– Let the user specify

– Just redirect the system calls

Page 4: Towards Automatic File Systems

Implementation Details

• Say user wants : “Simple FS”

(I picked another ,“S”- SFS)– 1 superblock

-no redundancy like FFS– Inode and Data Bitmaps

-no problems of free-list .– Limit to 100 files.– User not sure of how he will access the data..

Page 5: Towards Automatic File Systems

Other Details

• Max Number of Open Files: 25• Max File Size : 15K• Some reserved blocks.• Maximum Filename length = 16 • Maximum Pathname length = 256• Root Exists !(Inode #2)• Persistent Storage on File:

– Raw device – File on existing file system.

Page 6: Towards Automatic File Systems

Implementation Details

0 1 2 3 4 5-39

SUPER BLOCK

INODE-BITMAP

DATA-BLOCK BITMAP SECTORS 5-39 INODES

METADATA STRUCTURES

***Data blocks follow 40 onwards

Page 7: Towards Automatic File Systems

Implementation Details Why FUSE?

• User level FS implementation done

• But how can we have system level calls directed to implemented FS?

• Need ? -perhaps Uniformity, hassle to remember the new calls..

• Solution : Indirection!

• FUSE can help

Page 8: Towards Automatic File Systems

FUSE unveiled!

• What is FUSE?

• A framework: Redirects FS calls to (User level ) Simple FS API

• Has two modules + Mount Utility

– User Library : Interfaces with the Simple FS API

– Kernel Module : Binds to VFS, Calls FUSE Library

Page 9: Towards Automatic File Systems

Basic Call Flow..

Page 10: Towards Automatic File Systems

Interface Details

Kernel Module

FUSE Library

Simple FS

[6]

[1]

[0] [2]

[3] [4]

[5]

User Space

Kernel Space

Blocking Read Call

[0] Blocking read call on kernel module

[1] Request from VFS

[2] Unblocks the thread and sends request

[3] Fuse Library invokes respective Simple FS Module

[4] Module returns with requested data.

[5] Transfer data to kernel module

[6] Transfer data to VFS

Page 11: Towards Automatic File Systems

Internal Details

• VFS System Call Map – unlink() -> sys_unlink

• Fuse kernel call transfer– sys_unlink -> fuse_read_device

• Request Processing – User Level FS call invoked

• Blocking Calls : Queues Used– Pending, processing, etc

Page 12: Towards Automatic File Systems

Cost-Benefit …

• Benefits :– Flexibility

– Not tied to any particular OS– Avoid Kernel recompilation– Non-privileged mounts possible– Simplicity : Coding in user space is simpler

Cost :

More overhead: More user and kernel switching

Page 13: Towards Automatic File Systems

Performance Measures .. Simple FS

Run Number

Page 14: Towards Automatic File Systems

Performance Measures .. Simple FS

Page 15: Towards Automatic File Systems

Conclusions

• Good performance– Buffered writes, fewer writes

• No worry about positioning time – Uniform access time

• Flexibility– User gets what he requires

• System calls redirected hence easy to use.– Don’t remember erratic name and be uniform

• But,– Periodic FS_Sync required– What if file deleted?– Yet not secure for sensitive data

Page 16: Towards Automatic File Systems

Lessons Learnt

• Reading does not imply doing.

• Simple things can be bigger hurdles!

• Planning work helps

• Give it “time” and “thought”

• Believe that you can do it!

Page 17: Towards Automatic File Systems

QUESTIONS?

Thank you…