CS360 Final Project Demo Instructions

DATE and TIME: 4-26-2023 and 4-27-2023; Time as posted by TAs

1. Organize YOUR source code to contain the following files: NO EXCEPTIONs!!! level-1: type.h, util.c (as posted) main.c : initilization, mountroot, command processing loop alloc_dealloc.c: ialloc/idealloc, balloc/bdealloc functions cd_ls_pwd.c : ls, cd, pwd mkdir_creat.c : mkdir, creat, enter_name rmdir.c : rmdir, rm_child link_unlink.c : link, unlink symlink.c : symlink, readlink OTHERs if you have level-2: open_close.c : open, close, lseek, pfd read.c : read (with I and D blocks AND optimization) write.c : write (with I and D blocks AND optimization) cat_cp.c : cat, cp head_tail.c : head, tail Submit a NAMEs.zip file to TA BEFORE the DEMO time, where NAMEs are LASTnames of all team members, e.g. logan-west.zip

WARNING: academic honesty: absolutely NO COPYING !!!

If you got source code from somewhere, you must acknowledge it by citing the source.

Interview with KCW via ZOOM immediately following YOUR demo with TA

In order to speed up the interview, please be ready to show your code:

LEVEL-2: open : your open file code read : Indirect and Double Indirect data blocks; optimization code write: Indirect and Double Indirect data blocks; optimization code head : your code and algorithm tail : your code and algorithm All team members must be present during interview with KCW. Prepare yourself for the interview by trying to EXPLAIN how did your code open file for R of W how did you handle I, D blocks in read(), write() how did you do tail filename?

NOTE: TO explain is NOT to read your code line by line !!!!!

EXAMPLE: open file for WRITE: get file's INODE into memory: HOW ?_________________________ what if file does NOT exist? _____________________________ What if file exists and have data blocks?__________________ allocate an OFT; record open mode, MINODE pointer, offset find smallest NULL fd[index] and let it point at OFT return index as opened file descriptor If KCW wants more detail, he will ask further questions. 3. Download ALL files from samples/PROJECT/ Yout MUST use the diskimage disk2 in your DEMO. You may veiw the contents of disk2 by show disk2 4. TO save DEMO time, run you project as a.out disk2 5. Download disk2, diff2, head_tail from samples/PROJECT directory 5. DEMO RECORD: Copy/Paste the following DEMO record as a .txt file. Fill in your names and IDs. return it to TA before 4-26-2023 This will be YOUR DEMO record. NAME________________ ID________________ NAME_______________ ID______________ LEVEL-2: Use disk2: (file1, tiny, small, large, huge) TA COMMENTS ------------------ --------------------------- ----------------------- cat large show file contents ________________________10 cat huge show file contents ________________________10 head small show FIRST 10 lines of file ________________________10 tail small show LAST 10 lines of file ________________________10 cp large newlarge; ls show they are SAME size ________________________10 cp huge newhuge ; ls show they are SAME size ________________________20 cp large newlarge MUST truncate newlarge first _________________________ 5 ------------------------------------------------------------------------------ MUST DO THIS: exit YOUR project (In Linux): diff2 MUST not show any lines __________________________20 (in Linux): head_tail MUST be same as YOURs ___________________________5 ============ DONE if you can do the above ============================ Total 100 ============ IF can not do cat, cp: TRY to do these for LEVEL2 =============== open small 0; pfd show fd=0 opened for R ________________________10 read 0 20; pfd show 20 chars read ________________________10 open file1 1; pfd show fd=1 opened for W ________________________10 write 1 "abcde"; ls show file1 size=5 ________________________10 close 1; pfd show fd=1 is closed ________________________10 Total 50 ============================================================================== sample solution: samples/PROJECT/l2.bin, disk2, diff2, head_tail, show samples/PROJECT/outfile is recorded outputs of running the commands ls head small tail small cp large newlarge; ls cp huge newhuge; ls cp large newlarge; ls (to show deallocate blocks by truncate()) exit ------ back to Linux --------- (Linux) diff2 (Linux) head_tail ------------------------------