Save
Operating System
Lesson 7 File System
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
qothrunnada
Visit profile
Cards (30)
File
Contiguous logical address space (
physical
may not be contiguous)
View source
Types of files
Data
(numeric, character, binary)
Program
View source
File Attributes
Name
Identifier
Type
Location
Size
Protection
Time
,
date
, and user identification
View source
Information about files are kept in the directory
structure
, which is maintained on the
disk
View source
Many variations of file attributes, including
extended file attributes
(e.g.
checksum
)
View source
File Operations
Create
Write
Read
Reposition
within file (seek)
Delete
Truncate
Open
Close
View source
Open File
Locate the
file
on the disk according to its file name (
path
)
Establish
data structures
to share file among
different processes
Allocate
file descriptor
(ID-used by
read
/write requests)
View source
Data structures for managing open files
Open-file
table
File
pointer
File-open
count
Disk
location
of the file
Access
rights
View source
Classical Unix data structures for open files
Per Process Table
of
Open
Files
System-wide
File Table
System-wide V-Node Table (
Linux
–no
V-node
, only I-node)
View source
Per Process Table of Open Files
File
descriptor Flag
Ptr to entry in the System
Wide File Table
View source
System Wide Open File Table
File Status Flags
File offset(position of next read/write)
V-node
ptr (entry in V-node table) or
I-node
ptr (entry in I-node table)
View source
Node Table
Type
of file (regular, pipe, directory, etc)
Ptr to function operates such
type
of
file
I-node
info
View source
node
file type
access permissions
Owner
and
group owner
Size
of the
file
number
of
links
device number
of the
device
where the file is stored
time
of
last access
time
of
last modification
time
of last change to the
i-node
block numbers
of the blocks in which file is
stored
View source
Unix kernel
, file is identified by its
i-node number
(not filename)
View source
Unix
directory file contains
names
of the files, their i-node numbers
View source
Open File Locking
Shared
lock
Exclusive lock
Mandatory
Advisory
View source
File Locking Example - Java API
Shared lock
Exclusive lock
View source
File Types
None (no structure) - sequence of words, bytes
Simple
record structure (Lines, Fixed length, Variable length)
Complex Structures (
Formatted
document,
Relocatable
load file)
View source
Access Methods
Sequential Access
Direct Access
View source
Other Access Methods
Index
for the file which contains pointer to the actual disk block
IBM indexed
sequential-access
method (ISAM)
VMS operating system provides
index
and
relative
files
View source
Directory Structure
Search
for a file
Create
a file
Delete
a file
List
a directory
Rename
a file
Traverse
the file system
View source
Directory Organization
Efficiency
Naming
Grouping
View source
Single-Level Directory
Naming
problem
Grouping
problem
View source
Two-Level
Directory
Path
name
Efficient
searching
No
grouping
capability
View source
Tree-Structured Directories
Efficient
searching
Grouping Capability
Current
directory (working directory)
Absolute
or
relative
path name
Creating a
new
file
Deleting
a file
Creating a
new
subdirectory
View source
Acyclic-Graph Directories
Have shared
subdirectories
and
files
View source
General Graph Directory
Cycles
Garbage
collection
Cycle
detection algorithm
View source
File System Mounting
Mount point
View source
File Protection
Read
Write
Execute
Append
Delete
List
View source
Access Lists and Groups
Mode of access: read,
write
,
execute
Three classes of users:
owner
,
group
, public
View source