Comp111 - Quiz 1

Oct 7, 2015 - closed book



Please fill in the blanks. Each blank is worth 5 points. Blanks with the same number have the same answer.

  1. In ________1________ scheduling, the goal is to allot equal amounts of time to all runnable processes, while in ________2________ scheduling, the goal is to accomplish as much computation as possible. In ________3________ scheduling, the goal is to respond to external events as quickly as possible.
  2. The ________4_______ system call creates an exact copy of a process, that differs only in the ________5_______ of ________4________. The execl system call runs a new process; it erases current ________6________ but preserves ________7________ and open ________8________. After a child process ends, the parent can call ________9________ to reap the exit code from the process. This can be done in response to the signal ________10________.
  3. More generally, a process communicates with the operating system via system calls, that in turn communicate with device ________11________ when necessary. These, in turn, manage device ________12________. When a device needs attention from a process, it sends a ________13________ to the process.
  4. Processes can communicate via ________14________ that are essentially first-in, first-out character queues. These are ________15________ when a process duplicates itself, and one can use the ________16________ system call to remap the standard input and output for the process. To do formatted I/O, one can use ________17________ to obtain a file pointer from each file descriptor. A common danger in using file pointers is to forget to ________18________ a file pointer, leading to output never being sent. This is not a problem for file descriptors, because writes to them are not ________19________.
  5. The state code ________20________ in status corresponds to "uninterruptable" wait, which is different than sleeping only because the scheduler is not permitted to stop it.
  6. (Extra Credit) When the operating system doesn't want to know about a type for any reason, it declares variables of that type as ________21________ in system calls.