18
Prepared By: Mehta Ishani 1300407010030 File models and file accessing models

File models and file accessing models

Embed Size (px)

DESCRIPTION

File models and file accessing models

Citation preview

Page 1: File models and file accessing models

Prepared By:Mehta Ishani

1300407010030

File models and file accessing models

Page 2: File models and file accessing models

Contents

2

File modelsUnstructured and structured filesMutable and immutable files

File accessing modelsAccessing remote filesUnit of data transfer

Page 3: File models and file accessing models

Unstructured files

3

Simplest modelFile – unstructured sequence of dataNo substructureContents – un interpreted sequence of bytesUnix, MS-Dos Modern OS used this model because sharing of

files is easier in compared with structured file model

Since file has no structure then different applications can interpret the contents of files in many different ways.

Page 4: File models and file accessing models

Structured files

4

Rarely used File – ordered sequence of recordsFiles – different types, different size and

different propertiesRecord – smallest unit of data that can be

accessedTwo categories

Files with non indexed recordsFiles with indexed records

Page 5: File models and file accessing models

Structured files

5

Files with non indexed recordsFile records is accessed by specifying it’s

position within fileFor ex. Fifth record from beginning, second

record from end

Files with indexed recordsRecords have one or more key fields that can

be addressed by specifying valuesFile is maintained as B-tree or other suitable

data structure or hash table to locate records quickly

Page 6: File models and file accessing models

File attributes

6

Information describing that filesHas name and valueContains information such has owner, size,

access permission, date of creation, date of last modification and date of last access

User can read the value of any attribute but can’t change modify it

Maintained and used by directory service because they are subject to different access control

Page 7: File models and file accessing models

Mutable files

7

Used by most existing osUpdate performed on files overwrites on

old contents to produce new contentsFile is represented as a single stored

sequence and that is altered by each update operation

Page 8: File models and file accessing models

Immutable files

8

Cedar files systemFile can not be modified once it has been

created except to be deleted file versioning approach is used, a new version

of file is created when change is made rather than updating same file

In practice storage space may be reduced by keeping only differences rather than created whole file again

Sharing is much easier because it supports caching and replication which eliminates the problem of keeping multiple consistent copies

Page 9: File models and file accessing models

Immutable files

9

Suffering from two issues Increased use of disk spaceIncreased disk allocation activity

CFS uses keep parameter as the no. of most current version of file to be retained.

Page 10: File models and file accessing models

Accessing remote files

10

One of the following model is used when request to access remote fileRemote service modelData catching model

Page 11: File models and file accessing models

Remote service model

11

Processing of client request is performed at server’s node

Client request is delivered to server and server machine performs on it and returns replies to client

Request and replies transferred across network as message

File server interface and communication protocol must be designed carefully so as to minimize the overhead of generating the messages

Every remote file access results in traffic

Page 12: File models and file accessing models

Data catching model

12

Reduced the amount of network traffic by taking advantage of locality feature

If requested data is not present locally then copied it from server’s node to client node and catching there

LRU is used to keep the cache size bounded

Cache Consistency problem

Page 13: File models and file accessing models

Unit of data transfer

13

Refers to fraction of file data that is transferred to and from client as a result of single read write operation

Four data transfer modelsFile level transfer modelBlock level transfer modelByte level transfer modelRecord level transfer model

Page 14: File models and file accessing models

File level transfer model

14

When the operation required file data, the whole file is moved

Advantages areEfficient because network protocol overhead is

required only onceBetter scalability because it requires fewer access

to file server and reduce server load and network traffic

Disk access routines on server can be better optimized

Offers degree of resiliency to server and network failure

Drawbacks is it requires sufficient storage spaceEx are amoeba, CFS, Andrew file system

Page 15: File models and file accessing models

Block level transfer model

15

file data transfer take place in units of data blocks

A file block is contiguous portion of file and fixed in length

Advantage is does not required large storage space

Drawback is more network traffic and more network protocol overhead

Poor performanceEx are Sun microsystem’s NFS, Apollo

domain file system

Page 16: File models and file accessing models

Byte level transfer model

16

File data transfer take place in units of bytes

Provides maximum flexibilityDifficulty in cache management

Page 17: File models and file accessing models

Record level transfer model

17

Suitable with structured filesFile data transfer take place in unit of

recordsEx. RSS(research storage system)

Page 18: File models and file accessing models

18