Question: in C++, Write a program to simulate managing files on disk. Define the disk as a one-dimensional array disk of size numOfSectors*sizeOfSector, where sizeOfSector indicates

in C++, Write a program to simulate managing files on disk. Define the disk as a one-dimensional array disk of size numOfSectors*sizeOfSector, where sizeOfSector indicates the number of characters stored in one sector. Linked list structure will be used to keep the existing file list (their names and sizes), and to mark which sector is used by which file.

protocols to implement and commands:

F: format. formats file system on the disk, by initializing all of the tables that the file system relies on.

C f l data: This will create a file named f in the file system and write l characters of data on the disk. If the data is longer than l, the file will be made longer. If the data is shorter than l, some random character will be appended to data to fill the blanks. A return code should be printed out.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!