LMP1: I/O and Filesystems ========================= Welcome to LMP1, the first long MP.  LMP1 is the first stage of a project aimed at creating a simple yet functional networked filesystem.  In this MP, you will learn about and use POSIX file system calls, while subsequent LMPs will introduce memory management, messaging, and networking functionality.  If you implement all parts of this MP correctly, you will be able to reuse your code for future MPs. This first LMP concentrates on the file I/O portion of the project. Specifically, you will implement a custom filesystem and test its performance using a filesystem benchmark.  A benchmark is an application used to test the performance of some aspect of the system.  We will be using Bonnie, a real filesystem benchmark, to test various performance aspects of the filesystem we implement. LMP1 consists of four steps: 1. Read the code; run the Bonnie benchmark and the LMP1 test suite. 2. Implement Test Suite 1 functionality, encompassing basic file I/O operations. 3. Implement Test Suite 2-4 functionality (directory operations, file creation/deletion, and recursive checksumming). 4. Modify Bonnie to use your client-server file I/O methods. Code structure ————– The code for this project is structured according to the client-server model.  The client code (filesystem benchmark) will interact with the server (filesystem) only through interface functions defined in fileio.h: int file_read(char *path, int offset, void *buffer, size_t bufbytes); int file_info(char *path, void *buffer, size_t bufbytes); int file_write(char *path, int offset, void *buffer, size_t bufbytes); int file_create(char *path,char *pattern, int repeatcount); int file_remove(char *path); int dir_create(char *path); int dir_list(char *path,void *buffer, size_t bufbytes); int file_checksum(char *path); int dir_checksum(char *path); These functions represent a simple interface to our filesystem.  In Steps 2 and 3 of this MP, you will write the code for functions implementing this interface, replacing the stub code in fileio.c.  In Step 4, you will modify a Bonnie method to use this interface, rather than calling the normal POSIX I/O functions directly.  The purpose of Step 4 is to help test our implementation. Step 1: Understanding the code —————————— 1. Compile the project, execute Bonnie and the test framework. Note: you may need to add execute permissions to the .sh files using the command “chmod +x *.sh”. Try the following: make ./lmp1 (this runs the Bonnie benchmark – it may take a little while) ./lmp1 -test suite1 (run Test Suite 1 – this has to work for stage1) make test (run all tests – this has to work for stage2) 2. Read through the provided .c and .h files and understand how this project is organized: bonnie.c – a version of the filesystem benchmark fileio.c – file I/O functions to be implemented fileio.h – declaration of file I/O functions restart.c – restart library (available for use in fileio.c) restart.h – declaration of restart library functions util.c – useful utility functions util.h – declaration of useful utility functions and macros In particular, pay close attention to the comments in fileio.h and bonnieb.c.  You should understand what each of the following functions in bonnie.c does before undertaking the remainder of the MP: fill_file_char() file_read_rewrite() file_read_rewrite_block() fill_file_block() fill_read_getc() file_read_chunk() newfile() Step 2: Basic I/O operations —————————- Implement file_read, file_write and file_info operations in fileio.c. If done correctly, your code should pass all suite1 tests: ./lmp1 -test suite1 Running tests… 1.read                ::pass 2.info                ::pass 3.write               ::pass Test Results:3 tests,3 passed,0 failed. IMPORTANT: fileio.c is the only file you should modify for this step. Step 3: More filesystem operations ———————————- Implement file and direct…

Looking for solution of this Assignment?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay