Information Technology Reference
In-Depth Information
CPU time and other resources, some processing tasks may take a
long time in a multitasking environment—longer than if the CPU
could devote all its attention to the task, as with single tasking.
Why do operating systems worry about coordinating
different programs or users? Can't they just work
separately?
Within the technical community, this question can be answered
by noting that coordination is necessary when different programs or
users need to share common resources. In case you find that answer
unduly formal or abstract, however, let's consider three examples.
Printing Example
Suppose we are developing two documents at the same time. Perhaps one docu
ment is our written research report to be handed to an instructor or customer,
whereas the second represents the slides we will use in an oral presentation. For
our research report we may use a wordprocessor application, and for our slides
we may use a slide application, such as PowerPoint or Keynote. Each application
would have its own separate window. Because both documents relate to the
same research project, we want both windows open at the same time. This al
lows us to refer to one document while we write or edit the other.
When we have reasonable drafts ready, we decide to print both documents. To
print, we go to each document window, select the “print” option, and instruct the
computer to perform the printing operation. We request two copies of the first
document, the research report, by choosing the print option twice for that mater
ial, and then we print the slides. If we make these requests within a short period
of time, the request to print the slides might be sent to the CPU while the first
copy of the first document is still printing, and the second copy has not yet been
started. The computer now has some choices to make; one printing task has
started, and two more are pending.
Without coordination, each of these printing requests would have to work inde
pendently. The result could be chaos. During the printing of the first document,
the printer might be asked to print the second copy as well. The result could
be a jumble, with one copy interspersed with the second. When the request for
the second copy arrived, parts of it might appear on top of the two previous
copies. Such independent actions clearly are not acceptable.
Instead, the operating system keeps track of all requests that have been made
for printing. Work then proceeds on the first request, and the other printing
tasks are postponed. When the first copy has been printed, the operating sys
tem can review what additional printing requests are pending, choose one, and
 
Search WWH ::




Custom Search