Question: In this workshop you will be implementing a file system simulator, loosely based on the historic file system used by the CP / M system.

In this workshop you will be implementing a file system simulator, loosely based on the historic file system used
by the CP/M system.
The file system will be have the following properties:
it is a single level directory system.
the directory entry has the following format:
struct entry
{
int8_t user;
char name[9];
char extension[4];
int16_t blockcount;
int16_t block[24];
};
With the name and extension fields being C style strings. This structure is 64 bytes in size.
The disk size is 851 kbyte. (This is the 5
1
4
inch disk used by the Apple Lisa.)
The smallest unit of allocation is 512 bytes.
There are 16 files on the disk, so the directory takes up the first 2 blocks on the disk.
No control information about it needs to be stored in the directory (i.e. no . entry).
The only user is user 1
User 1 is not a valid user, and could be used to mark free directory entries.
Alongside the directory you also need a bitmap that is capable of representing all of the blocks available
on the disk, this can be a free space bitmap or an allocation bitmap, this is your choice. This structure is
not stored on the disk but would be computed by the operating system when the disk was inserted. Your
bitmap will need to track the directory blocks, so they are not allocated to another file.
You are not supposed to implement the actual storage, only the control structures of the file system. When
implementing the free bitmap you must use a bitmap, i.e. it should be an array, but each element of the array
should represent several blocks.

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!