Operating Systems Concepts: A Quiz

  1. What is the main function of timer interrupts?

    • They notify the system a given time interval has elapsed since the timer was set.
  2. Delaying disk–or SSD–writes:

    • May result in lost data if the system crashes.
  3. Accessing the disk drive of your computer is approximately:

    • 100,000 times slower than accessing its main memory.
  4. Which hardware mechanism allows a device to notify the CPU of an event?

    • Interrupts
  5. Memory protection is normally done through privileged instructions.

    • False
  6. A computer not having privileged instructions cannot prevent its users from tampering, accidentally or otherwise, with its file system.

    • True
  7. Real-time applications with “soft deadlines” have fuzzy deadlines.

    • False
  8. In a “symmetric” multiprocessor organization, there can be several copies of the kernel running at the same time.

    • True
  9. What is the main disadvantage of “modular kernels” compared to other kernel organizations?

    • They are less reliable.
  10. The kernels of virtual machines typically operate in “privileged mode”.

    • False
  11. Consider a process:
    The three states it will visit are:

    • Running, Blocked, Ready
  12. Which processes should we suspend first when we need to make space in main memory?

    • Blocked
  13. How many lines will the following program print out?

    • 2
  14. What happens when a UNIX process issues a wait() system call and all its child processes have already terminated?

    • It continues its execution without further delay.
  15. Which LINUX system call sends a signal to another process?

    • kill()
  16. What is the “default action” a LINUX process takes when it receives a signal from another process?

    • It terminates.
  17. What are the two major disadvantages of user
    Level threads over kernel-supported threads?

    • They can only run on a single core.
    • Each time a thread does a blocking system call, the kernel will move the whole process to the blocked state.
  18. Which of the following statements apply to the “program.Cs.Uh.Edu” server?

    • Both A and B. (It is an interactive system and a time-sharing system.)
  19. Which of these events can move a process from the “running” state to the “ready” state?

    • Both A and B. (The arrival in the ready state of a higher-priority process and a timer interrupt.)
  20. In a “vectorized interrupt” system, an interrupt can only be interrupted by an interrupt of “higher priority”.

    • True
  21. What is the major reason for the success of “modular kernels”?

    • They let users add extensions to the kernel.
  22. How many lines will the following program print?

    • 3
  23. Which of the following statements about the “fork()” system call is FALSE?

    • fork() returns zero in the parents process.
  24. Each process has its own “process control block”

    • True
  25. In which queue is a newly created process initially put?

    • Ready queue
  26. The “execv()” system call creates a new process.

    • False
  27. A process in the “blocked state” can only move from that state to the:

    • Ready state.
  28. Which of the following operating systems is NOT derived from UNIX?

    • Windows
  29. A program in execution is called:

    • A process
  30. The first computer system with a graphical user interface was:

    • Alto from Xerox PARC.
  31. What characterizes a time-sharing system?

    • It lets multiple users access the computer at the same time.
  32. Direct memory access (DMA):

    • Allows the disk controller to access the main memory without any CPU intervention.
  33. Some “soft real-time” systems do NOT have fixed deadlines.

    • False
  34. What is the main advantage of modular kernels?

    • They let users add extensions to the kernel.
  35. How many lines will the following program print?

    • 2
  36. In a modern computer system, most small read operations can be completed WITHOUT any disk access.

    • True
  37. You notice that the kernel of your operating system starts suspending too many processes. What can you infer from that?

    • Your computer does not have enough RAM.
  38. What is the main advantage of copy-on-write (COW)?

    • It reduces the cost of the fork() system call.
  39. What does the signal() system call do?

    • It specifies what a process will do when it receives a signal.
  40. How do user-level threads handle blocking system calls?

    • All the threads of the task are moved to the blocked state.
  41. A process in the READY state can only move from that state to the:

    • RUNNING state
  42. What are zombie processes?

    • Terminated processes that have not been waited on by their parent.
  43. How is memory protection typically implemented?

    • Through the memory management unit of the computer.
  44. How do kernel-supported threads handle blocking system calls?

    • The thread issuing the call is moved to the blocked state.
  45. In a dual-mode CPU, how can the CPU switch from user mode to privileged mode?

    • Through the interrupt mechanism.
  46. What would be the main drawback of a system lacking timer interrupts?

    • It would let CPU-bound processes occupy cores for as long as they can.
  47. What came first?

    • Batch systems
  48. What is the main disadvantage of the flash drive?

    • They wear down after a limited number of write cycles.
  49. What is the main advantage of delayed writes?

    • They reduce the number of physical disk accesses.
  50. What is the main reason for having privileged instructions?

    • To prevent user processes from directly accessing the system storage units.
  51. Soft real-time systems do NOT have hard deadlines.

    • False
  52. In which mode does a kernel of a virtual machine run?

    • User mode.
  53. In which state does a process go when it waits for the completion of a system request?

    • BLOCKED state.
  54. What happens when a process is swapped out?

    • The process is expelled from main memory and a copy of its address space is saved on disk SSD.
  55. How many lines will the following program print?

    • 3
  56. Consider the argument vector corresponding to the shell command: $ ls 3360. What is the sole possible values for argv[0]?

    • ls
  57. Why are lightweight processes much cheaper to create than regular processes?

    • Because we do not have to create a new address space for the new process.
  58. In which language is most of the LINUX kernel written?

    • C
  59. Why is memory protection always implemented in hardware?

    • Because it is the only way to make it fast enough
  60. What happens when the kernel of a virtual machine attempts to execute a privileged instruction?

    • The attempt will be trapped and the hypervisor will take control of the system.
  61. Why is Linux an ideal platform for system research?

    • Because it is free and its source code is available.
  62. Which are the only entities UNIX/Linux processes share with their parent?

    • The file descriptors of all opened files.
  63. Why is the kill() system call called that way?

    • Because it terminates the process it was sent to (unless that process can catch it).
  64. What is the main disadvantage of CPUs not having a privileged mode?

    • Because it allows all processes to execute all instructions, including those that access their secondary store.
  65. What is the main advantage of using copy-on-write in fork() system calls?

    • Reduces the cost of the fork() call by minimizing the number of pages needed to be copied.
  66. What is the main feature of signal number 9 (SIGKILL)?

    • It always terminates the process that it is sent to as it cannot be caught.
  67. How many lines will the following program print?

    • 6
  68. Consider the argument vector that your UNIX/Linux shell will pass to ls when you type: $ vim Assignment1.Cpp. What are the respective values of: – argv[0] – argv[2]

    • “vim” NULL
  69. Processes that request a blocking system call go to the __________________ state.

    • BLOCKED
  70. After that request is completed, they return to the ___________________ state.

    • READY
  71. What is the main advantage of all lightweight processes over regular processes?

    • They have a much lower creation overhead as regular processes because they share the address space of their parent.
  72. How many lines will the following program print?

    • 8
  73. Consider the argument vector that your UNIX/Linux shell will pass to ls when you type: $ ls -alg Assignment1. What are the respective values of: – argv[0] – argv[3]

    • “ls” NULL
  74. Processes that have exceeded their time slice of CPU time must leave the ___________ state and return to the ___________ state.

    • RUNNING READY
  75. What should the OS do then there is not enough free memory?

    • Start swapping processes
  76. Which processes are the best candidates for swapping out processes?

    • BLOCKED processes and very low priority processes
  77. What should the CPU do when it detects an interrupt?

    • The CPU should save its current state and fetch a new state
  78. What would happen to a computer system lacking a DMA controller?

    • The data transfer between its secondary store and its main memory would be much slower
  79. What is the main reason for the lack of layered kernels?

    • It is very difficult to partition a kernel into hierarchical layers
  80. The Windows OS is:

    • Fast, extensive, but not as reliable
  81. What will happen when the kernel of a virtual machine attempts to execute a privileged instruction?

    • An interrupt will occur and the VM hypervisor will take take control, which will allow it to perform the physical equivalent of the action attempted by the VM kernel
  82. When a process issues an I/O request, it goes from the ________________ state to the ___________________ state.

    • RUNNING BLOCKED
  83. Add the three system calls that will ensure that the program will print EXACTLY ONCE, “Hello World!” and “Goodbye!” in that order.

    • fork() _exit(0) wait(0)
  84. In the round-robin scheduling policy, the priority of a process is a function of its past CPU storage.

    • False
  85. In a typical multi-level scheduler, the CPU-bound processes will be assigned:

    • Low priority, large time slice
  86. Why do most operating systems keep in memory all the file blocks that were recently accessed?

    • Because these blocks are likely to be accessed again in the near future
  87. What is the main advantage of the symmetric organization for multiprocessor operating systems?

    • Kernel calls are much less likely to create a bottleneck, as the kernel can now run in parallel on every processor
  88. In virtual machine setup, the kernels of the virtual machines run in _____________________ mode while the kernel of the host OS/hypervisor runs in _____________________ mode.

    • USER PRIVILEGED