Chapter8-1
Chapter8-1
William Stallings
Computer Organization
and Architecture
10th Edition
Interactive system
The user/programmer interacts directly with the computer
to request the execution of a job or to perform a transaction
User may, depending on the nature of the application,
communicate with the computer during the execution of
the job
Batch system
Opposite of interactive
The user’s program is batched together with programs from
other users and submitted by a computer operator
After the program is completed results are printed out for
the user
Problems:
Scheduling
Sign-up sheets were used to reserve processor time
This could result in wasted computer idle time if the user finished
early
If problems occurred the user could be forced to stop before
resolving the problem
Setup time
A single program could involve
Loading the compiler plus the source program into memory
Saving the compiled program
Loading and linking together the object program and common
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
functions
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+ From the View of the
Processor
Processor . .
executes instructions
the monitor
.
from the portion of main memory containing
These instructions cause the next job to be read in another portion of main memory
The processor executes the instruction in the user’s program until it encounters an
ending or error condition
Either event causes the processor to fetch its next instruction from the monitor
program
The monitor handles setup and scheduling
A batch of jobs is queued up and executed as rapidly as possible with no idle time
Job control language (JCL)
Special type of programming language used to provide instructions to the monitor
Example:
$JOB
**Each FORTRAN instruction and each item of
$FTN data is on a separate punched card or a separate
record on tape. In addition to FORTRAN and data lines,
... Some Fortran instructions the job includes job control instructions, which are
denoted by the beginning “$”.
$LOAD
$RUN
... Some data
$END
Monitor, or batch OS, is simply a computer program
It relies on the ability of the processor to fetch instructions from various portions of
main memory in order to seize and relinquish control alternately
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+
Desirable Hardware Features
Memory protection
Privileged instructions
Can only be executed by the
User program must not alter monitor
the memory area containing
the monitor
If the processor encounters such
an instruction while executing a
The processor hardware should user program an error interrupt
detect an error and transfer occurs
control to the monitor I/O instructions are privileged so
The monitor aborts the job, the monitor retains control of all
prints an error message, and I/O devices
loads the next job
Timer Interrupts
Used to prevent a job Gives the OS more
from monopolizing the flexibility in relinquishing
system control to and regaining
If the timer expires an control from user
interrupt occurs and programs
control returns to monitor
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Table 8.1
Sample Program Execution Attributes