SlideShare a Scribd company logo
Directory Implementation
and Allocation Methods
Prepared By: Mr. Sangram A. Patil
Assistant Professor
PVPIT, Budhgaon
Directory Implementation
 Number of algorithms by using which, the directories can be implemented.
 selection of an appropriate directory implementation algorithm may significantly
affect the performance of the system.
 classified according to the data structure they are using.
 There are mainly two algorithms which are used in these days.
1. Linear list
2. Hash table
1. Linear List
 All the files in a directory are maintained as singly linked list.
 Each file contains the pointers to the data blocks which are assigned to it and the
next file in the directory.
 Characteristics of linear list
 searching for a unique name is a big concern because traversing the whole list
takes time.
 When a new file is created, then the entire list is checked whether the new file
name is matching to a existing file name or not. In case, it doesn't exist, the file can
be created at the beginning or at the end.
 The list needs to be traversed in case of every operation (creation, deletion,
updating, etc) on the files therefore the systems become inefficient.
2. Hash Table
 It overcome the drawbacks of singly linked list implementation.
 This approach suggests to use hash table along with the linked lists.
 A key-value pair for each file in the directory gets generated and stored in the hash
table.
 The key can be determined by applying the hash function on the file name while
the key points to the corresponding file stored in the directory.
 searching becomes efficient
 Only hash table entries are checked using the key and if an entry found then the
corresponding file will be fetched using the value.
Allocation Methods
 There are various methods which can be used to allocate disk space to the files.
 Selection of an appropriate allocation method will significantly affect the
performance and efficiency of the system.
 Allocation method provides a way in which the disk will be utilized and the files will
be accessed.
 following methods which can be used for allocation.
1. Contiguous Allocation
2. Linked Allocation
3. Indexed Allocation
1. Contiguous Allocation
 If the blocks are allocated to the file in such a way that all the logical blocks of the
file get the contiguous physical block in the hard disk then such allocation scheme
is known as contiguous allocation.
1. Contiguous Allocation
 Advantages
1. It is simple to implement.
2. We will get Excellent read performance.
3. Supports Random Access into files.
 Disadvantages
1. The disk will become fragmented (External Fragmentation).
2. It may be difficult to have a file grow (Dynamic Storage allocation problem).
3. Difficult to find space for new file.
2. Linked Allocation
 Solves problems of contiguous allocation.
 Each file is considered as the linked list of disk blocks.
 However, the disks blocks allocated to a particular file need not to be contiguous
on the disk.
 Each disk block allocated to a file contains a pointer which points to the next disk
block allocated to the same file.
 To create a new file we simply create a new entry in directory.
 With linked allocation each directory entry has a pointer to first block of the file.
 Advantages
1. There is no external fragmentation with linked allocation.
2. Any free block can be utilized in order to satisfy the file block requests.
3. File can continue to grow as long as the free blocks are available.
4. Directory entry will only contain the starting block address.
 Disadvantages
1. Random Access is not provided.
2. Pointers require some space in the disk blocks.
3. Any of the pointers in the linked list must not be broken otherwise the file will get
corrupted.
4. Need to traverse each block.
File Allocation Table
 File Allocation Table overcomes this drawback of linked list allocation in linked
allocation.
 a file allocation table is maintained at the beginning of disk volume.
 Table has one entry for each disk block and indexed by block number.
 Directory entry contains block number of the first block of the file.
 The table entry indexed by that block number contains the block number of next
block in the file.
 This chain continues until it reaches the last block.
3.Indexed allocation
 The more the number of blocks, the more will be the size of FAT.
 need to allocate more space to a file allocation table.
 file allocation table needs to be cached therefore it is impossible to have as many
space in cache.
 Indexed allocation scheme stores all the disk pointers in one of the blocks called as
indexed block.
 Indexed block doesn't hold the file data, but it holds the pointers to all the disk
blocks allocated to that particular file.
 Directory entry will only contain the index block address.
 Advantages
1. Supports direct access
2. A bad data block causes the lost of only that block.
3. No external fragmentation
 Disadvantages
1. A bad index block could cause the lost of entire file.
2. Size of a file depends upon the number of pointers, a index block can hold.
3. Having an index block for a small file is totally wastage.
4. More pointer overhead

More Related Content

What's hot

Concurrency control
Concurrency controlConcurrency control
Concurrency control
Subhasish Pati
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
Paresh Parmar
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
sonalikharade3
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
Dynamic storage allocation techniques
Dynamic storage allocation techniquesDynamic storage allocation techniques
Dynamic storage allocation techniquesShashwat Shriparv
 
File system Os
File system OsFile system Os
File system Os
Nehal Naik
 
Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques Kalhan Liyanage
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
Muhammad SiRaj Munir
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
ManishaJha43
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Locking base concurrency control
  Locking base concurrency control  Locking base concurrency control
Locking base concurrency control
Prakash Poudel
 
Log based and Recovery with concurrent transaction
Log based and Recovery with concurrent transactionLog based and Recovery with concurrent transaction
Log based and Recovery with concurrent transaction
nikunjandy
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
Rajapriya82
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
rajshreemuthiah
 
File organization 1
File organization 1File organization 1
File organization 1
Rupali Rana
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
Megha Patel
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
Ravinder Kamboj
 

What's hot (20)

Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
Dynamic storage allocation techniques
Dynamic storage allocation techniquesDynamic storage allocation techniques
Dynamic storage allocation techniques
 
File system Os
File system OsFile system Os
File system Os
 
Memory management
Memory managementMemory management
Memory management
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Locking base concurrency control
  Locking base concurrency control  Locking base concurrency control
Locking base concurrency control
 
Log based and Recovery with concurrent transaction
Log based and Recovery with concurrent transactionLog based and Recovery with concurrent transaction
Log based and Recovery with concurrent transaction
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
 
File organization 1
File organization 1File organization 1
File organization 1
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
 

Similar to Directory implementation and allocation methods

Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1rohassanie
 
File System Implementation
File System ImplementationFile System Implementation
File System Implementation
Abhishek Pachisia
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
BharathiLakshmiAAssi
 
Allocation methods (1).pptx
Allocation methods (1).pptxAllocation methods (1).pptx
Allocation methods (1).pptx
ssuser55cbdb
 
File System Implementation.pptx
File System Implementation.pptxFile System Implementation.pptx
File System Implementation.pptx
Rajapriya82
 
Secondary Storage Management
Secondary Storage ManagementSecondary Storage Management
Secondary Storage Management
PriyanshuGandhi3
 
Storage Mediums and Fragmentation
Storage Mediums and FragmentationStorage Mediums and Fragmentation
Storage Mediums and FragmentationJonathan Reid
 
Files
FilesFiles
Operating Systems - Implementing File Systems
Operating Systems - Implementing File SystemsOperating Systems - Implementing File Systems
Operating Systems - Implementing File Systems
Mukesh Chinta
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMS
VrushaliSolanke
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdf
FraolUmeta
 
File organization continued
File organization continuedFile organization continued
File organization continued
chesterking12
 
File Systems
File SystemsFile Systems
File Systems
Shipra Swati
 
File sharing
File sharingFile sharing
File sharing
janani thirupathi
 
Filesharing 180214044607
Filesharing 180214044607Filesharing 180214044607
Filesharing 180214044607
kirupasuchi1996
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
Ethiopia Satlliet television
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
HelalMirzad
 

Similar to Directory implementation and allocation methods (20)

Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
 
File System Implementation
File System ImplementationFile System Implementation
File System Implementation
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
 
Allocation methods (1).pptx
Allocation methods (1).pptxAllocation methods (1).pptx
Allocation methods (1).pptx
 
File System Implementation.pptx
File System Implementation.pptxFile System Implementation.pptx
File System Implementation.pptx
 
Secondary Storage Management
Secondary Storage ManagementSecondary Storage Management
Secondary Storage Management
 
Storage Mediums and Fragmentation
Storage Mediums and FragmentationStorage Mediums and Fragmentation
Storage Mediums and Fragmentation
 
Files
FilesFiles
Files
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Operating Systems - Implementing File Systems
Operating Systems - Implementing File SystemsOperating Systems - Implementing File Systems
Operating Systems - Implementing File Systems
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMS
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdf
 
File organization continued
File organization continuedFile organization continued
File organization continued
 
File organisation
File organisationFile organisation
File organisation
 
File Systems
File SystemsFile Systems
File Systems
 
File system implementation
File system implementationFile system implementation
File system implementation
 
File sharing
File sharingFile sharing
File sharing
 
Filesharing 180214044607
Filesharing 180214044607Filesharing 180214044607
Filesharing 180214044607
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
 

More from sangrampatil81

Deadlock
DeadlockDeadlock
Deadlock
sangrampatil81
 
Memory Management
Memory ManagementMemory Management
Memory Management
sangrampatil81
 
virtual memory
virtual memoryvirtual memory
virtual memory
sangrampatil81
 
IO hardware
IO hardwareIO hardware
IO hardware
sangrampatil81
 
File system structure
File system structureFile system structure
File system structure
sangrampatil81
 
File management
File managementFile management
File management
sangrampatil81
 
Disk structure
Disk structureDisk structure
Disk structure
sangrampatil81
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
sangrampatil81
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
Semaphore
SemaphoreSemaphore
Semaphore
sangrampatil81
 
Monitors
MonitorsMonitors
Monitors
sangrampatil81
 
Classical problems of process synchronization
Classical problems of process synchronizationClassical problems of process synchronization
Classical problems of process synchronization
sangrampatil81
 
System programs
System programsSystem programs
System programs
sangrampatil81
 
System programs
System programsSystem programs
System programs
sangrampatil81
 
Services and system calls
Services and system callsServices and system calls
Services and system calls
sangrampatil81
 
Operating system structure
Operating system structureOperating system structure
Operating system structure
sangrampatil81
 
Operating system deign and implementation
Operating system deign and implementationOperating system deign and implementation
Operating system deign and implementation
sangrampatil81
 
Pointer to array and structure
Pointer to array and structurePointer to array and structure
Pointer to array and structure
sangrampatil81
 
Pointer arithmetic in c
Pointer arithmetic in c Pointer arithmetic in c
Pointer arithmetic in c
sangrampatil81
 
Pointer in c
Pointer in c Pointer in c
Pointer in c
sangrampatil81
 

More from sangrampatil81 (20)

Deadlock
DeadlockDeadlock
Deadlock
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
IO hardware
IO hardwareIO hardware
IO hardware
 
File system structure
File system structureFile system structure
File system structure
 
File management
File managementFile management
File management
 
Disk structure
Disk structureDisk structure
Disk structure
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Monitors
MonitorsMonitors
Monitors
 
Classical problems of process synchronization
Classical problems of process synchronizationClassical problems of process synchronization
Classical problems of process synchronization
 
System programs
System programsSystem programs
System programs
 
System programs
System programsSystem programs
System programs
 
Services and system calls
Services and system callsServices and system calls
Services and system calls
 
Operating system structure
Operating system structureOperating system structure
Operating system structure
 
Operating system deign and implementation
Operating system deign and implementationOperating system deign and implementation
Operating system deign and implementation
 
Pointer to array and structure
Pointer to array and structurePointer to array and structure
Pointer to array and structure
 
Pointer arithmetic in c
Pointer arithmetic in c Pointer arithmetic in c
Pointer arithmetic in c
 
Pointer in c
Pointer in c Pointer in c
Pointer in c
 

Recently uploaded

Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 

Recently uploaded (20)

Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 

Directory implementation and allocation methods

  • 1. Directory Implementation and Allocation Methods Prepared By: Mr. Sangram A. Patil Assistant Professor PVPIT, Budhgaon
  • 2. Directory Implementation  Number of algorithms by using which, the directories can be implemented.  selection of an appropriate directory implementation algorithm may significantly affect the performance of the system.  classified according to the data structure they are using.  There are mainly two algorithms which are used in these days. 1. Linear list 2. Hash table
  • 3. 1. Linear List  All the files in a directory are maintained as singly linked list.  Each file contains the pointers to the data blocks which are assigned to it and the next file in the directory.
  • 4.  Characteristics of linear list  searching for a unique name is a big concern because traversing the whole list takes time.  When a new file is created, then the entire list is checked whether the new file name is matching to a existing file name or not. In case, it doesn't exist, the file can be created at the beginning or at the end.  The list needs to be traversed in case of every operation (creation, deletion, updating, etc) on the files therefore the systems become inefficient.
  • 5. 2. Hash Table  It overcome the drawbacks of singly linked list implementation.  This approach suggests to use hash table along with the linked lists.  A key-value pair for each file in the directory gets generated and stored in the hash table.  The key can be determined by applying the hash function on the file name while the key points to the corresponding file stored in the directory.  searching becomes efficient  Only hash table entries are checked using the key and if an entry found then the corresponding file will be fetched using the value.
  • 6.
  • 7. Allocation Methods  There are various methods which can be used to allocate disk space to the files.  Selection of an appropriate allocation method will significantly affect the performance and efficiency of the system.  Allocation method provides a way in which the disk will be utilized and the files will be accessed.  following methods which can be used for allocation. 1. Contiguous Allocation 2. Linked Allocation 3. Indexed Allocation
  • 8. 1. Contiguous Allocation  If the blocks are allocated to the file in such a way that all the logical blocks of the file get the contiguous physical block in the hard disk then such allocation scheme is known as contiguous allocation.
  • 9. 1. Contiguous Allocation  Advantages 1. It is simple to implement. 2. We will get Excellent read performance. 3. Supports Random Access into files.  Disadvantages 1. The disk will become fragmented (External Fragmentation). 2. It may be difficult to have a file grow (Dynamic Storage allocation problem). 3. Difficult to find space for new file.
  • 10. 2. Linked Allocation  Solves problems of contiguous allocation.  Each file is considered as the linked list of disk blocks.  However, the disks blocks allocated to a particular file need not to be contiguous on the disk.  Each disk block allocated to a file contains a pointer which points to the next disk block allocated to the same file.  To create a new file we simply create a new entry in directory.  With linked allocation each directory entry has a pointer to first block of the file.
  • 11.
  • 12.  Advantages 1. There is no external fragmentation with linked allocation. 2. Any free block can be utilized in order to satisfy the file block requests. 3. File can continue to grow as long as the free blocks are available. 4. Directory entry will only contain the starting block address.  Disadvantages 1. Random Access is not provided. 2. Pointers require some space in the disk blocks. 3. Any of the pointers in the linked list must not be broken otherwise the file will get corrupted. 4. Need to traverse each block.
  • 13. File Allocation Table  File Allocation Table overcomes this drawback of linked list allocation in linked allocation.  a file allocation table is maintained at the beginning of disk volume.  Table has one entry for each disk block and indexed by block number.  Directory entry contains block number of the first block of the file.  The table entry indexed by that block number contains the block number of next block in the file.  This chain continues until it reaches the last block.
  • 14.
  • 15. 3.Indexed allocation  The more the number of blocks, the more will be the size of FAT.  need to allocate more space to a file allocation table.  file allocation table needs to be cached therefore it is impossible to have as many space in cache.  Indexed allocation scheme stores all the disk pointers in one of the blocks called as indexed block.  Indexed block doesn't hold the file data, but it holds the pointers to all the disk blocks allocated to that particular file.  Directory entry will only contain the index block address.
  • 16.
  • 17.  Advantages 1. Supports direct access 2. A bad data block causes the lost of only that block. 3. No external fragmentation  Disadvantages 1. A bad index block could cause the lost of entire file. 2. Size of a file depends upon the number of pointers, a index block can hold. 3. Having an index block for a small file is totally wastage. 4. More pointer overhead