0% found this document useful (0 votes)
21 views

Chapter8-1

computer architecture

Uploaded by

gregmcregor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Chapter8-1

computer architecture

Uploaded by

gregmcregor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

+

William Stallings
Computer Organization
and Architecture
10th Edition

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights


reserved.
+ Chapter 8
Operating System Support

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+
Operating System (OS) Services
 The most important system program
 Masks the details of the hardware from the
programmer and provides the programmer with a
convenient interface for using the system
 The OS typically provides services in the following
areas:
 Program creation
 Program execution
 Access to I/O devices
 Controlled access to files
 System access
 Error detection and response
 Accounting
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Interfaces
 Key interfaces in a typical computer system:

Instruction Application Application


set binary programming
architecture interface interface
(ISA) (ABI) (API)
Gives a program access to
the hardware resources
Defines the machine Defines a standard for and services available in a
language instructions that binary portability across system through the user
a computer can follow programs ISA supplemented with
high-level language (HLL)
library calls

Defines the system call


Using an API enables
interface to the operating
application software to be
Boundary between system and the hardware
ported easily to other
hardware and software resources and services
systems that support the
available in a system
same API
through the user ISA

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


+ Operating System
as
Resource Manager
A computer is a set of resources for the movement,
storage, and processing of data and for the control
of these functions
 The OS is responsible for managing these
resources

The OS as a control mechanism is unusual in two


respects:
 The OS functions in the same way as ordinary
computer software – it is a program executed by
the processor
 The OS frequently relinquishes control and must
depend on the processor to allow it to regain
control
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+
Types of Operating Systems

 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

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


+
Early Systems
 From the late 1940s to the mid-1950s the
programmer interacted directly with the computer
hardware – there was no OS
 Processors were run from a console consisting of
display lights, toggle switches, some form of input device and a
printer

 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

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


Table 8.2
Effects of Multiprogramming on Resource
Utilization

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+
Time Sharing Systems

 Used when the user interacts directly with the computer


 Processor’s time is shared among multiple users
 Multiple users simultaneously access the system through terminals, with
the OS interleaving the execution of each user program in a short burst or
quantum of computation
 Example:
 If there are n users actively requesting service at one time, each user will only
see on the average 1/n of the effective computer speed

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


Table 8.3
Batch Multiprogramming versus Time
Sharing

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

You might also like