CS 33211 Operating Systems Project #3 Due via e-mail by 11:59 on Wednesday, April 25th IMPLEMENTING INDEXED FILE SYSTEM Write a program that implements a rudimentary 2-level indexed file system. Your program should create a file named DISK and simulate disk operations on this file. The disk blocks are to be exactly 10 bytes. The disk has a single track (all blocks are stored sequentially). The track size is 500 blocks. In communication with the disk you should use random access read and write functions. Check the corresponding man-pages for their operation. man -S 3p write The only allowed block size that you can read from or write to the disk is 10 bytes. Your filesystem is to have a single unnamed file. Its i-node will be stored in the first block of the disk. The i-node has two types of information. In the first byte - file size is stored. The remaining bytes are used to store references (block numbers) to the blocks where file data is stored. Use byte-size integers to store block numbers. Notice that the i-node can store 10 references. The first eight references are directly to the data blocks. The last reference is to the single indirect index block. This index block should contain additional 10 references to data blocks. If the block is not allocated it should contain 0. Notice that a block can be partially filled and the program should use the file size to determine where the file data ends. Your program should be able to accept information from the standard input and write to the simulated file. The input is accepted until keyword ENDFILE is entered. All the information should be written to the file except the keyword ENDFILE. The program should handle files that are too large gracefully (print an error and quit). After writing the file your program should print to standard output the contents of your disk in human-readable format (do not print in hexadecimal or other formats that are hard to understand). Then the program should read the file data back and print it to standard output. You are not allowed to store the data in your program between writing to the disk and reading it back. Submitting Your Project and Grading You have to submit your project to the teaching assistant by e-mail. She will acknowledge the receipt of your project within a day. Send her only the source files. You can send them either as tar-achieves or as attachments. The programming project is worth 50 points. Late projects are accepted. Late policies are outlined in the syllabus. The grading will be such that the working program submitted a few days late will receive a higher grade that the program that does not work but is submitted. If your program still does not work, submit a text file specifying how the program fails (does not compile, fails test examples, etc.), what you think the reason is and how it can be fixed. You may be given partial credit.