Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 CPM 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
intt user;
char name;
char extension;
intt blockcount;
intt block;
;
With the name and extension fields being C style strings. This structure is bytes in size.
The disk size is kbyte. This is the
inch disk used by the Apple Lisa.
The smallest unit of allocation is bytes.
There are files on the disk, so the directory takes up the first blocks on the disk.
No control information about it needs to be stored in the directory ie no entry
The only user is user
User 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, ie 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started