SlideShare ist ein Scribd-Unternehmen logo
1 von 17
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

Weitere ähnliche Inhalte

Was ist angesagt?

Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System ImplementationWayne Jones Jnr
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSUnited International University
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tablesshashikant pabari
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactionsNilu Desai
 
Presentation on tablespaceses segments extends and blocks
Presentation on tablespaceses segments extends and blocksPresentation on tablespaceses segments extends and blocks
Presentation on tablespaceses segments extends and blocksVinay Ugave
 
Allocation methods (1).pptx
Allocation methods (1).pptxAllocation methods (1).pptx
Allocation methods (1).pptxssuser55cbdb
 
Binary search tree
Binary search treeBinary search tree
Binary search treeKousalya M
 
File organization
File organizationFile organization
File organizationGokul017
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 
Transaction & Concurrency Control
Transaction & Concurrency ControlTransaction & Concurrency Control
Transaction & Concurrency ControlRavimuthurajan
 
Free space managment46
Free space managment46Free space managment46
Free space managment46myrajendra
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data StructureMeghaj Mallick
 
Internal representation of files ppt
Internal representation of files pptInternal representation of files ppt
Internal representation of files pptAbhaysinh Surve
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systemsViet-Trung TRAN
 

Was ist angesagt? (20)

File access method
File access methodFile access method
File access method
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Linked list
Linked listLinked list
Linked list
 
File organization
File organizationFile organization
File organization
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tables
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactions
 
Presentation on tablespaceses segments extends and blocks
Presentation on tablespaceses segments extends and blocksPresentation on tablespaceses segments extends and blocks
Presentation on tablespaceses segments extends and blocks
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Allocation methods (1).pptx
Allocation methods (1).pptxAllocation methods (1).pptx
Allocation methods (1).pptx
 
Binary search tree
Binary search treeBinary search tree
Binary search tree
 
File organization
File organizationFile organization
File organization
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
Hashing
HashingHashing
Hashing
 
Transaction & Concurrency Control
Transaction & Concurrency ControlTransaction & Concurrency Control
Transaction & Concurrency Control
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
 
Internal representation of files ppt
Internal representation of files pptInternal representation of files ppt
Internal representation of files ppt
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 

Ähnlich wie Directory implementation and allocation methods

Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1rohassanie
 
File System Implementation.pptx
File System Implementation.pptxFile System Implementation.pptx
File System Implementation.pptxRajapriya82
 
Secondary Storage Management
Secondary Storage ManagementSecondary Storage Management
Secondary Storage ManagementPriyanshuGandhi3
 
Storage Mediums and Fragmentation
Storage Mediums and FragmentationStorage Mediums and Fragmentation
Storage Mediums and FragmentationJonathan Reid
 
Operating Systems - Implementing File Systems
Operating Systems - Implementing File SystemsOperating Systems - Implementing File Systems
Operating Systems - Implementing File SystemsMukesh Chinta
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMSVrushaliSolanke
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdfFraolUmeta
 
File organization continued
File organization continuedFile organization continued
File organization continuedchesterking12
 
Filesharing 180214044607
Filesharing 180214044607Filesharing 180214044607
Filesharing 180214044607kirupasuchi1996
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.pptHelalMirzad
 

Ähnlich wie Directory implementation and allocation methods (20)

Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
 
Directory structure
Directory structureDirectory structure
Directory structure
 
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
 
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
 

Mehr von sangrampatil81

Mehr von 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 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
 
Structure in c language
Structure in c languageStructure in c language
Structure in c language
 

Kürzlich hochgeladen

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 

Kürzlich hochgeladen (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 

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