PT 08 - File Systems
PT 08 - File Systems
File-System Interface
• File Concept
• Access Methods
• Directory Structure
• File-System Mounting
• File Sharing
File-System Interface • Protection
• None - sequence of words, bytes • Name – only information kept in human-readable form
• Simple record structure • Identifier – unique tag (number) identifies file within file
system
– Lines • Type – needed for systems that support different types
– Fixed length • Location – pointer to file location on device
– Variable length • Size – current file size
• Complex Structures • Protection – controls who can do reading, writing,
– Formatted document executing
• Who decides: • Time, date, and user identification – data for protection,
security, and usage monitoring
– Operating system
• Information about files are kept in the directory structure,
– Program which is maintained on the disk
1
7/17/2014
• File is an abstract data type • Several pieces of data are needed to manage
– Create open files:
– Write – File pointer: pointer to last read/write location,
– Read per process that has the file open
– Reposition within file – File-open count: counter of number of times a file
– Delete is open – to allow removal of data from open-file
– Truncate table when last processes closes it
• Open(Fi) – search the directory structure on disk for – Disk location of the file: cache of data access
entry Fi, and move the content of entry to memory information
• Close (Fi) – move the content of entry Fi in memory – Access rights: per-process access mode
to directory structure on disk information
• Sequential Access
read next
write next
reset
no read after last write
(rewrite)
• Direct Access
read n
write n
position to n
read next
write next
rewrite n
n = relative block number
2
7/17/2014
• A collection of nodes containing information about all files • Disk can be subdivided into partitions
• Disks or partitions can be RAID protected against
Directory failure
• Partitions also known as minidisks, slices
• Entity containing file system known as a volume
• Each volume containing file system also tracks that
file system’s info in device directory or volume
Files table of contents
F2 F4
F1
F3 • As well as general-purpose file systems there are
Fn many special-purpose file systems, frequently all
within the same operating system or computer
Both the directory structure and the files reside on disk
Backups of these two structures are kept on tapes
3
7/17/2014
Path name
Can have the same file name for different user
Efficient searching
No grouping capability
4
7/17/2014
File Sharing
File Sharing – Multiple Users
5
7/17/2014