Computer Science 4630

Spring 2000

Quiz 1’

 

Circle the letter of the best answer to each question.

 

  1. Which of the following instructions would need to be privileged on a dual mode processor?

(a)  Switch from privileged mode to user mode.

(b)  Switch from user mode to privileged mode.

(c)  Perform a trap.

(d)  Read the system clock.

 

  1. Caching is a method of

(a)  making a memory device appear to be faster than it really is.

(b)  making a memory device appear to have a larger capacity than it really has.

(c)  physically speeding up a memory device.

(d)  physically increasing the capacity of a memory device.

 

  1. When an operating system is designed in layers,

(a)  each layer can only use facilities defined in that layer.

(b)  each layer can only use facilities defined in that layer or higher layers.

(c)  each layer can only use facilities defined in that layer or lower layers.

(d)  each layer can use facilities defined in any other layer.

 

  1. A hardware feature that is required for the implementation of preemptive multiprogramming is

(a)  a virtual memory controller.

(b)  a clock that generates an interrupt.

(c)  interrupt driven input and output.

(d)  none; all that is needed is cooperation from the programs that the system runs.

 

  1. Which of the following does NOT happen when an interrupt occurs?

(a)  The processor switches to privileged mode.

(b)  The processor’s registers are saved so that they can be restored later.

(c)  The processor jumps to an address that is found in the interrupt vector.

(d)  The processor resets the automatic timer to a standard value.

 

  1. When a command interpreter is asked to run a program that is found in an executable file, it

(a)  does a forks and then an exec in the child process.

(b)  does an exec without the need for a fork.

(c)  does a fork without the need for an exec.

(d)  does neither a fork nor an exec.

  1. Which of the following is NOT a mechanism to allow two processes or threads to communicate with one another?

(a)  The execv system call.

(b)  Shared memory.

(c)  Remote procedure call.

(d)  Rendezvous.

 

  1. Which of the following would be LEAST likely to support multiprogramming?

(a)  A time-sharing operating system.

(b)  A batch operating system.

(c)  A real-time operating system.

(d)  A distributed operating system.

 

  1. Two threads that are part of the same process

(a)  share the same run-time stack.

(b)  cannot both be in the ready queue at the same time.

(c)  always switch back and forth using cooperative multiprogramming.

(d)  can communicate through shared memory.

 

 

  1. An important reason that modern operating systems support threads is that

(a)  threads are much easier to use than processes.

(b)  once created, threads run much faster than processes.

(c)  threads are cheaper to create than processes.

(d)  threads are required for interprocess communication.

 

  1. When a single-threaded process performs an input/output request, it

(a)  is moved to the ready queue, and periodically asks the input/output device whether the device is finished.

(b)  is moved to the ready queue, and has its priority decreased.

(c)  is allowed to keep running until it has used up its entire time slice.

(d)  is put on a wait queue, and does not perform any processing until the request is satisfied.

 

  1. Which of the following would  be LEAST likely to be part of an operating system’s kernel?

(a)  Process management.

(b)  Memory management.

(c)  A command interpreter.

(d)  Disk management.

 

  1. The fork system call is used to

(a)  make the current process run a different program.

(b)  create a new process.

(c)  create a new thread within the currently running process.

(d)  yield the CPU to another process.