FILE MODELS CONTENT INTRODUCTION FILE MODELS UNSTRURED AND STRUCTURED FILES MUTABLE AND...

13
FILE MODELS CONTENT INTRODUCTION FILE MODELS UNSTRURED AND STRUCTURED FILES MUTABLE AND IMMUTABLE FILES

Transcript of FILE MODELS CONTENT INTRODUCTION FILE MODELS UNSTRURED AND STRUCTURED FILES MUTABLE AND...

Page 1: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

FILE MODELS

CONTENTINTRODUCTIONFILE MODELSUNSTRURED AND STRUCTURED

FILESMUTABLE AND IMMUTABLE FILES

Page 2: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Introduction:A file is a “Named object”. That comes into existence by

explicit creation.

The two main purposem of files Permanent storage of information Sharing of information

Page 3: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

FILE MODELSDifferent file system use the diffent conceptual models.The two most commonly used for a file modeling are,

Structure Mobility

File model based on these criterias.

Page 4: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Unstructured and structured files

It is the simplest model.A file is an unstructured sequence of data.There is no “Substructure”known to the file server.The contents of each file of the file system appers to the file server as an “Uninterpreted sequence of data”.The os is not interest in the information stored in the files.Eg,UNIX and DOS use this file model.

Page 5: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Another file model is rarely used the “Stucture file model”.

In this model ,a file server is an “Ordered sequence of records”.

Records of different file of the same file system and can be different size.

Many type of files exist on file system

each having different properties. A record is the smallest unit of data can

be accessed,a file system read or write operations are carried out on a ”Set of records”.

Page 6: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Structured files are two types Indexed records. Nonindexed records.

A file record is accessed by specifying

its positionWithin the file.A file system that allow a indexed records.A file is maintained as a B –tree or suitable dataStructure .A hash table is used to locate records are quickly.

Page 7: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Most modern systems use the

“Unsturucred file model”.This is mainly used for “Sharing of file”

by different applicatin.A file has a no structured in the unstructured model,different applications can interprete a file in different ways.A file also normally have “Attributes”.A file’s attributes are information describing that file.

Page 8: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Each attribute has a name and value.The types of attributes can be associated with a file are fixed by the file system.File attributes are normally maintained by the “Directory service”.They are stored with the corresponding file.A many directory system allow files to be referenced by more than one name.

Page 9: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

MUTABLE FILES:***************** Most existing os use the mutable file model.In this model,a update performed on a file overwrites.Its old contents produce to new contents.A file is represented as a single stored sequence that is already by each update operation.

Page 10: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

I

IMMUTABLE FILES*******************Some more file system ,such as (CFS)[Gifford et al.1988]use the immutable model.CFS-CEDAR FILE SYSTEM.A file can’t be modified.Once the file is created,except to be deleted.To implement file updates,and each file is represented by a immutable versions.

Page 11: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Giffort et al.[1988] emphasized that sharing only immutable files makes it easy to support

“Consistent sharing”.It is much easier to support file caching and

replication in a distributed system.Immutable file model eliminates all problems associated with multible versions of a file consistent.The immutable file model suffers from two

potential problem,

* Incresed use of disk space. * Incresed a disk allocation activity.

Page 12: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

Prevent the disk space from filling instantaneously.CFS[Giffort et al.1988] uses a “Keep” parameter as the no of most current versions of a file retained.For eg,”demo.abc!6” is a name for version6.The base name of “demo.abc”.If the value of the keep parameter of a file is 1,the creation of new version of the file cause the file “Demo.abc!6 “to be deleted.And its diskspace to be reused for the new file named “demo.abc!7”.

Page 13: FILE MODELS CONTENT  INTRODUCTION  FILE MODELS  UNSTRURED AND STRUCTURED FILES  MUTABLE AND IMMUTABLE FILES.

When the keep parameter value is greater than 1,for a file that is,when multible versions of a file exist.Users may use a particular version of the file by specifying its full name.When the version number is not specified,by default,CFS uses the lowest version number forSome operations such as “Delete”.And highest versin number for other operation such as “Open”.