Computer Science 4630

Summer 2001

Answers to Practice Quiz 1

 

Circle the letter of the best answer to each question. Correct answers are in blue.

 

 

1. An operating system is designed in layers

     (a) to make it more efficient.

     (b) to make it smaller.

     (c) to make it easier to write.

     (d) to make it possible to handle interrupts.

 

2. An operating system that uses cooperative multiprogramming cannot protect

     (a) the memory resource.

     (b) the CPU resource.

     (c) the disk resource.

     (d) the printer resource.

 

3. A system call is typically made by

     (a) writing a value into kernel memory.

     (b) performing an I/O interrupt.

     (c) performing a direct disk I/O operation.

     (d) performing a trap.

 

4. A processor that supports multiple modes

     (a) supports two different instruction sets.

     (b) distinguishes between privileged and user mode instructions.

     (c) can run at two different speeds.

     (d) supports interrupts.

 

5. Which of the following is NOT a mechanism for allowing two processes to communicate with one another?

     (a) remote procedure call.

     (b) message passing.

     (c) context switching.

     (d) shared memory.

 

6. 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.

 


7. 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.

 

8. 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.

 

9. 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.

 

10. A command interpreter

(a)   typically gets its power from running programs that are not built into the command     interpreter.

(b)  has most of the commands that it can perform built into it.

(c)   can typically only perform a small subset of the services that the operating system provides.

(d)  is usually part of an operating system’s kernel.

 

11.Which of the following do two threads that are part of the same process NOT share?

(a)   program memory.

(b)  open files.

(c)   process number.

(d)  run-time stack.

 

12. The fork system call is used to

(a)   create a new thread within a process that runs the same program as the running thread.

(b)  create a new thread within a process that runs a different program from the running thread.

(c)   create a new process that runs the same program as the running process.

(d)  create a new process that runs a different program from the running processs.

 


13. Process management is typically performed by

(a)   the operating system kernel.

(b)  the command interpreter.

(c)   the operating system, but above the kernel level.

(d)  an application program on its own behalf.

 

14. The execv system call is used to

(a)   create a new process.

(b)  create a new thread.

(c)   make a process run a different program.

(d)  stop a process.

 

15. When separating mechanism and policy in a layered operating system, you typically find that

(a)   mechanism and policy are implemented in the same layer of the operating system.

(b)  mechanism is implemented in a lower layer than policy.

(c)   mechanism is implemented in a higher layer than policy.

 

16. A batch operating system

(a)   runs only one task at a time.

(b)  is any operating system that supports shell scripts.

(c)   does not need to protect the CPU resource from application programs.

(d)  allows a program to be run in background to use up otherwise idle CPU time.