To develop a C program to implement the following file organization techniques
- Single level Directory
- Two level Directory
- Hierarchical Structure
- DAG
Procedure:
- Single Level Directory
- Maintain a table containing the filename and the starting address location of that file.
- Give options for creating a new file.
- When creating the file, check for name collision.
- Update the table accordingly.
- Two level Directory
- Maintain tables for MFD and UFD.
- Each MFD entry is a directory which in turn has entries for files.
- Give options for creating a directory, creating a file and searching for a file.
- Update the respective tables accordingly.
- Tree Structured Directory
- Maintain tables for each directory starting from root.
- Limit each directory to have a maximum of five sub-directories and files.
- For each sub-directory follow the same table structure as described above.
- DAG
- Data structure is same as tree structured directory but can create a link to an existing file.
- Give options for creating a directory, file and also links.
SAMPLE INPUT & OUTPUT:
File Organization techniques
1.Single Level Directory
2.Two Level Directory
- Tree structures directory
4.DAG
Enter your option: 1
1.Create a file
2.List the files
Enter your option:1
Enter the name of the file: file1 File created!
1.Create a file
2.List the files
Enter your option:1
Enter the name of the file: file2
File created!
1.Create a file
2.List the files
Enter your option:1
Enter the name of the file: file2 File already exists!
Enter your option:2
Contents of root directory
File Name Location
***** ***
***** ***
Similarly for all other structures

![[Solved] UCS1411 Exercise 12- File Organization Techniques](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] UCS1411 Exercise 9- Implementation of Paging Technique](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.