3 - Filing Systems Flashcards
Three Filing System types
Single-Level: all files in one
Two Level: Each user has directory
Multi : any node may be file or directory
Define a hard disk block
A sector traditionally capable of 25616-bit words or 5128-bit bytes (22^9 bytes)
Modern disks allow up to 4KiB but these are in 512 byter blocks (this course)
Boot Block
Contains the bootstrap program
Super Block
Contains data defining the file system
- Num of inode blocks
- size
- free block details
- free inode details
- last sync date
Inode
Contains information about nodes where a node is a file or directory etc
What is the structure of an inode?
Flags (2 bytes) Link Count (1) Owner ID (1) Group ID (1) File Size (3 bytes) Access dates/times (8 bytes) 8 address words (16bytes)
adds to 32 bytes
If each inode is 32 bytes and each block is 512 bytes in size then each block can store…
512/32 = 2&9/2^5 = 2^4 = 16 inodes
What is the size of huge file limited to?
2^24 bytes as there are only 24bits set aside in the inode for file size in Unix ver 6
Directory Entry
Made up of 16 bytes (2 for inode num and 14 for file name) and stored with 31 other directory entries in a single disk block
Are filenames stored in inode?
No, they are stored in a block on the hard disk with the corresponding inode that defines that directory
What are the three permissions?
r -read
w - write
x - execute
What is the permission order (in terms of the 3 segments of rwx)?
owner-group-all