Today's test

IP restricted. You may not submit from outside the lab exam machines.

Submission is closed



CA170 (CSC1011) - Introduction to Operating Systems


Name
Student number
Linux userid (e.g. jim.smith2)
Email

  

Multiple choice

Answer all multiple-choice questions. Identical marks each. There is no negative marking.

  1. Which of the following is an unusual permission field for a UNIX file:







  2. One of the following file protections will break your web page:









  3. On Linux, when you type a normal command, it should be in the PATH to run. Yet when you run ps -f you see a program running that is not in the PATH. How can this happen?








  4. The user's program has started. The OS needs to change what memory locations things map to, but binding is done at load-time. Why is it not practical for the OS to say to the user: "Please reload your program so I can re-do the binding":






  5. When you type a program with a file wildcard as argument like: prog *html the Linux shell expands the wildcard and passes the result to the program. Why does it not just pass "*html" to the program?








  6. You write a simple program in the interpreted UNIX scripting language Shell. You then want to run the program on a different type of machine (different chip, but still running UNIX). Which is normally true:






  7. When we run multiple programs at the same time, we need:







  8. What will this Shell script do?

    for i in $*
    do
    rm i
    done








  9. On a multi-user system, when one user's program divides by zero:






  10. Swapping a process or part of a process to disk works with:






  11. On a multi-user system, when one user's program goes into an infinite loop:






  12. What command will search all your files for lines containing start of line, then any number of spaces, then the string "born"?









  13. One of these is true.









  14. What will this Shell script do?

    for i in *
    do
    rm i
    done








  15. I am in the directory   /stuff/and/things   and I type:   cd ../../../more/things   - What directory am I in now?







  16. Linux dominates supercomputers and other specialist computer niches because:









  17. In a modern OS, one of these is false:









  18. This character should be avoided in Unix filenames:







  19. The relationship of Paging to Swapping is:








  20. This program:
    // define a function:
    function f() { f(); } // function calls itself
    // start the program:
    f();







  21. With compile-time binding, the memory locations used can be changed if the program is re-compiled. Why does the OS not do this?






  22. If a program is not in the directories listed in the "PATH" environment variable:









  23. This command:
    sed -e 's|<|\&lt;|g'







  24. On a Linux filesystem, block size is 1 k. If you type: echo 1 > file the space allocated for the file is:










  25. Which of the following does not take you to your home directory?