Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Have been working for hours on this code. Please can someone help and provide functional code for this in C++. It'll help me out a

Have been working for hours on this code. Please can someone help and provide functional code for this in C++. It'll help me out a ton to get through this. Thanks!image text in transcribed

Desczaption: You will develop and implement a small Unix-CP/M-like file system ("FS). Your file system will not be part of modern fi provide a portable" file system. an operating system, but, similar to le systems, it will run in several different operating systems to Your FS will use a file (for example .disko-), rather than a physical flash or disk to store data. You may have several disk-like files (for example: disk01, disk02) used to store data. The data stored in disk01 will be a user's programs, text files other data files, or any type of binary information. In addition to the dat.a stored, your FS will need to store other, meta-information, such as free space (blocks), directory details, and possibly other information. The FS directory is flat (one level) fixed sized, has a user name associated with each file, and has fixed sized blocks(entries) You should use fixed size blocks (similar to disk blocks) of size 512 bytes to store files and all meta-data in your disk (Your "disk" (for example disk01' is logically divided into a number of "sectors, which are fixed size blocks. Everything that is stored (persistent) is in these blocks) Your program (the FS executable) should provide the following operations: Createts #ofblocks - creates a filesystem (disk) with #ofblocks size, each 512 bytes Format fs #filenames #DABPTen tries Savefs name- save the "disk" image in a file name" Openfs name- use an existing disk image List - list files (and other meta-information) in a FS Remove name-remove named file from fs Rename oldname newname - rename a file stored in the F!S Put ExternalFile-put (store) Host OS file into the disk Get ExternalFile - get disk file, copy from "disk" to host OS file system User name - this user owns this user's files Link/Unlink - Unix style file linking Bonus: Set/Use file permissions for r/w/x, implement subdirectories, heck disk' Implement in either the "Go" or "Rust" programming language (20 to 75 point bonus Implementation: Your FS should have 4 (or more, if easier to implement) sections: A FileNameTable (FNT), an directory and attribute/block pointer table (DABPT), and the data blocks. The FNT should be of size allocated, each entry should contain a 50 char (maximum) file name and an inode pointer (index to DABPT) (blocks) The DABPT should be allocated from disk blocks, 4 entries per block, where each ent should contain a file meta-information (FileSize, last time+date (secs), pointers to data blocks), user name The Block Pointer Table has direct pointers to data blocks, and one additional pointer to another entry in the Table, if needed (for big files), these may be chained for very large files. (Similar to CP/M extents) Since disks (and some meta-information) are fixed size, many small or one large file might not fit on the "disk*. File names, file attributes and other file information stored in Fs are restrictive (for example, file creation time). Desczaption: You will develop and implement a small Unix-CP/M-like file system ("FS). Your file system will not be part of modern fi provide a portable" file system. an operating system, but, similar to le systems, it will run in several different operating systems to Your FS will use a file (for example .disko-), rather than a physical flash or disk to store data. You may have several disk-like files (for example: disk01, disk02) used to store data. The data stored in disk01 will be a user's programs, text files other data files, or any type of binary information. In addition to the dat.a stored, your FS will need to store other, meta-information, such as free space (blocks), directory details, and possibly other information. The FS directory is flat (one level) fixed sized, has a user name associated with each file, and has fixed sized blocks(entries) You should use fixed size blocks (similar to disk blocks) of size 512 bytes to store files and all meta-data in your disk (Your "disk" (for example disk01' is logically divided into a number of "sectors, which are fixed size blocks. Everything that is stored (persistent) is in these blocks) Your program (the FS executable) should provide the following operations: Createts #ofblocks - creates a filesystem (disk) with #ofblocks size, each 512 bytes Format fs #filenames #DABPTen tries Savefs name- save the "disk" image in a file name" Openfs name- use an existing disk image List - list files (and other meta-information) in a FS Remove name-remove named file from fs Rename oldname newname - rename a file stored in the F!S Put ExternalFile-put (store) Host OS file into the disk Get ExternalFile - get disk file, copy from "disk" to host OS file system User name - this user owns this user's files Link/Unlink - Unix style file linking Bonus: Set/Use file permissions for r/w/x, implement subdirectories, heck disk' Implement in either the "Go" or "Rust" programming language (20 to 75 point bonus Implementation: Your FS should have 4 (or more, if easier to implement) sections: A FileNameTable (FNT), an directory and attribute/block pointer table (DABPT), and the data blocks. The FNT should be of size allocated, each entry should contain a 50 char (maximum) file name and an inode pointer (index to DABPT) (blocks) The DABPT should be allocated from disk blocks, 4 entries per block, where each ent should contain a file meta-information (FileSize, last time+date (secs), pointers to data blocks), user name The Block Pointer Table has direct pointers to data blocks, and one additional pointer to another entry in the Table, if needed (for big files), these may be chained for very large files. (Similar to CP/M extents) Since disks (and some meta-information) are fixed size, many small or one large file might not fit on the "disk*. File names, file attributes and other file information stored in Fs are restrictive (for example, file creation time)

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

How is the optimal value of K determined?

Answered: 1 week ago

Question

3. How has Starbucks changed since its early days?

Answered: 1 week ago