Showing posts with label Directory Implementation. Show all posts
Showing posts with label Directory Implementation. Show all posts

Wednesday, 21 January 2015

Directory Implementation in Operating System

Directory efficiency, performance and reliability are totally dependent on the technique used to store them. They are saved on Disks with two well Known Techniques:

1) Linear List: It is the Simple method of directory implementation. It makes use of a file name and a pointer to data blocks. Whenever a new file is created, whole directory is checked to make sure that no existing file has the same name. If the directory contains no file with this name it is added to the end of directory. For the deletion operation file is searched and the allocated space is released.

The Main Disadvantage is of this technique is that every time we create a new file, directory has to be checked for existing file name .The second problem is that files are accessed in a serial fashion which results in slow performance 

2) Hash Tables: In technique Directories are saved in same linear fashion but a hash table is used. It takes a value that is returned from file name and returns a pointer