2 (FILE SYSTEM)
File system Concept
File is a collection of data (binary, numeric or
character)
File can represent a program, a document or part
of the file system itself.
File can stored on various storage media
OS provides a uniform logical view of information
storage.
OS abstracts from the physical properties of its
storage device to define a logical storage unit.
File
Structure
Attribute
-Simple record
structure
-Complex
structure
-Name
-type
-location
-size
protection
-time,
date &
user
identificat
ion
Operati
on
-Create
a file
-Write a
file
Read(us
ea
system
-that
call
specifie
s)
Repositi
on
within
file
-Delete
Directory Concept
Directory stores information (attributes, location and
ownership) about all files
Directory represent collections of files
Type
Access Method
-Names
-extension
Sequential Access
-simplest method
-accessing from
beginning
-read next
-write next
-reset
-no read after last
write (rewrite)
Direct Access
-in any order
-most application used
-read n
-write n
-position to n
-read next
-write next
-rewrite n
-n = relative block number
Directo
ry
-Stores
information
about all files
-Both the
directory
structure and
the files reside
on disk
(secondary
storage)
-Contains files
name and
identifier
Identifier in
turn locates
other file
attributes
-More than 1KB
of information
for each file
-Directory
structure size
in MBs
-Backups of
files and
directory
structure kept
-Name
-Type
-Address
-Current
length
Maximum
length
-Date last
accessed
-Date last
updated
-Owner ID
Protection
informatio
n
Truncat
e
-Open
(Fi)
-Close
(Fi)
-List a
director
y
-Search
for a file
-Create
a file
-Delete
a file
Rename
a file
Travers
e the
file
system
Type of Directory
Single
level
-A
single
directo
ry for
all
users.
Namin
g
proble
m
Groupi
ng
proble
m
Two
level
Separa
te
directo
ry for
each
user.
-Has
path
name
-Can
have
the
same
file
name
for
differe
nt user
Efficien
t
searchi
Tree
Structured
Generaliza
tion of twolevel
directory
(with
arbitrary
height)
-Each user
has a
current
directory
(working
directory)
-Can
change
current
directory
via cd
command
or system
call
-Path
Acyclic Graph
General Graph
on tapes
Directo
ry
Files
Directo
ry
Files
Directo
ry
Files
ng
-No
groupi
ng
capabil
ity
-In
twolevel
directo
ry, this
tree
structu
re has
MFD as
root of
path
throug
h UFD
to user
file
name
at leaf.
-Each
user
has its
own
UFD
(User
File
Dir)
-UFDs
have
similar
names can
be
absolute or
relative
structu
re
-When
a user
logs in,
the
MFD
(Maste
r File
Dir) is
search
ed
-MFD is
indexe
d by
user
name
or
accoun
t no.
-Each
entry
in MFD
points
to a
UFD
-User
name
and file
name
define
a path
name
FILE
SYSTEM
MOUNTING
FILE
SHARING
FILE
PROTECTIO
N
by whom
Types of access
Read
Write
Execute
Append
Delete
List
RWX
a). owner access
7 =>
111
RWX
b). group access
6 =>
110
RWX
c). public access
1 =>
001
Contiguous Allocation
Linked Allocation
-Each file occupies a set of
-Each file is a linked list of
contiguous
disk blocks: blocks may be
scattered anywhere on the
disk.
Indexed Allocation
- Brings all pointers together into the
index block.
-Logical view.
-Need index table
-Random access
-Random access without external
fragmentation, but have overhead of
index block.
FILE
TECHNOLO
GY
OPERATING SYSTEM
MS-DOS, Windows 95
Windows 95,98, Me
Windows NT, 2000, XP
Linux
FAT (File Allocation Table)