Note that even in a single user system it is not

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ts execution. Notice that this requires preserving of the job's complete status information when the CPU is taken away from it and restoring this information back before the CPU is given back to it again. To enable this, the operating system maintains a process control block (PCB) for each loaded process. A typical process control block is shown in Figure 14.6. With this arrangement, before taking away the CPU from a running process, its status is preserved in its PCB, and before the process resumes execution when the CPU is given back to it at a later time, its status is restored back from its PCB. Thus the process can continue execution without any problem. process identifier process state program counter values of various CPU registers accounting and scheduling information I/O status information 4. Proper job mix. A proper mix of I/O-bound and CPU-bound jobs is required to effectively overlap the operations of the CPU and I/O devices. If all the loaded jobs need I/O at the same time, the CPU will again be idle. Hence the main memory should contain some CPU-bound and some I/O-bound jobs so that at least one job is always ready to utilize the CPU. 5. CPU scheduling. In a multiprogramming system, often there will be situations in which two or more jobs will be in the ready state waiting for CPU to be allocated for execution. When more than one process is in the ready state when the CPU becomes free, the operating system must decide which of the ready jobs should be allocated the CPU for execution. The part of the operating system concerned with this decision is called the CPU scheduler, and the algorithm it uses is called the CPU scheduling algorithm. Multitasking Technically speaking, multitasking, is the same as multiprogramming. That is, multitasking is the system's capability to concurrently work on more than one task (job or process). This means that whenever a task (job or process) needs to perform I/O operations, the CPU can be used for executing some other task (job or process) that is also residing in the system and is ready to use the CPU...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online