100%(3)3 out of 3 people found this document helpful
This preview shows page 50 - 52 out of 84 pages.
-51-AANSWERS TO NSWERS TO QQUESTIONSUESTIONS9.1Long-term scheduling:The decision to add to the pool of processes to be executed.Medium-term scheduling:The decision to add to the number of processes that arepartially or fully in main memory. Short-term scheduling:The decision as to whichavailable process will be executed by the processor9.2Response time.9.3Turnaround timeis the total time that a request spends in the system (waiting timeplus service time. Response timeis the elapsed time between the submission of arequest until the response begins to appear as output.9.4In UNIX and many other systems, larger priority values represent lower priorityprocesses. Some systems, such as Windows, use the opposite convention: a highernumber means a higher priority9.5Nonpreemptive:If a process is in the Running state, it continues to execute until (a)it terminates or (b) blocks itself to wait for I/O or to request some operating systemservice. Preemptive:The currently running process may be interrupted and movedto the Ready state by the operating system. The decision to preempt may beperformed when a new process arrives, when an interrupt occurs that places ablocked process in the Ready state, or periodically based on a clock interrupt.9.6As each process becomes ready, it joins the ready queue. When the currently-running process ceases to execute, the process that has been in the ready queue thelongest is selected for running.9.7A clock interrupt is generated at periodic intervals. When the interrupt occurs, thecurrently running process is placed in the ready queue, and the next ready job isselected on a FCFS basis.9.8This is a nonpreemptive policy in which the process with the shortest expectedprocessing time is selected next.9.9This is a preemptive version of SPN. In this case, the scheduler always chooses theprocess that has the shortest expected remaining processing time. When a newprocess joins the ready queue, it may in fact have a shorter remaining time than thecurrently running process. Accordingly, the scheduler may preempt whenever anew process becomes ready.