Lec 6
Lec 6
• Files
– Named collection of data that is manipulated as a unit
– Reside on secondary storage devices
• Operating systems can create an interface that
facilitates navigation of a user’s files
– File systems can protect such data from corruption or total loss
from disasters
– Systems that manage large amounts of shared data can benefit
from databases as an alternative to files
• File systems
– Organize files and manages access to data
– Responsible for file management, auxiliary storage management,
file integrity mechanisms and access methods
– Primarily are concerned with managing secondary storage space,
particularly disk storage
• Directories:
– Files containing the names and locations of other files in the file
system, to organize and quickly locate files
• Directory entry stores information such as:
– File name
– Location
– Size
– Type
– Accessed
– Modified and creation times
• Working directory
– Simplifies navigation using pathnames
– Enables users to specify a pathname that does not begin at the
root directory (i.e., a relative path)
– Absolute path (i.e., the path beginning at the root) = working
directory + relative path
• Links (Cont.)
– Because a hard link specifies a physical location of a file, it references
invalid data when the physical location of its corresponding file
changes
– Because soft links store the logical location of the file in the file
system, they do not require updating when file data is moved
– However, if a user moves a file to different directory or renames the
file, any soft links to that file are no longer valid
• Metadata
– Information that protects the integrity of the file system
– Cannot be modified directly by users
• Many file systems create a superblock to store critical
information that protects the integrity of the file
system
– A superblock might contain:
• The file system identifier
• The location of the storage device’s free blocks
– To reduce the risk of data loss, most file systems distribute
redundant copies of the superblock throughout the storage device