Question: 1 . This assignment is a pair programming effort. It is due on 4 / 2 6 / 2 0 2 4 . Use only

1. This assignment is a pair programming effort. It is due on 4/26/2024. Use only xv6-riscv.
2. Purpose: Add extent-based files to the xv6 file system. An extent is a (pointer, length) pair. The pointer points to a sector address; the length indicates how many consecutive blocks are occupied by that extent. Operations on large extent-based files are faster than the pointer-based files that xv6 have now.
3. Requirements:
1)(10%) Add an O_EXTENT flag to the open() system call that will create an extent based file.
2)(10%) Modify the fstat() system call such that it will dump information about each extent of an extent based file in addition to file size, etc.
3)(15%) Add the new system call lseek() which takes a file descriptor and an integer offset as arguments. It sets the current offset of the open file to the specified offset upon success. lseek() can fail. You will specify its error return interface. Application programs can use this to read or write arbitrary locations within a file. Your lseek() should work with both extend-based and pointer-based files.
You will need to modify the data block allocation and deallocation function bmap() in the file system. Describe and discuss your block allocation and deallocation methods.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!