Chapter 11: File System Implementation!
Chapter 11: File System Implementation!
Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then
insert it again.
■ File-System Structure"
■ File-System Implementation "
■ Directory Implementation"
■ Allocation Methods"
■ Free-Space Management "
■ Efficiency and Performance"
■ Recovery"
■ Log-Structured File Systems"
■ NFS"
■ Example: WAFL File System"
Note: This picture is excerpted from Write a Linux Hardware Device Driver, Andrew O’Shauqhnessy, Unix
Silberschatz, Galvin world
and Gagne ©2005!
Operating System Concepts! 11.4!
File-System Structure!
■ File structure"
● Logical storage unit"
● Collection of related information"
■ File system resides on secondary storage (disks or SSD)"
■ File system organized into layers"
■ File control block – storage structure consisting of information
about a file"
■ VFS allows the same system call interface (the API) to be used for
different types of file systems."
■ The API is to the VFS interface, rather than any specific type of file
system."
● Basic operations are open, close, read & write"
Note: This picture is excerpted from Write a Linux Hardware Device Driver, Andrew O’Shauqhnessy, Unix world
Operating System Concepts! 11.11! Silberschatz, Galvin and Gagne ©2005!
VSF & Major number!
■ principal interface between a device driver and Linux kernel "
"
■ Contiguous allocation!
■ Linked allocation!
■ Indexed allocation!
Q"
LA/512"
R"
■ Many newer file systems (I.e. Veritas File System) use a modified
contiguous allocation scheme"
Q"
LA/511"
R"
index table"
Q"
LA/512"
R"
!"
outer-index"
" "#$
0 ⇒ block[i] free"
bit[i] ="
1 ⇒ block[i] occupied"
■ Need to protect:"
● Pointer to free list"
● Bit map"
! Must be kept on disk"
! Allocate block[i]"
! Set bit[i] = 1 in memory"
■ A page cache caches pages rather than disk blocks using virtual
memory techniques"
■ Routine I/O through the file system uses the buffer (disk) cache"
■ A unified buffer cache uses the same page cache to cache both
memory-mapped pages and ordinary file system I/O"
■ If the file system crashes, all remaining transactions in the log must
still be performed"