CS360 LAB6 Check List
		    DUE: 3-30-2023

Sample solution: ~samples/LAB6/lab6.bin, diskimage
You may download and RUN the sample solution.
Then run YOUR code on the SAME diskimage and Check YOUR outputs.

                      Check List                                       Points
                                                                     Total=100
		 
1. start up: MUSt SHOW OUTPUTS AS                                        10
------------------------------------------------------------------
dev = 3
check: superblock magic = 0xef53 OK
ninodes=1024  nblocks=4096
bmap=18  imap=19  iblk=20
creating P1 as running process
root shareCount=2
P1 running: input command line [cd|ls|pwd| show|hits|exit] : 

------------------------------------------------------------------

2. ls:  MUST SHOW OUTPUTS as                                             10
-----------------------------------------------------------------------
i_block[0] = 148
drwxr-xr-x   4   0   0  Mar 22 15:34:29 2023    1024    .	[3 2]
drwxr-xr-x   4   0   0  Mar 22 15:34:29 2023    1024    ..	[3 2]
drwxr-xr-x   3   0   0  Mar 22 15:34:29 2023    1024    dir1	[3 11]
drwxr-xr-x   3   0   0  Mar 22 15:34:29 2023    1024    dir2	[3 12]
-rw-r--r--   1   0   0  Mar 22 15:34:29 2023       0    file1	[3 15]
-rw-r--r--   1   0   0  Mar 22 15:34:29 2023       0    file2	[3 16]
-----------------------------------------------------------------------

3. show: (show contents of ./) MUST SHOW OUTPUTS as                      10 
----------------------------------------
i_block[50] = 148
   i_number rec_len name_len   name
       2      12       1        .
       2      12       2        ..
      11      12       4        dir1
      12      12       4        dir2
      15      16       5        file1
      16     960       5        file2
-----------------------------------------      

4. cd /dir1; pwd; ls: MUST SHOW OUTPUTS                                  20

--------- cd /dir1 ------------
cd to [dev ino]=[3 11]
after cd : cwd = [3 11]

----------- pwd ----------
/dir1

----------- ls ------------
i_block[0] = 162
drwxr-xr-x   3   0   0  Mar 29 08:44:54 2023    1024    .	[3 11]
drwxr-xr-x   4   0   0  Mar 29 08:44:54 2023    1024    ..	[3 2]
drwxr-xr-x   2   0   0  Mar 29 08:44:54 2023    1024    dir3	[3 13]


5. cd dir3; pwd: MUST SHOW OUTPUTS as                                    10

-------- cd dir3 ----------
cd to [dev ino]=[3 13]
after cd : cwd = [3 13]
---------------------------

--------- pwd ------------
/dir1/dir3
--------------------------

6. cd ../../; pwd:                                                       10   

   ----- cd ../../ ------
   after cd : cwd = [3 2]
   
   ----- pwd ------------
   /
   ----------------------

7. cd file1: MUST show: file1 NOT a directory                            10


8. hits: MUST SHOW cacheList and hit_ratio:                              10
   Format of each minode is c#[dev ino]s# = cacheCount[dev ino]shareCount

cacheList=c1[3 12]s0->c1[3 16]s0->c2[3 15]s0->c2[3 13]s0->c6[3 11]s0->c10[3 2]s2->NULL
requests=22 hits=16 hit_ratio=72%
	 
===========================================================================
                                                                
		 QUESTIONS to ask students:                             10 

1. Given: INODEs start block number on disk = 20;
          an INODE with INODE number ino = 16.
		 
   Which disk block (blk) contains that INODE? blk = ______________________?

   In that disk block, which INODE is for ino=16?  _________________________?

2. What does MINODE *path2inode(char *path) do? _____________________________?