Download presentation
Presentation is loading. Please wait.
1
19 Advanced Operating Systems The LINUX file system
2
20 Linux VFS
3
21 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
22 Super Block
5
23 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
24 Super Block Operations
7
25 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
26 The Inode
9
27 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
28 Inode functions Inode functions are –Iget() –Iput() –Namei() –Grow_inodes
11
29 Inode Operations
12
30 Inode Operations Provides the following –Creation –Lookup –Link/unlink –Special file operations –ie directory ops –Rename –Sym link following –Permissions
13
31 The File
14
32 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
33 File operations
16
34 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
35 Ext2 Layout Boot block Block group 0Block group n Super block Group descriptors Data block bitmap Inode Bitmap Inode table Data blocks 1 block N blocks1 block N blocks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.