Sie sind auf Seite 1von 19

FILE SYSTEM

INTERFACE

K ARUNKUMAR

File Concept

Computer can store information on


various storage media such as magnetic
tapes, and optical disks
So that the computer system will be
convenient to use , the operating system
provides a uniform logical view of
information storage

File Concept

Types:

Data
numeric
character
binary

Program

File Attributes

Name only information kept in human-readable form


Identifier unique tag (number) identifies file within file
system
Type needed for systems that support different types
Location pointer to file location on device
Size current file size
Protection controls who can do reading, writing,
executing
Time, date, and user identification data for
protection, security, and usage monitoring
Information about files are kept in the directory
structure, which is maintained on the disk

File Attributes

Many variations, including extended file


attributes such as file checksum
Information kept in the directory
structure

File Operations

File is an abstract data type


Create
Write at write pointer location
Read at read pointer location
Reposition within file - seek
Delete
Truncate
Open(Fi) search the directory structure on disk for
entry Fi, and move the content of entry to memory
Close (Fi) move the content of entry Fi in memory
to directory structure on disk

File Types Name,


Extension

Access methods
File, store information when it is used
this information must be accessed and
read in to computer memory the
information in the file can be accessed in
several ways.
1. sequential access
2. Direct access
3. Indexed file

Access methods
sequential access:
Sequential access is the simplest method . Information in the
file is sequentially accessed . One record of after another .
2. This mode of access is by far the most common : for example
editors and compilers usually access files in this fashion.
3. Read and writes makes up the bulk of the operations on the
file. A read operation-read next-reads the next portion of the
file and automatically advances a file pointer , which tracks
the I/O location.
4. Similarly the write operation write-next- appends to the end
of the file and advances to the end of the newly written
material.
1.

Direct access
Direct Access:
1.

Direct access allows random access o any file block.This


method is based on a disk model of a file. A file is made up of
Fixed length logical records. It allows programs to read and
write records rapidly in no particular order.
Ex: (user may read block 13 , then read block aa, then write
block12)

There are no restrictions on the order of reading or writing for a


direct-access file.
For searching the record in large amount of information with
immediate result , direct access method is suitable.
Not all operating systems supports both sequential and direct
access for files . Some operating systems use sequentail access
and some operating system use direct access.

Indexed file
Indexed file:
To achieve the flexibility , structure is needed that employs
multiple indexes' . In general indexed file, the concept of
sequential and a single key are abandoned.
Records are only accessed through their indexes. Records of
variable lengths can be used in the access.
Two types of indexes are used. An exhaustive index
contains on entry for every record in the main file. An index
is itself organized as a sequential file for ease of searching.
A partial index contains entries to record where the field of
interest exists.

Example of Index and Relative Files

sequential access

File-System Mounting

Just a file must be opened before it is used , a file


system must be mounted before it can be
available to processes on the system.
More specially the directory structure may be
built out of multiple volumes which must be
mounted to make them available with in the file
system name space.
The mount procedure is straight forward . The
operating system is given the name of the device
and mount point the location with in file structure
.

File-System Mounting

Typically , amount point is an empty


directory. For instance , on a unix system , a
file system containing a user home
directories might be mounted as
/HOME; then to access the directory
structure with in file system
Directory name with /HOME /JANE , which we
could use to reach the same directory.
Under /USER,S would result in the path
name /user,s /jane.

File System Mounting

Mount Point

Protection

File owner/creator should be able to control:

what can be done


by whom

Types of access

Read
Write
Execute
Append
Delete
List

File Sharing Remote File Systems

Uses networking to allow file system access between systems

model allows clients to mount remote file systems


from servers
Client-server

Manually via programs like FTP


Automatically, seamlessly using distributed file systems
Semi automatically via the world wide web

Server can serve multiple clients


Client and user-on-client identification is insecure or complicated
NFS is standard UNIX client-server file sharing protocol
CIFS is standard Windows protocol
Standard operating system file calls are translated into remote calls

Distributed Information Systems (distributed naming services) such as


LDAP, DNS, NIS, Active Directory implement unified access to
information needed for remote computing

Das könnte Ihnen auch gefallen