CA170 - Introduction to Operating Systems

Answer all multiple-choice questions. 1 mark each. There is no negative marking.

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







  2. When a program is started:







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







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









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









  6. What is wrong with this command?
    wget -O - https://biscuits.com/biscuit.jpg








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









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









  9. 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?








  10. Compile-time binding works only on a:






  11. As a result of the "unused RAM is wasted RAM" idea, we may:








  12. In my Shakespeare directory, you want to count on how many lines the string "King" appears in Shakespeare. Which of the following will answer that question?










  13. What will this Shell script do?

    for i in *
    do
    rm i
    done








  14. One of these is true.









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







  16. If we have to remove a page from memory, what do we do?








  17. A user tries to start a program on a single-user, multiple-process system. Why is it not practical for the OS to say to the user: "I'm sorry, another program is occupying memory space 7000-8000. Please terminate the other program before running your program"






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







  19. The commands "cd" followed by "cd public_html" followed by "mkdir ../stuff" make a directory called:








  20. What is this script doing?

    grep string file > /dev/null
    if test "$?" = "0"
    then
    ...






  21. Only one of the following makes any kind of sense as a possible permission field for a UNIX file. Which one?







  22. Typing the command man man > man does what?








  23. What will this shell script do?

    ls$1







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






  25. We are searching for text in chapters of a book, called names like chap17.html. One of these is definitely not right: