Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Locate the first bit that 0 (zero) and return its bit number. Say, bit 12 is zero, that is, all bits 0 through 11

image text in transcribed

1. Locate the first bit that 0 (zero) and return its bit number. Say, bit 12 is zero, that is, all bits 0 through 11 are 1's, then return 12. I would write a function that returns the first 0 (zero) bit. And also a function that sets a certain bit to zero or one. 2. Similarly for the data block (similar to (1)). The same functions for the databitmap. 3. We did create two entries dot and dotdot in the file meta data creation so follow those steps. The inode number in dot should the new inode number we just obtained for the directory. The inode number for the dotdot should be the inode number of the current directory (we have a global variable that contains the inode number of the current directory). 4. This is exactly the way we did with the / (root) directory creation. What is the data block number that you assign into data_block_indices[0]? Remember that inode structure has an array that contains the datablocks used their indices). The data block number obtained at step 2 will be assigned to data_block_indices[0]. 5. The inode number and datablock number bits are set to 1 in the inode and databitmap respectively. 6. Jump to the beginning of the right spot in the inode table to write the inode structure just created 7. Similarly jump to the beginning of the right datablock to write and ... entries in it. 8. Find the datablock that the current directory is using (if more than one block is used, find the last one) and add the new directory name in it. What is the inode number of this new directory? Each data block is 512 bytes. That means, you can have 512/32 entries in a data block assuming 1. Locate the first bit that 0 (zero) and return its bit number. Say, bit 12 is zero, that is, all bits 0 through 11 are 1's, then return 12. I would write a function that returns the first 0 (zero) bit. And also a function that sets a certain bit to zero or one. 2. Similarly for the data block (similar to (1)). The same functions for the databitmap. 3. We did create two entries dot and dotdot in the file meta data creation so follow those steps. The inode number in dot should the new inode number we just obtained for the directory. The inode number for the dotdot should be the inode number of the current directory (we have a global variable that contains the inode number of the current directory). 4. This is exactly the way we did with the / (root) directory creation. What is the data block number that you assign into data_block_indices[0]? Remember that inode structure has an array that contains the datablocks used their indices). The data block number obtained at step 2 will be assigned to data_block_indices[0]. 5. The inode number and datablock number bits are set to 1 in the inode and databitmap respectively. 6. Jump to the beginning of the right spot in the inode table to write the inode structure just created 7. Similarly jump to the beginning of the right datablock to write and ... entries in it. 8. Find the datablock that the current directory is using (if more than one block is used, find the last one) and add the new directory name in it. What is the inode number of this new directory? Each data block is 512 bytes. That means, you can have 512/32 entries in a data block assuming

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

Identify who may be responsible for performance appraisal.

Answered: 1 week ago