Comp111 - Operating Systems

Quiz 2 - Nov 25, 2013 - closed book



Closed book and notes. No electronic devices allowed. Please fill in the blanks. Each blank is worth 5 points. Blanks with the same number have the same answer.

  1. If 20 people per hour arrive at a restaurant, and the same number of people leave every hour on average, and we observe that people stay an average of 2 hours, then there are ____40____ people on average inside the restaurant. This is only true because the system is in ____balance/steady state____ and because all values are ____averages____. If -- in addition -- there are always an average of 5 people waiting in line to be seated inside the restaurant , then the wait for seating is an average of ____1/4____ hour(s).

    For (1), λ=20/hour, W=2 hours, and the number of people in the restaurant is L=λW = 40. For (4), λ=20/hour and L=5, so W=L/λ=5/20 = 1/4 hour.

  2. Inside an operating system, names are for human use and most entities are identified by ____numbers____; thus it is convenient to store many kinds of internal entity descriptors in ____arrays____.
  3. A scheduler is called ____fair____ if every process in the run queue receives the same amount of time. In O(1) scheduling, every process gets one time slice per ____epoch____. This is not considered ____fair____ because it does not compensate for time a process spends ____waiting/sleeping____ for other events. The ____completely fair____ scheduler gives such processes extra time.
  4. The buddy system guarantees that if one frees and then reallocates the same amount of storage, one will always get the ____same____ memory back. This is because the freed block is linked at the ____head/beginning____ of the appropriate free list.
  5. If several processes have the same file open, they all share the same ____kernel____ descriptor for the file. If every process used a different one to write to the same file, then output could potentially be ____lost/overwritten____.
  6. From the point of view of a process, memory fragmentation of the frame table is called ____external____ fragmentation, while fragmentation due to malloc is called ____internal____ fragmentation. From the operating system's point of view, fragmentation of the frame table is ____internal____.
  7. Modern memory addressing uses ____hashing____ to represent sparse maps, and ____caching____ to represent dense maps. Segments are utilized to decrease the amount of information one must store about each memory ____frame/page____.
  8. (Extra credit) Determining whether to execute a process is called ____admission____ control.