Question: 1 . This assignment is a pair programming effort. It is due on 4 / 2 6 / 2 0 2 4 . Use only
This assignment is a pair programming effort. It is due on Use only xvriscv.
Purpose: Add extentbased files to the xv 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 extentbased files are faster than the pointerbased files that xv have now.
Requirements:
Add an OEXTENT flag to the open system call that will create an extent based file.
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.
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 extendbased and pointerbased 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
