Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

How might HR technology affect the various HR functions?

Answered: 1 week ago

Question

2 The main characteristics of the market system.

Answered: 1 week ago