Directory Implementation

Document Sample
Directory Implementation Powered By Docstoc
					                               Directory Implementation
           The selection of the allocation algorithms within the directory and directory management.
           Management has the effect of large directories within efficiency.
           Effect in the event of performance
           Reliability of the file system itself



Methods of implementation of the directory:

           With Linear List
           With Hash Table




Linear List
The simplest method, implement the COE file is by directly pointing to a block of data. Search
direction to find the directory in it.


To create a new file, we have to look at within the directory to make sure that no files are named the
same. To delete a file, we find those files within the directory. (Then let the place to be allocated to the
file)

There are a few things done retrievable in the event of re-use a file:


           Marking a file. by naming in particular, such as an empty name
           Can be added to the free directories.
           Alternatively, we retrievable copy to the vacated spot in the directory.
Hash Table
Within the linear method of storing the directory list, but the hash data structures are also used.
Hash table to take the calculated value of the file name. Returns a pointer to the filename in a
linear list. Search costs can be cut a lot of directories. (insert the file, and delete data quickly and
easily LBH)




The main difficulty in the hash table:

    -   Fixed size of the hash table
    -   Dependence of the size of the hash function hash table

For example:
Suppose we make a linear probing hash table that is collapsible to accommodate 64 data.
Hash function to change the file into a value from 0 to 63. If the make file to 65, then the table should
be enlarged to the size of eg 128. And we need a new hash function to map a file name from the
range 0 to 127. Also have to set the data directory of existing hash functions in order to meet the
new.




Efficiency

Interchangeable disks used efficiently depends on the disk allocation techniques, as well as directory
creation algorithm used
example: on unix, the directory file is allocated first to the partition
Although there was a blank disk a few percent of its space is used for that directory.
Performance

  -   When the disk is the basic method has been selected, then there is still some way to
      improve performance.
  -   One way is to use the cache, which is the local memory on the disk controller.
  -   CKP large cache to hold the entire track at a time.
  -   Some systems set up, a separate section of main memory for disk cache, the blocks are
      assumed to be stored, used within the near future.
  -   Interchangeable disks used efficiently depends on the disk allocation techniques, as well as
      directory creation algorithm used
      example: on unix, the directory file is allocated first to the partition
  -   Although there was a blank disk from space it uses a few percent to that directory.
  -   Another method is to divide a section of virtual memory to disk or RAM disk.
  -   On the RAM disk are standard operations pd disk, but all operations within a section in memory,
      not on disk.
  -   However, the RAM disk is only useful for temporary storage, because if the computer is
      rebooted or power failure then the contents of the RAM disk is erased.
  -   The difference between RAM disk and disk cache is the problem of who controls the disk.
  -   RAM disk is fully controlled by the user, while the disk cache is controlled by the operating
      system.

				
DOCUMENT INFO
Description: All about Directory Implementation, Methods of implementation of the directory: With Linear List and With Hash Table