90.7k views
4 votes
The project must be written in C++ or Java. This project will simulate disk allocation methods The project will allow the user to choose an allocation method from among the three presented in the textbook. It will allow the user to perform disk operations on a simulated disk. Details The disk will consist of 256 blocks of 512 bytes each. The first block is for the file allocation table. The second block is a bitmap for free space management. The remaining blocks hold data for the files. Storage for the disk should be kept in an array. The disk should be its own object with a set of public methods to use it. A disk onlv knows how to read and write blocks by block number File names should be allowed up to at least 8 characters. The maximum file size should be 10 blocks. Files are assumed to be at the root level, and subdirectories are not supported. A user interface should be written to interact with the disk object and to support the menu options shown below. It is the interface that implements most of the processing, the disk is just a storage device The simulation should allow the user to choose the allocation method to use when the simulation begins, either through a menu or as a command line argument. For the chained and indexed allocations, a free block should be randomly chosen. For a contiguous allocation, choose the first contiguous set of blocks large enough for the request. The user interface should let the user do the following things

1) Display a file
2) Display the file table
3) Display the free space bitmap
4) Display a disk block
5) Copy a file from the simulation to a file on the real systenm

1 Answer

1 vote

Final answer:

The student’s project entails writing a simulation in C++ or Java to represent disk allocation methods, where the user interface allows interactions with a simulated disk adhering to certain specifications, such as size, file allocation, and methods for disk operations. The correct answer is option 3) Display the free space bitmap

Step-by-step explanation:

The student’s project involves creating a simulation for disk allocation methods using either C++ or Java. In this simulated environment, a disk consisting of 256 blocks of 512 bytes, honors the basic structure of real computer storage — with dedicated blocks for a file allocation table and a bitmap for free space management. The emphasis of the project is to write a user interface that interacts with a disk object, which handles fundamental storage operations. Additionally, this simulation must implement three disk allocation methods (chained, indexed, and contiguous) and entertain multiple user operations such as displaying files, showing the file table, depicting the free space bitmap, and copying files from the simulation to the actual file system.



For the architectural design, the disk will be modeled as an object with public methods for reading and writing data by block number. The project restricts filenames to 8 characters, with a maximum file size of 10 blocks, and assumes a single root-level directory without support for subdirectories. The user interface will provide a menu for users to engage with the simulation, displaying information and manipulating stored files. Care for the allocation of space must be taken — chained and indexed methods will select random free blocks, while the contiguous method will look for the first available set of contiguous blocks large enough to store the file.

User Matt Berkowitz
by
8.9k points