Comp111 - Quiz 1

Oct 4, 2017 - closed book

Name:________________________________

Login:______________

Please fill in the blanks. Each blank is worth 5 points. There are several reasonable answers for some of the blanks; choose one. Blanks with the same number have the same answer.

  1. The operating system sends ________1________ to processes to inform them of state changes. To send one of these, a process can use the ________2________ system call.
  2. When measuring the time for a process, ________3________ time is the time spent inside the process, while ________4________ time is time spent inside the operating system on behalf of the process.
  3. When creating a child process, the only difference between the parent and the child is the return value of ________5________. When a child exits, it returns a(n) ________6________ to the parent. If the parent does not read this, the child becomes a(n) ________7________.
  4. Signal handlers can be called at any time, so that they utilize a different ________8________ to avoid confusion. This allows signals to interrupt ________9________ as well as the regular program. This is called "signal stacking".
  5. Calling dup on a file descriptor makes a copy of it in the ________10________ that is not open.
  6. A pipe is a(n) ________11________ represented by an array of two file ________12________, one for the write side and one for the read side.
  7. The point of write buffering is to minimize ________13_________ according to one of three buffering strategies. For example, ________14________ buffering calls a system call only when the user types ________15________. One can force a system call by ________16________ the buffer. If one exec's another program before doing this, pending output is ________17________.
  8. The reason we pass so many pointers to system calls as type _______18________ is that the operating system has no reason to know the real type.
  9. To glue the output of process one to the input of process two, one opens a pipe and dups its write side to the file descriptor with number ________19________ on process one, and dups its read side to the file descriptor with number ________20________ on process two.
  10. (Extra credit) The only difference between the memory maps for a thread and a process is that a thread has its own ________21________.