




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





This test is comprised of three different types of questions: multiple choice, true/false, and short answer. If you need more room for some answers (for problems 23-28) use the backs of pages – label all answers clearly if you do this!!!
Multiple choice - circle the number which corresponds to the best answer or best completes each statement.
True or False - circle the word True if the statement is true and circle False if the statement is false.
Short answer – provide a short but complete answer to the question. Don’t write paragraphs. You simply need to convince me that you know what’s going on with the concept on which the question is based.
Problems 1-22 are worth 2 points each. Points for problems 23-25 are shown with the problem.
(a) Minimizing response time. (b) Maximizing throughput. (c) Minimizing the total number of interrupts that occur. (d) None of the above are accurate.
June 16, 2011
100 points total
(Please print clearly)
favored by this protocol? (a) CPU-bound processes. (b) I/O-bound processes. (c) This protocol would favor neither CPU-bound nor I/O-bound processes.
(a) 2 (b) 3 (the original process, the dispatcher process, and the new process) (c) 4 (d) 6
True False
True False
Explanation: If a process uses too much processor time (i.e., CPU- bound), it will migrate to lower priority queue levels. Thus, I/O-bound processes which use less CPU time (and thus have fewer context switches) will remain in the higher priority queue levels.
Explanation: If no interrupt handler is loaded then no context is loaded for it. Thus the only contexts will be the original process, the dispatcher process, and then the new process loaded by the dispatcher.
Explanation: In this case, the interrupt handler is a context that will be loaded, and thus one more context will be seen by the CPU.
modes associated with dual mode operation are: (a) Protected mode and public mode (b) Internal mode and external mode (c) Passive mode and active mode (d) User mode and kernel mode
True False
(a) an overall increase in the functionality of the OS (b) interrupts are no longer necessary (c) the system can be constructed in a modular fashion (d) all of the above
(a) improve response time (b) increase processor efficiency (c) improve throughput (d) increase memory utilization
and supports only processes). Suppose we have two processes, P1 consisting of a single thread and P2 consisting of 50 threads. Assuming that each process receives the same length time slice in the CPU, how much slower is a thread in P2 executed than the thread in P1? (a) 5 times slower (b) 50 times slower (c) 500 times slower (d) they execute at the same speed
Explanation: Both P1 and P2 receive the same overall time allocation in the CPU and P1 consists of a single thread and P2 consists of 50 threads. For P1 and P2 to execute in the same time, P2 would need to move all 50 threads through the CPU in the same time as the single thread of P1. Since this is not the case with equal CPU time allocations to P1 and P2, this means that a given thread in P2 will execute 50 times slower than the thread in P1.
protocols: a) CPU utilization b) response time c) waiting time d) none of the above
a) aging b) deadlock c) starvation d) all of the above
True False
a) semaphores and monitors b) aging the process c) preemptive priority scheduling d) non-preemptive scheduling e) a, b, and c f) a, b, and d g) none of the above
that have been executing for long periods of time, thus tending to prefer processes which have not been executing for long periods of time. True False
protocols.
A non-preemptive algorithm allows a process, once assigned the CPU, to continue executing (complete its CPU burst) until it voluntarily leaves the running state (e.g., terminates or requests an I/O operation). Processes entering the ready queue do not have any impact on a running process.
A preemptive algorithm will take the CPU away from a running process if another process entering the queue better meets the qualifications of the algorithm (e.g., higher priority, shorter burst time). Processes entering the ready queue can affect a running process. Preemption reduces the waiting times for more important (better qualified) processes.
illustrate on your diagram how a process moves from one state to the next.
Long-term scheduling: The decision to add to the pool of processes to be executed. Executed rather infrequently compared with the other two schedulers.
Medium-term scheduling: The decision to add to the number of processes that are partially or fully in main memory. Basically controls the degree of multiprogramming. It is used primarily with time-sharing systems (not all systems will even have an intermediate scheduler). A swapping scheme is implemented to remove partially executed processes from the CPU (and memory) and reinstate them later at the point where they were interrupted.
Short-term scheduling: The decision as to which available process will be executed by the processor. Also known as the dispatcher.
explain four (4) characteristics of a suspended process. In other words, every process in any suspended state will share these same characteristics.