1 / 17

Advanced Operating Systems

Advanced Operating Systems. The LINUX file system. Linux VFS. Mounting File Systems. register_filesystems call Creates file_system_type struct Linked into growable table Once registered must be mounted Each mount fs has super_block structure Root is mounted at init

verdi
Download Presentation

Advanced Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Operating Systems The LINUX file system

  2. Linux VFS

  3. Mounting File Systems • register_filesystems call • Creates file_system_type struct • Linked into growable table • Once registered must be mounted • Each mount fs has super_block structure • Root is mounted at init • Some don’t have devices - pipefs

  4. Super Block

  5. Super Block • Describes entire file system • Block size, access rights, change time • Union U at the end is for fs specifics • Generic_sdp is used for later mounted systems • s_lock & s_wait are used as semaphores for super block synchronisation

  6. Super Block Operations

  7. Super Block Operations • Hides actual implementation • Actually function may not exist ie MSDOS • Provides • Write function • Put for unmounting • Stat for information • Remount – change status • Read_inode fills inode structure

  8. The Inode

  9. The Inode • Holds information on the file • The rest is • Memory management info • File system dependant • Doubly linked list of inodes • Contains all inodes – ie unused • ‘dirty’ inodes kept on hashed table

  10. Inode functions • Inode functions are • Iget() • Iput() • Namei() • Grow_inodes

  11. Inode Operations

  12. Inode Operations • Provides the following • Creation • Lookup • Link/unlink • Special file operations –ie directory ops • Rename • Sym link following • Permissions

  13. The File

  14. The File • The file structure allows duplication of inode information for multitasking purposes • Ie more than one process will wish to read a file • The pos variable can differ for each process • Has to deal with writes to file – done at inode level through locks

  15. File operations

  16. File Operations • These change the file structure not only –or sometimes not at all, the inode structure • Deals with • Reading, writing, seeking • Device specifics • Media changes

  17. Super block Group descriptors Data block bitmap Inode Bitmap Inode table Data blocks Ext2 Layout Boot block Block group 0 Block group n 1 block N blocks 1 block 1 block 1 block N blocks

More Related