Assignment 12: File System Implementation


What you will learn:

Some issues in file system design and implementation.

Statement

 Implement a file system on top of a file of 100KB called "xyzFS". (replace xyz by your login).
 You have to develop a library of following functions.
 
   - filehandler myfopen("filename");   - opens for read,write
   - int myfread (void *out, int howmanybytes, filehandler fh); --> out is expected to be preallocated
   - int  myfwrite (void *in, int howmanybytes, filehandler fh);  --> in is input buffer
   - int myfseek (int pos,  filehandler fh);    --> current pointer placed at pos
   - void myfclose (filehandler fh);

copy these 5 functions into a .h file, and develop a .c implementation of them.

Assume that there are no subdirectories.

Write a xyzFSformat.c program that creates your file system of 100KB size
and formats it.
Test your file system library by using the calls in a separate test program.

The file system stays persistent.
You should be able test this through many invocations of such test programs.

What to submit

     your format utility + your C library for the FS + 3 testfiles

Donot submit your binaries, executables. Your marks will be reduced if you do so.

Submission

Assignment no=12.
Submit your file using ~oslab/submit script as in: ~oslab/submit 12 xyzFS.c xyzFSformat.c test1.c test2.c test3.c
submit script accepts assignment no. in its first argument. Any number of files may be submitted through subsequent arguments.
You may submit any number of times before 5:00pm. Old files are overwritten in resubmission.

Deadline: 5:00pm