[5 points] the following code is used to write to a file.
Give code to detect and report an error due to executing this code.
What situation, other than errors, might the programmer need to handle as a result of this code executing?
bytesWritten = write(fd, buffer, bufferSize);
[4 points] Describe the result of seeking 1000 bytes past the end of a file and writing data. Does the program crash due to this action and is the data written lost?
[2 points] What happens if the last reference to a file removed (unlinked), while a process still has an open file descriptor referencing that file?
The File System:
[3 points] Describe the following components of the unix/linux file system.
File descriptor
Open File Table
I-node table.
[2 points] Describe and provide an illustration showing how the above portions of a file system are related.
[4 points] Two different processes have open file descriptors which point to the same entry in the open file table. What is the implication of this and how could it occur?