The Operating System as a
User/Computer Interface
The
hardware and software used in providing applications to a user can be viewed in
a layered or hierarchical fashion, as depicted in Figure 1.The user of those
applications, the end user, generally is not concerned with the details of
computer hardware. Thus, the end user views a computer system in terms of a set
of applications.An application can be expressed in a programming language and
is developed by an application
programmer. If one were
to develop an
application program as a set of
machine instructions that
is completely responsible
for controlling the computer
hardware, one would be faced with an overwhelmingly complex undertaking.To ease
this chore, a set of system programs is provided. Some of these programs are
referred to as utilities.These implement frequently used functions that assist
in program creation, the management of
files, and the control of I/O devices. A programmer will make use of
these facilities in developing an application, and the application,while it is
running, will invoke the utilities to perform certain functions. The most important
collection of system programs comprises
the OS. The OS masks the details
of the hardware from the programmer and
provides the programmer with a convenient interface for using the system. It
acts as mediator,making it easier for the programmer and for application
programs to access and use those facilities and services.
Briefly,
the OS typically provides services in the following areas:
Ø Program development:
The OS provides a
variety of facilities
and services, such as editors and
debuggers, to assist the programmer in creating programs. Typically, these services
are in the
form of utility
programs that, while not
strictly
part of the core of the OS, are supplied with the OS and are referred to as
application program development tools.
Ø Program execution: A number
of steps need
to be performed
to execute a program. Instructions and data must be
loaded into main memory, I/O devices and
files must be initialized, and
other resources must be prepared. The OS
handles these scheduling duties for the user.
Ø Access to I/O devices:
Each I/O device requires its own peculiar set of instructions or control
signals for operation.The OS provides a uniform interface that hides these
details so that programmers can access such devices using simple reads and
writes.
Ø Controlled access to files:
For file access, the OS must reflect a detailed understanding of not only the
nature of the I/O device (disk drive, tape drive) but also the structure of the
data contained in the files on the storage medium. In the case of a system with
multiple users, the OS may provide protection mechanisms to control access to
the files.
Ø System access:
For shared or public systems, the OS controls access to the system as a whole
and to specific system resources.The access function must provide protection
of resources and
data from unauthorized
users and must resolve conflicts for resource
contention.
Ø Error detection and response:
A variety of errors can occur while a computer system is running.These include
internal and external hardware errors, such as a memory
error, or a device
failure or malfunction; and various
software errors, such as division by zero, attempt to access forbidden
memory location, and inability of the OS to grant the request of an
application. In each case, the OS must provide a response that clears the error
condition with the least impact on
running applications. The
response may range from ending
the program that caused the error, to retrying the operation, to simply
reporting the error to the application.
Ø Accounting:
A good OS will collect usage statistics for various resources and monitor
performance parameters such as response time. On any system, this information
is useful in anticipating the need for future enhancements and in tuning the
system to improve performance. On a multiuser system, the information can be
used for billing purposes.
No comments:
Post a Comment