the file system & directory system module presented by: erhan atilla avinal maitreya natu...

11
The File System & The File System & Directory System Directory System Module Module Presented By: Presented By: Erhan Atilla Avinal Erhan Atilla Avinal Maitreya Natu Maitreya Natu Shivkundan Singh Tej Shivkundan Singh Tej Tam H. Vu Tam H. Vu

Upload: kenneth-willis

Post on 19-Jan-2016

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

The File System & The File System & Directory System ModuleDirectory System Module

Presented By:Presented By:Erhan Atilla AvinalErhan Atilla Avinal

Maitreya NatuMaitreya NatuShivkundan Singh TejShivkundan Singh Tej

Tam H. VuTam H. Vu

Page 2: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

OverviewOverview

The project focuses on:The project focuses on:Logical and abstract view of files and Logical and abstract view of files and

directories to the users by hiding the physical directories to the users by hiding the physical details.details.

Efficient use of underlying storage deviceEfficient use of underlying storage deviceProvide exhaustive tools for organization of Provide exhaustive tools for organization of

files and directoriesfiles and directoriesProvide protection features to the files and Provide protection features to the files and

directoriesdirectories

Page 3: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Interface to File and Directory systemInterface to File and Directory system

I/O System Interface

readDescriptor(), writeDescriptor(),readDataBlock(), writeDataBlock()

Device Organization Methods

readBlock() writeBlock()

BLOCK I/O Subsystem

File & Directory Operations

File & Directory System

File System Interface

Symbolic File Name Open File objects

Raw disk blocks

Bitmap, Descriptors, Data blocks

Files and Directories

Page 4: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Levels of abstraction of the Physical DiskLevels of abstraction of the Physical Disk/(root)

Dir1 Dir2File1

File 2 File 3

Physical Disk

Logical view of disk as 1D blocks

Bitmap Descriptors Data blocks

Tree containing files and directories

Page 5: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

The Class DesignThe Class Design

DiskBitSet Bitmap, DESCRIPTOR[ ] Descriptor_Array, byte[ ][ ]Block_Array

readDescriptor, writeDescriptor, readBlock, writeBlock, findFreeBlock, findFreeDescriptor

DESCRIPTOR

int Type, int Size, int Block Addresses[]

FileDirectory

FileSystemDirectorySystem

FileDirectorySystem

String Name DESCRIPTOR Descriptor,int Children Directory Parent Directory Location int Protection, int Owner int Use

String Name DESCRIPTOR Descriptorint CurrentPosition Directory Locationint Protection int Ownerint Use

createDirectory deleteDirectory changeDirectory moveDirectorychangeProtection listDirectory

createFile openFile readFilewriteFile renameFile rewindFilechangeProtection

Disk d, FileSystem fileSys, DirectorySystem dirSys

UserInterfaceRun()

Page 6: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

DIRECTORY SYSTEM

FILE & DIRECTORY SYSTEM

DIRECTORY

createFile, deleteFile, openFile,readFile, writeFile,

openFile, rewindFile, changeProtection

createDirectory, deleteDirectory,changeDirectory, moveDirectory,listDirectory, changeProtection

addFile, removeFile, changeProtection

readDescriptor, writeDescriptor,readBlock, writeBlock

FILE SYSTEM

FILE

DISK

DESCRIPTOR

Communication between classes

USER INTERFACE

Page 7: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Features of our file systemFeatures of our file system File OperationsFile Operations

Create, Delete, Rename, Read, Write, Copy, Rewind, Change Create, Delete, Rename, Read, Write, Copy, Rewind, Change Protection.Protection.

Directory OperationsDirectory Operations Create, Delete, Move, Change Directory, List, Change Create, Delete, Move, Change Directory, List, Change

ProtectionProtection Supports an inverted tree directory structure.Supports an inverted tree directory structure.

Provides facility to create directories within directory.Provides facility to create directories within directory. Provides protection to files and directoriesProvides protection to files and directories

Protection bits for every file and directoryProtection bits for every file and directory Owner information is stored with every file and directoryOwner information is stored with every file and directory

User friendly interfaceUser friendly interface Provides an interface for using all the file system features with Provides an interface for using all the file system features with

an online help to use the commands.an online help to use the commands. Adaptive to different disk configurationsAdaptive to different disk configurations

Simple modifications can make the subsystem work for disk with Simple modifications can make the subsystem work for disk with different capacity, block size and number of files and directories.different capacity, block size and number of files and directories.

Page 8: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Features contd..Features contd..

Specifications:Specifications:Disk block size: 512BytesDisk block size: 512BytesMaximum file size: 6656 BytesMaximum file size: 6656 BytesMaximum number of files and directories: 160Maximum number of files and directories: 160Protection bits: r-w-x bits are associated with Protection bits: r-w-x bits are associated with

each file and directoryeach file and directory

Page 9: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Functioning of the systemFunctioning of the system

200:0

………………..

………………………………..

………………………………..

FDS

DIRECTORY & DSFILE & FS

DISK

/(root)User Interface

Page 10: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Limitations & Further ExtensionsLimitations & Further Extensions

Provides a small upper limit on file and directory Provides a small upper limit on file and directory size (of 6656 bytes).size (of 6656 bytes). The limit can be increased by using multilevel The limit can be increased by using multilevel

indexing in the descriptorindexing in the descriptor

Provides same access rights to all usersProvides same access rights to all users Can be extended by adding more bytes for storing Can be extended by adding more bytes for storing

protection informationprotection information

Does not support symbolic linksDoes not support symbolic links This feature can be extended by adding some link This feature can be extended by adding some link

information in the directory & the descriptor structureinformation in the directory & the descriptor structure

Page 11: The File System & Directory System Module Presented By: Erhan Atilla Avinal Maitreya Natu Shivkundan Singh Tej Tam H. Vu

Thank youThank you