Title: The File System
1The File System Directory System Module
- Presented By
- Erhan Atilla Avinal
- Maitreya Natu
- Shivkundan Singh Tej
- Tam H. Vu
2Overview
- The project focuses on
- Logical and abstract view of files and
directories to the users by hiding the physical
details. - Efficient use of underlying storage device
- Provide exhaustive tools for organization of
files and directories - Provide protection features to the files and
directories
3Interface to File and Directory system
Symbolic File Name
Open File objects
File System Interface
File Directory Operations File Directory
System
Files and Directories
readDescriptor(), writeDescriptor(), readDataBlock
(), writeDataBlock() Device Organization Methods
Bitmap, Descriptors, Data blocks
I/O System Interface
readBlock() writeBlock() BLOCK I/O Subsystem
Raw disk blocks
4Levels of abstraction of the Physical Disk
/(root)
Dir1
Dir2
File1
File 3
File 2
Tree containing files and directories
Bitmap
Descriptors
Data blocks
Logical view of disk as 1D blocks
Physical Disk
5The Class Design
UserInterface
Run()
FileDirectorySystem
Disk d, FileSystem fileSys, DirectorySystem dirSys
DirectorySystem
FileSystem
createDirectory deleteDirectory
changeDirectory moveDirectory changeProtection
listDirectory
createFile openFile
readFile writeFile renameFile
rewindFile changeProtection
File
Directory
String Name DESCRIPTOR Descriptor, int Children
Directory Parent Directory Location int
Protection, int Owner int Use
String Name DESCRIPTOR Descriptor int
CurrentPosition Directory Location int
Protection int Owner int Use
Disk
DESCRIPTOR
BitSet Bitmap, DESCRIPTOR Descriptor_Array,
byte Block_Array
int Type, int Size, int Block Addresses
readDescriptor, writeDescriptor, readBlock,
writeBlock, findFreeBlock, findFreeDescriptor
6Communication between classes
USER INTERFACE
FILE DIRECTORY SYSTEM
createFile, deleteFile, openFile, readFile,
writeFile, openFile, rewindFile, changeProtection
createDirectory, deleteDirectory, changeDirectory,
moveDirectory, listDirectory, changeProtection
DIRECTORY SYSTEM
FILE SYSTEM
addFile, removeFile, changeProtection
DIRECTORY
FILE
readDescriptor, writeDescriptor, readBlock,
writeBlock
DISK
DESCRIPTOR
7Features of our file system
- File Operations
- Create, Delete, Rename, Read, Write, Copy,
Rewind, Change Protection. - Directory Operations
- Create, Delete, Move, Change Directory, List,
Change Protection - Supports an inverted tree directory structure.
- Provides facility to create directories within
directory. - Provides protection to files and directories
- Protection bits for every file and directory
- Owner information is stored with every file and
directory - User friendly interface
- Provides an interface for using all the file
system features with an online help to use the
commands. - Adaptive to different disk configurations
- Simple modifications can make the subsystem work
for disk with different capacity, block size and
number of files and directories.
8Features contd..
- Specifications
- Disk block size 512Bytes
- Maximum file size 6656 Bytes
- Maximum number of files and directories 160
- Protection bits r-w-x bits are associated with
each file and directory
9Functioning of the system
User Interface
/(root)
command
command
FDS
DIRECTORY DS
FILE FS
createDirectory
addDirectory
createDirectory
createfile
addFile
DISK
findFreeDescriptor
writeDescriptor
writeDescriptor
findFreeBlock
writeBlock
writeBlock
writeDescriptor
FindFreeDescriptor
writeDescriptor
..
2 0 0 0
2 0 0 0
2 1 1 0
1 0 0 0
2 2 1 0
..
Name Des Own Pro Dir1 1 4 7
Name Des Own Pro Dir1 1 4 7
File1 2 4 7
..
10Limitations Further Extensions
- Provides a small upper limit on file and
directory size (of 6656 bytes). - The limit can be increased by using multilevel
indexing in the descriptor - Provides same access rights to all users
- Can be extended by adding more bytes for storing
protection information - Does not support symbolic links
- This feature can be extended by adding some link
information in the directory the descriptor
structure
11Thank you