Quiz #2

Question 1   True / False (1 points)
  Question: Interrupt-driven I/O requires the active intervention of the processor to transfer data between memory and an I/O module.
 
    True
False
 

Question 2   True / False (1 points)
  Question: An I/O device that uses DMA I/O has no need to interrupt the processor.
 
    True
False
 

Question 3   Multiple Choice (1 points)
  Question: The tendency of execution to involve a number of memory locations that are clustered, i.e., with addresses that are close together is termed _______.
 
    spatial locality
temporal locality
recursion
hit ratio
concurrency
 

Question 4   Multiple Answer (1 points)
  Question: Which of the following kinds of storage are volatile?
 
    registers
cache
main memory (RAM)
disk
tape
 

Question 5   Multiple Choice (1 points)
  Question: When an external device detects an event that requires the attention of the operating system, it _______.
 
    performs a system call
executes a trap instruction
waits for the processor to notice
sends an interrupt to the processor
sends a message to the operator
 

Question 6   Ordering (1 points)
  Question: What is the order of the steps in the processing of a simple interrupt, as explained by Stallings?
 
   
 
 
  CPU loads now PC value, based on interrupt
  Handler restores old PSW and PC
  CPU finishes current instruction
  Handler saves remainder of process registers
  CPU pushes PSW and PC onto stack
  Handler restores process registers
  CPU acknowledges interrupt
  Controller issues an interrupt
  Handler processes interrupt
 

Question 7   Multiple Choice (1 points)
  Question: If we were to experimentally measure the performances of memory caches of a given fixed size, with different block sizes, starting with a very small block size (one byte) and working up through very large block sizes (the whole cache as one block), we would expect to see the hit ratio
 
    first increase, then decrease
first decrease, then increase
increase steadily
decrease steadily
remain constant
 

Question 8   Multiple Answer (1 points)
  Question: Which of the following are always true of a subprogram that is reentrant?
 
    the code can be shared between concurrently executing processes
the code is not self-modifying
the code does not make use of statically allocated variables
the code is not called recursively
each activation has its own copy of local variables and parameters
the code contains a loop
 

Question 9   Multiple Answer (1 points)
  Question: Which of the following are true of processes?
 
    each executes in its own isolated region of memory
each may have one or several threads
a thread may belong to several processes
the cpu alternates execution between different processes
they cannot be interrupted by hardware devices
each has its own copy of the files it is working on
 

Question 10   Multiple Answer (1 points)
  Question: Which of the following are performed during a context switch, but not during a mode switch (e.g. a kernel call)?
 
    save context of the processor
save the PSW and PC
restore the PSW and PC
update the process control blocks of the old and new current process
move the old current process to the appropriate queue
update memory management data structures
restore the context of the processor
 

Question 11   Multiple Answer (1 points)
  Question: Which of the following can trigger execution of the Dispatcher (i.e., a process switch)?
 
    clock interrupt
I/O interrupt
memory fault
system call
trap
process termination