Chapter 3-Computer Software
Chapter 3-Computer Software
Software Concept
Operating System (OS)
Using Operating System
Software can be defined as the program that controls the
operation of a computer. Or
a set of programs that utilizes the hardware and users its
capabilities to perform various tasks or
Is the set of instructions that a computer requires to perform
various task.
PROGRAM
Is a set of instructions stored in the computer to solve
specific problems. Or
is the set of instructions which tell the computer what to
do.
These instructions are usually written by special computer
languages such as c++, COBOL, visual basic, turbo, Pascal.
TYPES OF SOFTWARE
User
(Runs Application programs)
Application software
(Send users requests to the OS)
Operating system
(Receives & controls execution of Application programs)
Hardware
(Receives & executes OS commands)
Reasons why an Operating system is needed in a computer
(why operating systems were developed).
Job sequencing.
The OS keeps a list of jobs/tasks currently being run and
monitors them as they move in & out of the processor. It
also arranges them in a particular order to make it easy for
the processor to execute them and to know how & when to
fetch instructions & data for each task.
Job scheduling.
The OS arranges & loads programs in order to provide a continuous
sequence of processing & also provide the appropriate responses to events.
The processor can handle only one task at a time. Therefore, in a situation
where more than one application program is occupying the main storage,
the OS has to determine which task will be processed first and ensures
that the one that is currently being processed is closely monitored to avoid
wasting time in the processor.
The jobs are allocated priorities so as to ensure that there is continuous
processing until all the jobs within the memory are executed. This
ensures that the CPU does not remain idle at any given instance.
Some of the jobs scheduling functions include:
Controlling the loading & running of programs.
Communicating directly with users and/or the operator.
Dealing with user commands to organize files and run programs.
NB: A Job is a group of tasks taken as a unit of work for a computer, e.g.,
one or more computer programs, files, & instructions, to the operating
system.
Resource control and allocation.
The OS controls the selection & operation of hardware
devices used for input, output and storage.
The OS determines which task uses a particular resource
and at what time. To do this, it gives each resource a
unique identification number called an Interrupt number
so that, when two tasks request to use a resource at the
same time, the one with higher priority interrupt is granted
control.
This prevents an undesirable situation called deadlock
that occurs when a particular task holds a needed resource
& refuses to release it for use by other tasks.
Error reporting & correction routines.
The OS has many ways of reporting to the user of any
errors that occur during program execution. It does this
by monitoring the status of the computer system &
performing error checks on both hardware and software.
When the user makes an error, the OS through the Kernel
determines the cause of the error, and prints diagnostic
messages on the screen suggesting appropriate routines of
how the error can be corrected.
In case of a fatal error that cannot be corrected, the
program will be suspended permanently. E.g., the user
program will prematurely terminate when it encounters an
illegal operation, such as, dividing a no. by 0 or if it
attempts to read a data file that had not been opened
Interrupt handling.
An Interrupt is a break from the normal sequential
processing of instructions in a program.
Each hardware device communicates to the processor
using a special number called the Interrupt Request
number (IRQ). Therefore, when an interrupt occurs,
control is passed to the Kernel, which determines the
cause of the interrupt. The processor stops executing the
current program to wait for the corrective response of the
user. Control is returned to the program that was
interrupted once corrective action has been taken.
Some causes of Interrupt.
An Interrupt caused by Power failure.
The Kernel saves vital information using the dying power supply so
that it can be restarted when power is returned.
Arithmetic or logic errors.
When the ALU detects that an error has occurred, (e.g., the output
may be requested to a non-existent device) it generates a signal that
causes an interrupt. Control is transferred to the Kernel, which
indicates the appropriate error correction routines.
Hardware malfunction, e.g. parity errors.
The I/O control for each device & its associated hardware normally
takes care of parity checking. If a parity error is detected, the Kernel is
notified by an interrupt.
Device driver - software that the OS uses to control a specific piece of
hardware.
Interfaces the user to the system’s hardware.
The OS provides quick means of communication between the
computer user & its programs.
The user requests the services of the OS by use of commands & the
OS communicates the messages regarding the processing to the user
through, either the screen or printer. Thus, a form of ‘conversation’
is established between the OS & the computer user.
Logging & accounting.
The OS keeps records (internal logs) on how the computer’s
resources, e.g., CPU time, memory usage, & the peripherals are
being used. It also keeps a complete record of all that happens
during processing (usually in the form of a printed log).
The OS protects hardware, software & data from improper use. They
ensure that application programs use the hardware in an efficient way.
Examples of operating systems:
DOS (Disk Operating System).
Windows operating system.
Mac OS (Macintosh).
UNIX.
Linux.
Android
Characteristics of an operating system.
An OS should have the following characteristics:
Reliable.
The OS should be at least as reliable as the hardware on
which it runs. If a software or hardware error occurs, the
system should be able to detect the error and either try to
correct the problem or try to minimize the damage to the
users of the system from the error.
Protected.
A user doesn’t want other users to interfere with him.
Therefore, the system should protect users from being
affected both by errors of other users and by malicious
attempts at tampering.
Efficient.
The OS is usually a complex program that uses a large part of the
hardware resources for its own functions. The resources
consumed by the OS are not available for users.
Therefore, the system itself should be very efficient, & should
manage user’s resources to minimize their idle time.
Convenient.(accessible with minimum difficulty)
Systems should be designed keeping users in mind.
Therefore, an OS should be flexible & convenient to use. In
addition, in order to allow the sharing of resources, the OS must
be in complete control of the allocation of the computer resources.
Predictable.
User demands on the system are generally unpredictable. At the
same time, users prefer to get service that does not vary widely
over extended periods of time. An estimate as to when the user
will get his input should be given.
Revision Questions
Name two major reasons why it became necessary to use
an Operating system.
(a). Identify FOUR resources that the Operating system
should manage.
(b). what function should the Operating system perform to
manage each of the resources Above?
List and explain any five general functions of an operating
system.
What is meant by the term Job in computer studies?
Name four examples of operating systems.
CLASSIFICATION OF OPERATING SYSTEMS.
The OS determine the type of processing that a
computer system is able to perform, since it controls the
allocation & use of the computer resources.
Operating systems can be classified according to:
Number of tasks that the system can perform
concurrently.
Single-tasking (program) operating system.
Multi-tasking operating system.
Number of users the system can support at the same time.
Single-user operating systems.
Multi-user operating systems.
Classification according to tasks handled
concurrently
Single-tasking OS.
Single-tasking OS allows only one user-program in the
main memory to be processed at a particular time.
This means that, the user can only run one interactive
program at a time. The user must then exit from the
program before loading & running another program.
Example of a single user OS;
MS-DOS.
Classification according to tasks handled
concurrently
Multi-tasking (Multiprogramming) OS.
A Multi-tasking OS allows a single CPU to execute/process more
than one program, all of which are in memory, at the same time.
Each program is allocated a time-slice. In this case, the programs
take turns at short intervals of processing time. The CPU switches
its attention between programs as it receives requests for
processing, executing statements from one program, and then
from another.
The programs to be run are loaded into the memory and the CPU
begins execution of the first one. When the request is satisfied,
the second program is brought into memory and execution starts
on the second program, and so on.
Classification according to number of users
Single-user OS.
A single-user OS is designed to be used by only one person. It allow only
one user/person to operate the machine at a time in an interactive,
conversational mode, and runs only one user program at a time, e.g. MS-
DOS.
User-friendliness.
HCI is expected to be “user-friendly”, i.e., it should be one
that the end-user finds helpful, and easy to learn & use.
It should be relatively easy for the user to try to start using the
Features/characteristicsofauser-friendlyHCI.
system.
The system should be self-contained, so that the user is not forced
into accessing manuals.
The amount of effort & the information required for the user to get
the system complete required tasks should be minimal.
The system should be robust & reliable, i.e., the user should be
protected from unexpected system actions, including system
failures.
The system should be able to adjust to different levels of expertise
between users & also as users grow in competence.
The user should be made to feel in control of what is going on.
The system should behave in a logical & consistent manner,
enabling the user to reason about what is going on and apply what
has been learned.
Types of User interfaces.
There are different types of Human Computer Interfaces: -
Command driven interface.
Menu driven interface.
Graphical User Interface (GUI).
What criteria are used to classify types of operating systems?
(a) Differentiate between multi-user and multitasking
operating systems.
(b) State any computer software that can be classified as a
Multi-user operating system.
Name three types of user interfaces employed by different
commercial Operating systems.
(a) Differentiate between command-line interface and
graphical user interface operating systems based on the way
commands are entered.
(b) State two main advantages of GUI interfaces.
Factors to consider when choosing an
operating system.