Computer Science 284
Introduction to Operating Systems
Fall Semester 2001
Question Pool for Exam 3

CONSTANTS IN THESE QUESTIONS MAY CHANGE ON THE EXAM

NO CALCULATORS ALLOWED

UP TO 25% OF THE EXAM MAY BE TAKEN FROM QUESTIONS ON QUESTION POOLS #1 & #2

  1. ASSUME:   (the inodes and their content may change on the actual exam)
    that your home directory is root and has associated inode 2.
       that your current directory is your home directory and that it contains
              a data file named your_data
              an executable named a.out
              a subdirectory name sub_dir

  2. Draw a picture starting with inode 2.  Indicate where the content of each file would be.  Where would the executable flag for a.out be?
    (Assume that inode numbers are assigned sequentially) Your picture should include the inode_table, the individual inodes and pointers
    to the actual data.

    Part 2:    Assume that you
    cd sub_dir.
         Using a hard link,

  3. make new_data in the currect directory an alias for the previous your_data
  4. Draw a picture of what now exists

    Part 3:
    mkdir DIR3
       cd DIR3
       code a soft link command that will
              show how to create an entry in DIR3 named PROGRAM which is linked to a.out in the root ln _______________________

  5. Draw a picture of what now exists
  6. List the major items that are stored in a file's inode.

    Given:
    a blocksize of k/2,
       a file-pointer size of 4 (The blocksize and pointer size may change for the exam).

  7. What is the theoretical maximum size of a unix file.  Express the answer in terms of KB, MB, GB.  Do NOT convert the final answer to base 10.
  8. What is the important different between NT  threads and Solaris user threads?  An NT thread is most like ___________ in Solaris.
  9. NT's virtual addresses are treated as 3 parts.  Make a small drawing of those with labels and simple descriptions.
  10. What in NT roughly corresponds to the Unix inode table.
  11. NTFS files have an 'unnamed attribute data stream'.  What is it or what function does it serve?
  12. What does the following open refer to in NTFS?  open("MyFile:backup", ios::output | ios::create);
  13. Early NT implementations placed the I/O Manager in the User Address Space. What motivated M.S. to put it there? What problem was created by having it there?
  14. What do the letters JCL stand for?
  15. What does //  EXEC PGM=ABCDEF           communicate to the OS

    Given:   //name1 DD DSNAME=name2,DSORG=IS,
                //        (LRECL=100,BLKSIZE=800,RECFM=F),DISP=(OLD,KEEP,DELETE)

  16. What does name2  refer to?
  17. What information is RECFM trying to communicate to the OS
  18. What information is DISP trying to communicate to the OS
  19. What information is LRECL trying to communicate to the OS
  20. What information is BLKSIZE trying to communicate to the OS
  21. Why are there so many files with a record length = 80?
  22. What is the difference between an OS that views a file as a STREAM vs. viewing it as a collection of RECORDS?
  23. Describe what the command grep "int X;" dir/subdir/* would do.
  24. Describe what the command awk '/^ABC/ {print $2, $1}; /XYZ/ {print $0}' would do.
  25. Describe what cat somefile | sort +0.1 -0.4 +4 > report would do.