file system in operating system

22
MODEL OF FILE SYSTEM

description

 

Transcript of file system in operating system

Page 1: file system in operating system

MODEL OF FILE SYSTEM

Page 2: file system in operating system

FILESFile system is the one of the most important parts of the OS to a user.

File is the collection of data created by user.

Page 3: file system in operating system

properties of files:- Long-term existence:: Files or stored on disk or other storage and do not disappear when a user logs off.

Sharable between processes:: Files have names and can have associated acccess permission that permit controlled sharing

Structure:: Files can be organized into hierarchical or more complex structure to refelect the relationships among files.

Page 4: file system in operating system

FILE SYSTEMS:- It provide a means to store data organized as

file as well as a collection of function that can be performed on file.Maintain a set of attributes associated with the file.

Operation include:- 1)create 2)delete 3)open 4)close 5)read 6)write

Page 5: file system in operating system

FILE STRUCTURE:- Files can be structured as a collection of records or as a sequence of bytes.Unix,Linux, WindowsMac OS's consider file as a sequence of bytes.

Page 6: file system in operating system

Four terms are commonly used when discussing Files:

Field Record File Database

Page 7: file system in operating system

Field:: It is a basic element of data .it contains a single value.it fixed or variable length.

data base:: Collection of related data is called database.relationships among elements of data are explicit. Files:: Files is the collection of similar records.it treated as a single entity.may be refferenced by name.

Record:: Record is a collection of related fields that can be treated as a unit by some application programme.The one field is the key -a unique identifier.

Page 8: file system in operating system

FILE SEQUENTIAL INDEXED SEQUENTIAL

INDEXED HASHED

LOGICAI I/O

BASIC I/O SUPERVISIOR

BASIC FILE SYSTEM

DISK DEVICE DRIVER TAPE DEVICE DRIVER

File system software architecture:

Page 9: file system in operating system

BASIC FILE SYSTEM:- It also referred to as the physical I/O level.It deals with blocks of data that are exchanged with disk or other mass storage device. placement of blocks on the secondary storage device.buffering blocks in main memory.It considered the part of the operating system. BASIC I/O SUPERVISOR:: It responsible for all file I/O initiation and termination.It control structures that deals with device I/O,scheduling,and file status are maintained.It select the device on which I/O to be performed.It concerned with scheduling disk and tape accessess to optimize performance.I/O buffers are assigned and secondary mamory is allocated at this level.

Page 10: file system in operating system

ACCESS CONTROL MODULE:

Different access methods reflect different file structures and different ways of accessing and processing the data. ACCESS CONTROL:: In a system with multiple user, its important to protect one user's object (file.directories) from other users. Tw o l e v e l s o f p r o t e c t i o n : : Logon verification:access determination:

Page 11: file system in operating system

USER ACCESS RIGHTSOWNERUsually

the initial creater of the file

Has full rights

May grant rights to another

SPECIFIC

USER

individual Users

who are designates by user

USER GROU

PSA set of

user who are

not individu

ally defined

ALL

All user who have access to

this system

These are public

files

Page 12: file system in operating system

LOGICAL FILE SYSTEM:: Logical I/O This level is the inter face between the logical commands issued by a programme and the physical detail required by the disk.

Page 13: file system in operating system

PHYSICAL FILE SYSTEM::The physical organization of a file has to

do with the way records are arranged and the characteristics of the medium used to store it.On magnetic disk,files can be organised in one of three ways::

SEQUENTIAL,DIRECT,INDEXED SEQUENTIAL.

Page 14: file system in operating system

FIVE OF THE

COMMON FILE

ORGANIZATION ARETHE

INDEXED FILE

THE DIRECT OR HASHED

FILE

THE PILE

THE SEQUENTIA

L FILE

THE INDEXED

SEQUENTIAL

FILE

Page 15: file system in operating system

THE PILE::Least complicated form of file

organization.Data are collected in the order they

arrive.Each record consist of one burst of data.Purpose is simply to accumalate the

mass of data and save it.Record access is by exhaustive search.

Page 16: file system in operating system

THE SEQUENTIAL FILE:: Most common form of file structure. A fixed format is used for records. Key field uniquely identifies the

record and determines storage order Typically used in batch application Only organization that is easily

stored on taps as well as disk.

Page 17: file system in operating system

INDEXED SEQUENTIAL FILE::Adds an index to the file to support

random access.Adds an overflow file.Greatly reduces the time required to

access a single record.Multiple levels of indexing can be used to

provide greater efficiency in access.

Page 18: file system in operating system

INDEXED FILE::Records are accessed only through their indexes. Variable length record can be employed. Exhaustive index contain one entry for every

record in the main file Partial index contain entries to record where the

field of interest exists. Used mostly in application where timelines of

information is critical. Example would be airline reservation system and

inventory control systems.

Page 19: file system in operating system

DIRECT OR HASHED FILE:: Access directly any block of a known

address. Makes uses of hashing on the key

value.Often used where:: very rapid access is required. fixed length records are used. records are always accessed one at a

time.

Page 20: file system in operating system

FILE DIRECTORY:: While writing fixed length record in keep track of the

number of records and /or the number of bytes written in that file size is normally kept in the DIRECTORY where there is one entry for each file for file size.

The MASTER FILE DIRECTORY (MFD) is stored immediately after the volume descriptor and lists the names and characteristics of every file name in the MFD can refer to program files.Early operating system supported only a single directory per volume.This directory was created by the file manager and contained the names of files.Usually organized in alphabetical.Spatical or chronological order.

Page 21: file system in operating system

OPERATIONS PERFORMAD ON A DIRECTORY::

SEARCHCREATE

FILEDELETE

FILESLIST

DIRECTORY

UPDATE DIRECTORY

Page 22: file system in operating system

THANK YOU