Computer Science 4630
Spring 2000
Practice questions for quiz 2: Answers
This is a closed book quiz. Circle the letter of the best answer to each question.
(a) First come first serve.
(b) Longest job first.
(c) Shortest job first.
(d) It doesn’t matter: they all have the same average waiting time.
(a) A situation where a process has been assigned the wrong priority.
(b) A data structure where the priority queue is stored backwards.
(c) A situation where a low priority process must wait for a high priority process.
(d) A situation where a high priority process must wait for a low priority process.
(a) The critical section problem for just two processes using busy-waiting.
(b) The critical section problem for just two processes using semaphores.
(c) The critical section problem for multiple processes using busy-waiting.
(d) The critical section problem for multiple processes using semaphores.
(a) Fetch the value of a nonshared variable.
(b) Fetch the value of a shared variable.
(c) Reduce the value of a nonshared variable by 1.
(d) Reduce the value of a shared variable by 1.
(a) Protection of a short critical section on a single-processor machine.
(b) Protection of a short critical section on a multi-processor machine.
(c) Protection of a long critical section on a single-processor machine.
(d) Protection of a long critical section on a multi-processor machine.
(a) Temporarily lowering the priority of a high priority process.
(b) Temporarily raising the priority of a low priority process.
(c) Not allowing a low priority process to perform system calls.
(d) Not allowing a high priority process to perform system calls.
(a) Performing an input/output operation.
(b) Performing a wait on an unblocked semaphore.
(c) Performing a wait on a blocked semaphore.
(d) Waiting to receive a message from another thread.
(a) 1 nanosecond
(b) 1 microsecond
(c) 1 millisecond
(d) 1 second
(a) Allowance for concurrent reading
(b) Allowance for concurrent writing.
(c) Allowance for reader lockout.
(d) Allowance for writer lockout.
(a) ever needs to wait for another thread to do anything, under any circumstances.
(b) needs to wait for any other thread, as long as no thread spends long inside critical sections.
(c) needs to wait for any other thread that does not want to enter a critical section.
(d) can be made to wait to enter a critical section while more than some bounded number of other threads enter the critical section ahead of it.
(a) a deadlock.
(b) absence of a deadlock.
(c) a resource has been allocated to two different processes.
(d) nothing; a cycle in the graph has no special meaning.