Sei sulla pagina 1di 32

JOMO KENYATTA UNIVERSITY

OF
AGRICULTURE & TECHNOLOGY
JKUAT SODeL

SCHOOL OF OPEN, DISTANCE AND eLEARNING


P.O. Box 62000, 00200
2015

Nairobi, Kenya
E-mail: elearning@jkuat.ac.ke

HPS 2106 COMPUTER APPLICATIONS

JJ II
J I
J DocDoc I
Back Close
HPS 2106 COMPUTER APPLICATIONS
This presentation is intended to covered within one week.
The notes, examples and exercises should be supple-
mented with a good textbook. Most of the exercises have
solutions/answers appearing elsewhere and accessible by
JKUAT SODeL

clicking the green Exercise tag. To move back to the same


page click the same tag appearing at the end of the solu-
tion/answer.
2015

Errors and omissions in these notes are entirely the re-


sponsibility of the author who should only be contacted
through the Department of Curricula & Delivery
(SODeL) and suggested corrections may be e-mailed to
elearning@jkuat.ac.ke.
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 0
HPS 2106 COMPUTER APPLICATIONS
LESSON 5
Introduction to Computer Software

1. Distinguish the different types of Computer Software D


JKUAT SODeL

2. escribe the different computer operating systems.


3. Explain the Goals and Roles of the Operating Systems
2015

4. Discuss the criteria for selecting and using Operating sys-


tems

JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 1
HPS 2106 COMPUTER APPLICATIONS
5.1. What is Software?
In the earlier chapters of this module we have been focusing on
the physical or tangible parts or the computer system. We now
turn to the intangible part which we globally call software. But
JKUAT SODeL

what really is software .

5.1.1. A Definition for Software


2015

Software refers to a set of programs, procedures and related doc-


umentation within a computer system. It refers to all computer
programs whether general purpose or special purposes. A pro-
gram is a coded set of instructions that interprets the informa-
tion from the input and instructs the computer what should be
JJ II done with it. It is created by programmers, using programming
J I languages.
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 2
HPS 2106 COMPUTER APPLICATIONS
Software is needed to support input, processing, output, stor-
age and control all activities within the computer system. There-
fore, it is regarded as the soul of the computer system while
hardware is regarded as the body of the computer system.
JKUAT SODeL

5.2. System Vs Application Software


Software is classified into 2 major groups System Software and
2015

Application Software. First we discuss System software:

5.2.1. System Software


System software manages the operation of a computer system.
It supports the resources and operations of a computer system
JJ II whenever the computer is performing any task. System software
J I acts as a supervisor of other applications and hardware.
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 3
HPS 2106 COMPUTER APPLICATIONS
System software is normally supplied by the manufacturers
of computer hardware. In most cases it is usually pre-installed
into the computers before they are distributed for sale. However
one may change or upgrade the system software, at will. System
JKUAT SODeL

software is further classified into the following categories:


1. Operating System e.g. Windows, Linux, UNIX, DOS etcetera.
2. System Utilities:
2015

3. Assemblers and Compilers (mostly used in programming)

5.2.2. The Operating System


The most important element in system software is the Operat-
JJ II
ing system commonly referred to as the OS. While there is no
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 4
HPS 2106 COMPUTER APPLICATIONS
JKUAT SODeL
2015

JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 5
HPS 2106 COMPUTER APPLICATIONS
universally agreed upon definition of the concept of an operating
system, we offer the following as a reasonable starting point:
A computers operating system (OS) is a group of programs
designed to serve three basic purposes:
JKUAT SODeL

1. To provide an interface between a user of a computer and


the computer hardware. Thus creating an environment
(desktop) in which a user may execute programs and per-
2015

form whatever tasks they need to execute with the com-


puter
2. To control the allocation and use of the computing sys-
tems resources among the various users and tasks
3. To provide an interface between the computer hardware
JJ II and the programmer that simplifies and makes feasible the
J I creation, coding, debugging, and maintenance of applica-
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 6
HPS 2106 COMPUTER APPLICATIONS
tion programs.

Goals of Operating Systems


The primary goal of an operating system is convenience for the
user. Operating systems exist because they are supposed to
JKUAT SODeL

make it easier to compute with an operating system than with-


out an operating system. This is particularly clear when you
2015

look at operating system for small personal computers.


A secondary goal is the efficient operation of a computer
system. This goal is particularly important for large, shared
multi-user systems. Operating systems can help to manage re-
sources and share them out to the multiple users according to
their needs. It is known that sometimes these two goals, conve-
JJ II
nience and efficiency, are contradictory.
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 7
HPS 2106 COMPUTER APPLICATIONS
5.2.3. Types of Operating Systems
In this section we present types of operating system includ-
ing definitions of terminologies and concepts that are associated
with the classification and development of operating systems.
JKUAT SODeL

Modern computer operating systems may be classified into


three groups, which are distinguished by the nature of interac-
tion that takes place between the computer user and his or her
2015

program during its processing. The three groups are:


1. Batch
2. Time-shared
3. Real time operating systems.
JJ II In a batch processing operating system environment, users sub-
J I mit jobs to a central place where these jobs are collected into a
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 8
HPS 2106 COMPUTER APPLICATIONS
batch, and subsequently placed on an input queue at the com-
puter where they will be run. In this case, the user has no
interaction with the job during its processing.
In time sharing operating systems, a computer provides com-
JKUAT SODeL

puting services to several or many users concurrently on line.


Here, the various users are sharing the central processor, the
memory, and other resources of the computer system in a man-
2015

ner facilitated, controlled, and monitored by the operating sys-


tem. The user, in this environment, has nearly full interaction
with the program during its execution, and the computers re-
sponse time may be expected to be no more than a few second.
The third class of operating systems, real time operating
JJ II systems, is designed to service those applications where response
J I time is of the essence in order to prevent error, misrepresentation
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 9
HPS 2106 COMPUTER APPLICATIONS
or even disaster. Examples of real time operating systems are
those which handle airlines reservations, machine tool control,
and monitoring of a nuclear power stations.
In fact, many computer operating systems are hybrids, pro-
JKUAT SODeL

viding for more than one of these types of computing service


simultaneously. It is especially common to have a background
batch system running in conjunction with one of the other two
2015

on the same computer.


A number of other definitions are important to gaining an
understanding of operating systems:
A multiprogramming operating system is a system that
allows more than one active user program (or part of user pro-
JJ II gram) to be stored in main memory simultaneously. Thus, it is
J I evident that a time-sharing system is a multiprogramming sys-
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 10
HPS 2106 COMPUTER APPLICATIONS
tem, but note that a multiprogramming system is not necessarily
a time-sharing system. A batch or real time operating system
could, and indeed usually does, have more than one active user
program simultaneously in main storage.
JKUAT SODeL

Another important, and all too similar, term is multipro-


cessing. A multiprocessing system is a computer hardware con-
figuration that includes more than one independent processing
2015

unit. The term multiprocessing is generally used to refer to


large computer hardware complexes found in major scientific or
commercial applications. A networked computing system is a
collection of physically interconnected computers. The operat-
ing system of each of the interconnected computers must con-
JJ II tain, in addition to its own stand-alone functionality, provisions
J I for handing communication and transfer of program and data
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 11
HPS 2106 COMPUTER APPLICATIONS
among the other computers with which it is connected.
A distributed computing system consists of a number of com-
puters that are connected and managed so that they automati-
cally share the job processing load among the constituent com-
JKUAT SODeL

puters, or separate the job load as appropriate particularly con-


figured processors. Such a system requires an operating system
which, in addition to the typical stand-alone functionality, pro-
2015

vides coordination of the operations and information flow among


the component computers.
The networked and distributed computing environments and
their respective operating systems are designed with more com-
plex functional capabilities. In a network operating system the
JJ II users are aware of the existence of multiple computers, and can
J I log in to remote machines and copy files from one machine to
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 12
HPS 2106 COMPUTER APPLICATIONS
another. Each machine runs its own local operating system and
has its own user (or users).
A distributed operating system, in contrast, is one that ap-
pears to its users as a traditional uniprocessor system, even
JKUAT SODeL

though it is actually composed of multiple processors. In a true


distributed system, users should not be aware of where their pro-
grams are being run or where their files are located; that should
2015

all be handled automatically and efficiently by the operating


system.
Network operating systems are not fundamentally different
from single processor operating systems. They obviously need a
network interface controller and some low-level software to drive
JJ II it, as well as programs to achieve remote login and remote files
J I access, but these additions do not change the essential structure
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 13
HPS 2106 COMPUTER APPLICATIONS
of the operating systems.
True distributed operating systems require more than just
adding a little code to a uniprocessor operating system, because
distributed and centralized systems differ in critical ways. Dis-
JKUAT SODeL

tributed systems, for example, often allow program to run on


several processors at the same time, thus requiring more com-
plex processor scheduling algorithms in order to optimize the
2015

amount of parallelism achieved.

Operating system components


An operating system provides the environment within which pro-
grams are executed. To construct such an environment, the
system is partitioned into small modules with a well-defined in-
JJ II
terface. The design of a new operating system is a major task.
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 14
HPS 2106 COMPUTER APPLICATIONS
It is very important that the goals of the system be will defined
before the design begins. The type of system desired is the foun-
dation for chokes between various algorithms and strategies that
will be necessary.
JKUAT SODeL

A system as large and complex as an operating system can


only be created by partitioning it into smaller pieces. Each of
these pieces should be a well defined portion of the system with
2015

carefully defined inputs, outputs, and function. Obviously, not


all systems have the same structure. However, many modern
operating systems share the system components outlined below.

Process Management
The CPU executes a large number of programs. While its main
JJ II
concern is the execution of user programs, the CPU is also
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 15
HPS 2106 COMPUTER APPLICATIONS
needed for other system activities. These activities are called
processes. A process is a program in execution. Typically, a
batch job is a process. A time-shared user program is a process.
A system task, such as spooling, is also a process. For now, a
JKUAT SODeL

process may be considered as a job or a time-shared program,


but the concept is actually more general.
In general, a process will need certain resources such as CPU
2015

time, memory, files, I/O devices, etc., to accomplish its task.


These resources are given to the process when it is created. In
addition to the various physical and logical resources that a pro-
cess obtains when it is created, some initialization data (input)
may be passed along. For example, a process whose function is
JJ II to display on the screen of a terminal the status of a file, say
J I F1, will get as an input the name of the file F1 and execute the
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 16
HPS 2106 COMPUTER APPLICATIONS
approprite program to obtain the desired information.
We emphasize that a program by itself is not a process; a
program is a passive entity, while a process is an active entity.
It is known that two processes may be associated with the same
JKUAT SODeL

program; they are nevertheless considered two separate execu-


tion sequences.
A process is the unit of work in a system. Such a system
2015

consists of a collection of processes, some of which are operating


system processes, those that execute system code, and the rest
being user processes, those that execute user code. All of those
processes can potentially execute concurrently.
The operating system is responsible for the following activi-
JJ II ties in connection with processes managed.
J I The creation and deletion of both user and system pro-
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 17
HPS 2106 COMPUTER APPLICATIONS
cesses
The suspension and resumption of processes.
The provision of mechanisms for process synchronization
The provision of mechanisms for deadlock handling.
JKUAT SODeL

The process concept will be discussed in great detail in section


4 below.
2015

Memory Management
Memory is central to the operation of a modern computer sys-
tem. Memory is a large array of words or bytes, each with its
own address. Interaction is achieved through a sequence of reads
or writes of sprcific memory address. The CPU fetches from and
JJ II stores in memory.
J I In order for a program to be executed it must be mapped to
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 18
HPS 2106 COMPUTER APPLICATIONS
absolute addresses and loaded in to memory. As the program
executes, it acesses program instructions and data from memory
by generating these absolute is declared available, and the next
program may be loaded and executed.
JKUAT SODeL

In order to improve both the utilization of CPU and the


speed of the computes response to its users, several processes
must be kept in memory. There are many different algorithms
2015

depends on the particular situation. Selection of a memory man-


agement scheme for a specific system depends upon many factor,
but especially upon the hardware design of the system. Each al-
gorithm requires its own hardware support.
The operating system is responsible for the following activi-
JJ II ties in connection with memory management.
J I Keep track of which parts of memory are currently being
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 19
HPS 2106 COMPUTER APPLICATIONS
used and by whom.
Decide which processes are to be loaded into memory when
memory space becomes available.
Allocate and reallocate memory space as needed.
JKUAT SODeL

Memory management techniques will be discussed in great detail


in section 8.
2015

Secondary Storage Management


The main purpose of a computer system is to execute programs.
These programs, together with the data they access, must be
in main memory during execution. Since the main memory is
too small to permanently accommodate all data and program,
JJ II the computer system must provide secondary storage to backup
J I main memory. Most modem computer systems use disks as the
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 20
HPS 2106 COMPUTER APPLICATIONS
primary on-line storage of information, of both programs and
data. Most programs, like compilers, assemblers, sort routines,
editors, formatters, and so on, are stored on the disk until loaded
into memory, and then use the disk as both the source and des-
JKUAT SODeL

tination of their processing. Hence the proper management of


disk storage is of central importance to a computer system.
There are few alternatives. Magnetic tape systems are gener-
2015

ally too slow. In addition, they are limited to sequential access.


Thus tapes are more suited for storing infrequently used files,
where speed is not a primary concern. The operating system is
responsible for the following activities in connection with disk
management
JJ II Free space management
J I Storage allocation
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 21
HPS 2106 COMPUTER APPLICATIONS
Disk scheduling.
I/O System One of the purposes of an operating system is to
hide the peculiarities os specific hardware devices from the user.
For example, in Unix, the peculiarities of I/O devices are hidden
JKUAT SODeL

from the bulk of the operating system itself by the I/O system.
The I/O system consists of:
A buffer caching system
2015

A general device driver code


Drivers for specific hardware devices.
Only the device driver knows the peculiarities of a specific de-
vice.
We will discuss the I/O system in great length in section 7.
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 22
HPS 2106 COMPUTER APPLICATIONS
File Management
File management is one of the most visible services of an operat-
ing system. Computers can store information in several different
physical forms; magnetic tape, disk, and drum are the most com-
JKUAT SODeL

mon forms. Each of these devices has it own characteristics and


physical organization.
For convenient use of the computer system, the operating
2015

system provides a uniform logical view of information storage.


The operating system abstracts from the physical properties of
its storage devices to define a logical storage unit, the file. Files
are mapped, by the operating system, onto physical devices.
A file is a collection of related information defined by its
JJ II creator. Commonly, files represent programs (both source and
J I object forms) and data. Data files may be numeric, alphabetic
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 23
HPS 2106 COMPUTER APPLICATIONS
or alphanumeric. Files may be free-form, such as text files, or
may be rigidly formatted. In general a file is a sequence of bits,
bytes, lines or records whose meaning is defined by its creator
and user. It is a very general concept.
JKUAT SODeL

The operating system implements the abstract concept of


the file by managing mass storage device, such as types and
disks. Also files are normally organized into directories to ease
2015

the use. Finally, when multiple users have access to files, it may
be desirable to control by whom and in what ways files may be
accessed.
The operating system is responsible for the following activi-
ties in connection with file management:
JJ II The creation and deletion of files
J I The creation and deletion of directory
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 24
HPS 2106 COMPUTER APPLICATIONS
The support of primitives for manipulating files and direc-
tories
The mapping of files onto disk storage.
Backup of files on stable (non volatile) storage.
JKUAT SODeL

Protection System
The various processes in an operating system must be protected
2015

from each others activities. For that purpose, various mecha-


nisms which can be used to ensure that the files, memory seg-
ment, cpu and other resources can be operated on only by those
processes that have gained proper authorization from th oper-
ating system.
JJ II For example, memory addressing hardware ensures that a
J I process can only execute within its own address space. The
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 25
HPS 2106 COMPUTER APPLICATIONS
timer ensures that no process can gain control of the CPU with-
out relinquishing it. Finally, no process is allowed to do its own
I/O, to protect the integrity of the various peripheral devices.
Protection refers to a mechanism for controlling the access of
JKUAT SODeL

programs, processes, or users to the resources defined by a com-


puter controls to be imposed, together with some means of en-
forcement.
2015

Protection can improve reliability by detecting latent errors


at the interfaces between component subsystems. Early detec-
tion of interface errors can often prevent contamination of a
healthy subsystem by a subsystem that is malfunctioning. An
unprotected resource cannot defend against use (or misuse) by
JJ II an unauthorized or incompetent user.
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 26
HPS 2106 COMPUTER APPLICATIONS
5.2.4. Networking
A distributed system is a collection of processors that do not
share memory or a clock. Instead, each processor has its own
local memory, and the processors communicate with each other
JKUAT SODeL

through various communication lines, such as high speed buses


or telephone lines. Distributed systems vary in size and function.
They may involve microprocessors, workstations, minicomput-
2015

ers, and large general purpose computer systems.


The processors in the system are connected through a com-
munication network, which can be configured in the number of
different ways. The network may be fully or partially connected.
The communication network design must consider routing and
JJ II connection strategies, and the problems of connection and secu-
J I rity.
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 27
HPS 2106 COMPUTER APPLICATIONS
A distributed system provides the user with access to the var-
ious resources the system maintains. Access to a shared resource
allows computation speed-up, data availability, and reliability.

5.2.5. Command Interpreter System


JKUAT SODeL

One of the most important components of an operating system


is its command interpreter. The command interpreter is the
2015

primary interface between the user and the rest of the system.
Many commands are given to the operating system by con-
trol statements. When a new job is started in a batch system or
when a user logs-in to a time-shared system, a program which
reads and interprets control statements is automatically exe-
JJ II cuted. This program is variously called
J I 1. the control card interpreter
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 28
HPS 2106 COMPUTER APPLICATIONS
2. the command line interpreter
3. the shell (in Unix), and so on. Its function is quite simple:
get the next command statement, and execute it.
The command statement themselves deal with process manage-
JKUAT SODeL

ment, I/O handling, secondary storage management, main mem-


ory management, file system access, protection, and networking.
In the following sections of this Chapter we show four im-
2015

portant components of the operating system. There are process


management, file organization, input/output, and memory man-
agement.
Example . What is Software?

JJ II Solution: Software refers to a set of programs, procedures and


J I related documentation within a computer system. It refers to
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 29
HPS 2106 COMPUTER APPLICATIONS
all computer programs whether general purpose or special pur-
poses. A program is a coded set of instructions that interprets
the information from the input and instructs the computer what
should be done with it. It is created by programmers, using pro-
JKUAT SODeL

gramming languages.


Exercise 1.  Describe the system software classifications


2015

JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation

Back Close 30

Potrebbero piacerti anche