Hi, im wondering how can i start with this assignment of mine. I have to write a
ID: 3856092 • Letter: H
Question
Hi, im wondering how can i start with this assignment of mine. I have to write a c programming under linux environment. I need to create a directory structure to keep track of the basic file information and the location of where the file content is stored. I have to use the linear table as well as a hash table.
Bascially the physical store is represented by an array of 65 entries with 5 entries as a disk block. there is a table which is a sample instance of the first 30 blocks of the physical store containing two different files. The directory structure is stored in the first block showing the information of the 2 files. In this example the first number, 100, is the file identifier. The second number is the starting index of the first data block (i.e. 1) and the second number is the index of the ending data block which is 4.
Can anyone help me out with this code?
Explanation / Answer
To start doing this, you need to first create a array of 65 entries. First 5 entries are to represent the disk block. This array is of datatype int.
Now when each file comes, you have to store the information in that array for that file. The number of entries for the file that have to be inserted in the array depends on the structure of the file information.
Also you need to declare and maintain a counter for the array which indicates the index from which you have to start populating the array for the next file.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.