87%(39)34 out of 39 people found this document helpful
This preview shows page 8 - 10 out of 49 pages.
waits for the completion of the current write on the tape drive that it nowowns.The distinction made between two different reasons for waiting for a device couldbe useful to the operating system in organizing its work. However, it is nosubstitute for a knowledge of which processes are swapped out and whichprocesses are swapped in. This latter distinction is a necessity and must be reflectedin some fashion in the process state.3.5 Figure 9.3 in Chapter 9 shows the result for a single blocked queue. The figurereadily generalizes to multiple blocked queues.3.6 Penalize the Ready, suspend processes by some fixed amount, such as one or twopriority levels, so that a Ready, suspend process is chosen next only if it has ahigher priority than the highest-priority Ready process by several levels of priority.3.7 a. A separate queue is associated with each wait state. The differentiation ofwaiting processes into queues reduces the work needed to locate a waitingprocess when an event occurs that affects it. For example, when a page faultcompletes, the scheduler know that the waiting process can be found on thePage Fault Wait queue.b. In each case, it would be less efficient to allow the process to be swapped outwhile in this state. For example, on a page fault wait, it makes no sense to swapout a process when we are waiting to bring in another page so that it canexecute.c. The state transition diagram can be derived from the following state transitiontable:
3.8 a. The advantage of four modes is that there is more flexibility to control access tomemory, allowing finer tuning of memory protection. The disadvantage iscomplexity and processing overhead. For example, procedures running at eachof the access modes require separate stacks with appropriate accessibility.b. In principle, the more modes, the more flexibility, but it seems difficult tojustify going beyond four.3.9 a. With j < i, a process running in Di is prevented from accessing objects in Dj.Thus, if Dj contains information that is more privileged or is to be kept moresecure than information in Di, this restriction is appropriate. However, thissecurity policy can be circumvented in the following way. A process running inDj could read data in Dj and then copy that data into Di. Subsequently, aprocess running in Di could access the information.b. An approach to dealing with this problem, known as a trusted system, isdiscussed in Chapter 16.3.10 a. An application may be processing data received from another process andstoring the results on disk. If there is data waiting to be taken from the otherprocess, the application may proceed to get that data and process it. If aprevious disk write has completed and there is processed data to write out, theapplication may proceed to write to disk. There may be a point where theprocess is waiting both for additional data from the input process and for diskavailability.