Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
3 views17 pages

Operating System

operating system

Uploaded by

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

Operating System

operating system

Uploaded by

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

Definition.

An Operating system is a set of programs that is used to manage the basic hardware

resources of a computer and that controls the execution of user applications.

Examples of Operating Systems:

a. Windows

b. macOS

c. Linux

d. UNIX

e. Android

f. DOS (Disk Operating System).

USER 1 USER 2 USER N

SO SYSTEM
SOFTWARE
APPLICATION
SOFTWARE
FT
WA
OPERATING SYSTEM(OS)
RE

H
A
R CPU RAM I/O
D
W
A
The operating system consists two main parts:

Shell
 This is the outer part of an operating system used to interact with the

operating system.

 The shell acts an interface to kernel, hiding complexity of kernel's

functions from users. Takes commands from user and executes

kernel's functions

Kernel

 Core component of Operating System, interacts directly with

hardware, provides low level services to upper layer components.

 The kernel is responsible for managing and controlling computer

resources such as the processor, main memory, storage devices, input

devices, output device and communication devices.

Reasons why an Operating system is needed in a computer (why operating systems

were developed).

i. Modern computer systems are so complex & fast such that they need internal

control.

ii. To ensure that the full system software facilities are readily available.

iii. Due to the complexity of systems, jobs need to be controlled in what they are

allowed to do for security.


iv. To increase the throughput, i.e., to increase the amount of data that can be

processed through the system in a given period of time.

v. Improve communication between the user & the computer.

vi. To make complex tasks very simple for the user to carry out.

vii. It helps the computer to correct any problem that might occur.

- When an error occurs that can cause the computer to stop functioning, a

diagnostic message is displayed.

- The meaning of the message is then checked in the computer operations

manual.

viii. Reduces job setup time.

- When one job is running, other programs can be read onto the job queue. The

Input/Output devices can also be made ready without delay.

Functions of an Operating System.

1. 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 job 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.

2. 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

3. Memory allocation & loading of programs.

- Programs must be loaded into memory before they can be executed, and moved

out of memory when they are no longer required. Therefore, before processing

starts, the OS ensures that the programs are transferred into the available

memory location in the Main memory from the backing store, e.g. a disk.
- At any one given time, a number of tasks may require the memory so

that they can be accessed & processed by the computer. The computer

memory is a scarce resource, and therefore, the OS must determine which

task will remain in memory awaiting for execution and which one will be

sent back to secondary storage to wait.

NB/Virtual memory refers to a memory management method where computers use

secondary memory to compensate for the scarcity of physical memory.

Virtual memory enables data that is in RAM and not currently being used to be

transferred to the hard disk. This frees up room in RAM for other programs and data. When the

data on the hard disk is needed again, any other unused data is transferred to the hard disk before

the original data is transferred back to RAM.

4. Input/Output devices & ports management.

- Every computer has many Input & Output (I/O) devices. The OS controls

the input from & output to the various devices. It also tries to monitor the
state of each I/O device and signals any faults detected.

- During the course of their execution, programs will request the use of an Input

or Output device. In a multi- user system, conflicts are likely to occur when one

program requests a device that is being used by another program. Therefore, the

OS will control allocation of I/O devices and attempt to resolve any conflicts

that arise.

- Because most input/output devices are slower than the processor, the OS has

to control the flow of data from the time of input to the time the user receives

it as information. It ensures that the right data reaches the processor at the

right time.

- The OS also defines the various input/output ports found on the computer, e.g.,

printer port.

5. 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.


6. 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.

i. 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.

ii. 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.

iii. 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 - a software that the OS uses to control a specific piece of

hardware.

7. Management of secondary storage devices.

- The OS manages the storage & retrieval of data on secondary storage devices.

It also utilizes the free space on hard disks to enhance the performance of the

computer by temporarily holding tasks on it that were in RAM ready for

processing but have to wait for sometime.

Classification of Operating Systems.

- The OS determines 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:

1. Number of tasks that the system can perform concurrently. Single-tasking

(program) operating system.

Multi-tasking operating system.

2. Number of users the system can support at the same time. Single-user

operating systems.

Multi-user operating systems.

3. Human Computer interface (i.e., how the user & the computer

interacts). Command line.


Menu driven

interface.

Graphical

user

interface

(GUI).

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.

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.

Note. In multi-programming, the computer is able to work on several programs at

the same time.

It works on the programs on sequence, one after the other, and that at any given

instant it executes instructions from one program only. However, the computer

works so quickly that it appears to be executing the programs simultaneously.

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.

Multi-user (or multi access) OS.

A multi-user OS allows more than one user ( many people) to interactively

use/access the computer at the same time.

Examples;

UNIX,
Novell Netware, Ms-Windows 2000, Ms-Windows NT,
Linux, etc

Classification According to Human Computer Interface (HCI).

The term Human Computer Interface (HCI) refers to the method of interaction

between the computer & the user, and determines how easily the user can operate
the computer.

The HCI enables communication to & from between the user and the computer.

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.

Features/characteristics of a user-friendly HCI.

i. It should be relatively easy for the user to try to start using the system.

ii. The system should be self-contained, so that the user is not forced into accessing

manuals.

iii. The amount of effort & the information required for the user to get the

system complete required tasks should be minimal.

iv. The system should be robust & reliable, i.e., the user should be protected from

unexpected system actions, including system failures.

v. The system should be able to adjust to different levels of expertise between

users & also as users grow in competence.

vi. The user should be made to feel in control of what is going on.

vii. 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: -

1. Command driven interface.


2. Menu driven interface.

3. Graphical User Interface (GUI).

Command driven interface.

This is an interaction between the user & the computer that requires the use of

commands

The user types a command at the prompt found on a command line. The

computer then reads instructions from the command line and executes them.

Example;

To copy a file called Fruits.Dat from Hard disk C to Floppy disk A using MS-

DOS; type C:\ >COPY Fruits.Dat A:\ (press the Enter key for the command to be

executed).

Commands enable the user to quickly instruct the computer what to do.

Command-driven software is more flexible, but it is more difficult to learn.

The user must know what commands are available, what they do & how

they should be typed. For this reason, commands are most popular with

experienced technical persons, such as computer Operators, Programmers or in

situations where the end-user continually works with the same program and

has therefore mastered the commands. To make commands more user-

friendly, the following points need to be observed: -

i. The command words used should be descriptive VERBS that clearly

convey the intended action, e.g., PRINT, COPY, RENAME, DELETE,

etc.
ii. Unique abbreviations should be provided for more experienced

users, e.g., PRI, COP, REN, DEL, CHKDSK, etc.

iii. Multiple items on a single command line should

ALWAYS be separated by blank spaces. E.g., PRINT can

be used in the following ways: -

PRINT Report1 – prints the named document on the default printer.

PRINT Report1 Report2 Report3 – prints the three documents on the

default printer.

Examples of Command line interfaces:

MS-DOS,

Early versions of PC-DOS, OS/2, and UNIX.

Disadvantages of using command driven interfaces

They are more difficult to learn.

The user must know the

command to type. It is

less user-friendly.

It is not easy to use, i.e., one is required to master the command format/syntax.

Menu driven interface.

This type of interface provides the user with a list of program commands

displayed on the screen to choose from & a simple means of selecting between
them.

To activate a choice in the menu, one can use the Enter key, or move the

cursor until it is positioned at the desired choice & then press the activation

key so that the system can start acting upon the information given.

This interface is suitable for beginners and infrequent users who may have

difficulties in remembering commands.

There are 2 types of menus: -

Pull-down menus – are special types of menu used mostly in Windows.

Pop-up menus & Pop-down menus. These menus are made to appear above

or below an item on the screen in order to elicit/obtain a choice from a user.

Later versions of DOS have a menu driven interface called the DOS Shell or

DOS Editor.

Advantages of Menu driven interfaces

Menus provide many options to select from.

The user is presented with a choice and therefore, does not need to

master any commands. They are easier to use.

Graphical User Interface (GUI).

This is an interaction between the user & computer that involves issuing of
commands to the computer by activating certain small graphic images

displayed on the screen called Icons.

To issue a command, the icons can be selected using a pointing device like a

Mouse.

GUI is mostly found on Workstations or PCs fitted with graphic adapters able

to support highresolution graphics.

Examples of GUI based OS;

Presentation

manager of

OS/2, Ms-

Windows,

Linux,

Apple Macintosh.

Features of a graphical user interface.

Programs are represented graphically by use of Icons.

Commands are selected and issued using pointing devices,

e.g., Mouse, trackball. There is use of pull-down menus.

Programs open by displaying windows.

Advantages of using GUI based OS

They are user friendly.


Easy to learn & use.

Factors to Consider when Choosing an Operating System.

- The following factors should be considered when choosing an operating system for a

computer;

1. Hardware configuration of the computer, e.g., RAM memory size, hard disk

capacity, type of processor, etc.

2. Basic design of the computer, - i.e., is it an IBM or IBM compatible, or an Apple

computer?

3. Hardware compatibility.

4. User needs (requirements), i.e., the applications intended for the computer.

5. User friendliness or Human computer interface, i.e., is it Command line

based, Menu-driven or a Graphical user interface?

6. Availability in the market, e.g. Microsoft Windows based OS are very common.

7. Portability.

8. Cost – how expensive the OS is.

9. Reliability, i.e., can it run without crashing or hanging (stop responding to

commands).

10. The method of communication with the computer, e.g. the number of peripherals.

11. The method of operating the computer.

You might also like