CSCI 350 Fall 2001 Quiz 4

Statistics:

mean     37.357 (523.000/14)
stddev   9.013
median   39.500
midrange 32.000-44.000

#   avg
1	7.57 / 8
2	7.14 / 9
3	6.57 / 8
4	6    / 9
5	4.43 / 8
6	5.64 / 8

  1. [8 pts] Give an example of a situation where the execve() system call might return with an error code.

    I'll give you several situations.

  2. [9 pts] In serious operating systems, user processes run on the CPU with restricted permissions: Their access to memory and I/O devices is severely limited. And of course they can't willy-nilly gain unrestricted permissions --- that would be a gaping security hole.

    But sometimes a process nonetheless needs to access an I/O device (like the disk), even though it cannot access it directly. What CPU feature allows it to accomplish this?

    A software interrupt puts the system into unrestricted mode. It also jumps the CPU into operating system code, so that the operating system can govern access to the device.

  3. [8 pts] Give a reason why modern operating systems use segments in memory allocation.

    Three reasons are good answers.

  4. [9 pts] Name three specific pieces of data found in a typical page table entry.

  5. [8 pts] In class we saw that a straightforward implementation of paging would require two memory accesses every time the CPU wants to fetch something from memory --- effectively halving memory efficiency. We also talked about a way of making this more time-efficient. What was it? (Either the exact term or its definition would do.)

    The TLB (transition lookaside buffer) caches page table entries on the CPU itself, permitting quick parallel lookup of the entries that it can fit into the TLB.

  6. [8 pts] Give a reason why an OS might keep track of a process's working set.