Question

In: Computer Science

What are the steps required to be performed by the Ext2 file system subsystem to delete...

What are the steps required to be performed by the Ext2 file system subsystem to delete a file of size 72KiB? Assume you know and have in memory a copy of the inode of the directory the file is in and the inode of the file to be deleted. Also assume the block size is 1024 bytes. Either list the steps required or use a flowchart.

Solutions

Expert Solution

There are generally two stages to creating a file system on a disk. The first step is to form atit so that the disk driver can read and write block so nit. Modern hard disks come pre formatted from the factory and need not be reformatted, floppy disks may be formatted on Linux using a utility program such as super format or fd format. The second step involves creating a file system, which means setting up the structures described earlier. Ext 2 file systems are created by the mke2fs utility program, it assumes the following default options, which may be modified by the user with flags on the command line:

  • Block size : 1,024 bytes(default value for a small file system)
  • Fragment size : block size(block fragmentation is not implemented)
  • Number of allocated i nodes : 1 i node for each 8,192 bytes
  • Percentage of reserved blocks : 5 percent

The program performs the following actions:

  1. Initializes the super block and the group descriptors.
  2. Optionally,checks whether the partition contains defective blocks, if so,it creates a list of defective blocks.
  3. For each block group, reserves all the disk blocks needed to store the super block, the group descriptors, the i node table, and the two bit maps.
  4. Initializes the i node bit map and the data map bit map of each block group to 0.
  5. Initializes the i node table of each block group.
  6. Creates the/root directory.
  7. Creates the lost+found directory, which is used bye 2 fsck to link the lost and found defective blocks.
  8. Updates the i node bit map and the data block bit map of the block group in which the two previous directories have been created.
  9. Groups the defective blocks (if any) in the lost+found directory.

Let's us consider, for example, how an Ext 21.44 MB floppy disk is initialized by mke2 fs with the default options. Once mounted, it appears as a volume consisting of 1,412 blocks, each one is 1,024 bytes in length.

Block

Content

0

Boot block

1

Super block

2

Block containing a single block group descriptor

3

Data block bit map

4

i node bit map

5-27

i node table : i nodes up to 10 : reserved (i node 2 is the root), i node 11 : lost + found; i nodes 12–184 : free

28

Root directory (includes .,.. and lost + found)

29

lost + found directory (includes . and ..)

30-40

Reserved blocks pre allocated for lost + found directory

41-1439

Free blocks


Related Solutions

What are the UNIX commands for each of these steps? 1. Delete all the files in...
What are the UNIX commands for each of these steps? 1. Delete all the files in the Classes and Backup directories only. 2. Redirect echo step 23 to mark this step in the lab3.txt file 3. Display all of the directories and sub-directories including files so I can verify you completed all the steps correctly. 4. Repeat the above step and redirect the output to the file lab3.txt without erasing what is already in it! 5. Redirect echo step 26...
What are the steps required to integrate your product into a fully functional system?? This is...
What are the steps required to integrate your product into a fully functional system?? This is in regards to a new project development like small robot.
unix Delete the second character from every line in a file Delete the last word from...
unix Delete the second character from every line in a file Delete the last word from every line in a file. Swap the first and second letter of every line in a file. Swap the first and last characters of every line in a file.
Discuss what tasks can be performed in the ~/.profile file. (LINUX)
Discuss what tasks can be performed in the ~/.profile file. (LINUX)
Create a Packet Tracer file that completes the required steps below. After you have added the...
Create a Packet Tracer file that completes the required steps below. After you have added the switches, add the following devices and wire accordingly. Device Interface To PC1-A F0 Switch 1 F0/1 PC1-B F0 Switch 1 F0/5 Configure the following information on the computers: Device IP Subnet PC1-A 172.16.30.3 255.255.255.0 PC1-B 172.16.30.4 255.255.255.0 Configure the following items: Set passwords for the Console and VTY 0 4 lines. The password should be set for login and the password should be "Pa$$word#1"....
1. MySQL can enforce referential integrity for a delete operation performed on a parent table record...
1. MySQL can enforce referential integrity for a delete operation performed on a parent table record by ____________________ . A. returning an error instead of deleting any rows. B. setting the foreign key values in the related child table rows to null. C. deleting the related rows in the corresponding child table(s). D. applying any one of the above, (a, b or c), depending on how the foreign key constraint is defined. 2. Third normal form (3NF) eliminates which of...
What are subsequent events? Give 4 examples. What work is required to be performed by the...
What are subsequent events? Give 4 examples. What work is required to be performed by the auditor on these events? Differentiate between Type 1 and Type 2 subsequent events? What work is required for each type? What two criteria must be met for the financial statements to be adjusted for a subsequent event?
Create a Packet Tracer file that completes the required steps below. Add two Cisco 2960 switches...
Create a Packet Tracer file that completes the required steps below. Add two Cisco 2960 switches and wire it up accordingly; use a crossover cable. Device Interface To Switch 1 G0/0 Switch 2 G0/1 Switch 2 G0/1 Switch 1 G0/0 After you have added the switches, add the following devices and wire accordingly. Device Interface To PC1-A F0 Switch 1 F0/4 PC1-B F0 Switch 1 F0/3 PC2-A F0 Switch 2 F0/4 PC2-B F0 Switch 2 F0/3 Configure the following information...
Consider a radiology practice system (as a subsystem of the clinical information systems) (200p for task...
Consider a radiology practice system (as a subsystem of the clinical information systems) (200p for task A4 ): A4.1 70p Describe the most typical 5-6 features of a radiology practice system. A4.2. 60p What are the general IS selection criteria that would be applicable if you have to choose a particular radiology practice system for a hospital. A4.3.70 p What physical security means and what authentication means would be suitable for a radiology practice system.
Consider a radiology practice system (as a subsystem of the clinical information systems) A4.1 Describe the...
Consider a radiology practice system (as a subsystem of the clinical information systems) A4.1 Describe the most typical 5-6 features of a radiology practice system. A4.2. What criteria would be applicable if you have to choose a particular radiology practice system for a hospital. A4.3.What physical security means and authentication means would be suitable for a radiology practice system.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT