waits for the completion of the current write on the tape drive that it now

Waits for the completion of the current write on the

This preview shows page 8 - 10 out of 49 pages.

waits for the completion of the current write on the tape drive that it now owns. The distinction made between two different reasons for waiting for a device could be useful to the operating system in organizing its work. However, it is no substitute for a knowledge of which processes are swapped out and which processes are swapped in. This latter distinction is a necessity and must be reflected in some fashion in the process state. 3.5 Figure 9.3 in Chapter 9 shows the result for a single blocked queue. The figure readily generalizes to multiple blocked queues. 3.6 Penalize the Ready, suspend processes by some fixed amount, such as one or two priority levels, so that a Ready, suspend process is chosen next only if it has a higher 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 of waiting processes into queues reduces the work needed to locate a waiting process when an event occurs that affects it. For example, when a page fault completes, the scheduler know that the waiting process can be found on the Page Fault Wait queue. b. In each case, it would be less efficient to allow the process to be swapped out while in this state. For example, on a page fault wait, it makes no sense to swap out a process when we are waiting to bring in another page so that it can execute. c. The state transition diagram can be derived from the following state transition table:
Image of page 8
3.8 a. The advantage of four modes is that there is more flexibility to control access to memory, allowing finer tuning of memory protection. The disadvantage is complexity and processing overhead. For example, procedures running at each of the access modes require separate stacks with appropriate accessibility. b. In principle, the more modes, the more flexibility, but it seems difficult to justify 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 more secure than information in Di, this restriction is appropriate. However, this security policy can be circumvented in the following way. A process running in Dj could read data in Dj and then copy that data into Di. Subsequently, a process running in Di could access the information. b. An approach to dealing with this problem, known as a trusted system, is discussed in Chapter 16. 3.10 a. An application may be processing data received from another process and storing the results on disk. If there is data waiting to be taken from the other process, the application may proceed to get that data and process it. If a previous disk write has completed and there is processed data to write out, the application may proceed to write to disk. There may be a point where the process is waiting both for additional data from the input process and for disk availability.
Image of page 9
Image of page 10

You've reached the end of your free preview.

Want to read all 49 pages?

  • Spring '12
  • saviotse
  • Virtual memory, Central processing unit

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture