Operating System - Russian Center of Science & Culture ...

jaspersugarlandSoftware and s/w Development

Dec 14, 2013 (3 years and 8 months ago)

71 views

This document is downloaded from
www.sushilupreti.com.np

1

of

4

mail@sushilupreti.com.np



Chapter


6
O
perating System (OS)


Definition:

A collection of software written to provide the fundamental instructions that a computer needs to manage
resources, such as memory, the file system, and processes is called an Operating System. In other words,

OS
is a master program that controls a computer's basic functions and allows other programs to access the
computer's resources such as disk drive, printer, keyboard, and screen.

Examples of operating systems include MS Windows 95, MS Windows NT, Windows X
P, UNIX, DOS and
OS/2.


Functions of Operating System:

The main functions of OS are:

1.

It manages the hardware and software resources of the system. In a
desktop computer
, these resources
include such

things as the
processor
,
memory
, disk etc.

2.

It provides a stable, consistent way for applications to deal with the hardware witho
ut having to know all
the details of the hardware.


Functions of OS in detail:

OS acts as an interface between hardware and users. It controls overall operations of computers. It is mainly
used for job management, data management, virtual memory management
, input/output management, process
management, security etc.


a)

Job Management
:

OS manages the job waiting to be processed. It recognizes the jobs, identifies their
priorities, allocates the memory for the job, schedules and finally runs each job at the appr
opriate
moment.

b)

Data Management
:

Data management keeps track of the data on disk, tape and optical storage
devices. The operating system's file system knows where that data are physically stored.

c)

Virtual Storage Management
:

OS is used for virtual memory ma
nagement. OS makes possible to
increase the capacity of main memory with out actually increasing its size.

d)

Input/output

Management
:

OS manages the input and output operation of computer. This applies to
the flow of data among the different devices of compu
ter and application programs.

e)

Process Management
:

The main activities of process management are job queuing, job scheduling,
keeping track of the status of each process etc.

f)

Protection and

Security
:

OS job is to secure data inside the memory of computer. O
perating systems
provide password protection to keep unauthorized users out of the system.

g)

User Interface
:

OS acts as an interface between a user of a computer and the computer hardware.


Role
s
/Purpose
s of Operating System

a)

Easy interaction between human an
d computer.

b)

Starting computer operation automatically.

c)

Loading and scheduling users’ programs/processes.

d)

Controlling I/O devices

e)

Managing various types of memories such as primary, secondary, cache etc.

f)

Providing security to users’ jobs and files.

g)

Accounti
ng hardware resources and handling network communication.

h)

Allowing users to share data and software among themselves.

i)

Preventing the system from unauthorized user, programs etc.


Types of Operating System

Within the broad family of operating systems, there

are generally four types, categorized based on the types of
computers they control and the sort of applications they support. The categories are:

a)

Single
-
user, single task Operating System
:

As the name implies, this operating system is designed to manage t
he computer so that one user can
effectively do one thing at a time. The MS
-
DOS, PC
-
DOS etc are single user OS.




This document is downloaded from
www.sushilupreti.com.np

2

of

4

mail@sushilupreti.com.np



b)

Single
-
user, multi tasking Operating System
:

This operating system allows a computer to perform more than one task at a time. Microsoft's Win
dows
and Apple's Mac OS (Leopard) platforms are both examples of operating systems that will let a single
user have several programs in operation at the same time.

c)

Multi
-
user Operating System
:

A multi
-
user operating system allows many different users to ta
ke advantage of the computer's resources
simultaneously. UNIX, VMS and mainframe operating systems, such as
MVS
, are examples of multi
-
user
operating systems.

d)

Real
-
time Operating System (RTOS)
:

Real
-
time operating systems are used to control machinery, sc
ientific instruments and industrial systems.
Some examples of real time operating systems are BLMX, BSO/RTOS etc.

BLMX = Board
-
Level Multitasking eXecutive

BSO/RTOS = Boston Systems Office/ Real
-
time Operating System


User Interface

Interface is a common b
oundary between the user and the computer system. OS provides two types of User
interface.

a)

CUI (Command User Interface)
:

A CUI (command user interface) is a user interface to a computer's
operating system

or an
application

in
which the user responds to a visual prompt by typing in a command on a specified line, re
ceives a
response back from the system, and then enters another command, and so forth. MS
-
DOS and UNIX are
CUI operating systems.

b)

GUI (Graphical User Interface)
:

GUI is graphical user interface. It is user friendly and easy to understand and use. A GUI use
s
windows
,
icons
, and
menus

to carry out commands such as opening f
iles, deleting files, moving files, etc. and
although many GUI Operating Systems are operated by using a
mouse
, the keyboard can also be used by
using
keyboard shortcuts

or
arrow keys
.

A few examples of a GUI Operating Systems:

Microsoft Windows 95
,
Apple Mac OS

etc.

A few examples of a GUI interfaces are:

GNOME
,
KDE

etc.


Differentiate between CUI and GUI OS


GUI

CUI

It is based on graphical user interface mode.

It is based on command user interface mode.

It is graphical and user friendly.

It is more
textual and less user friendly.

It is very common.

It is less common.

It uses keyboard and mouse.

It uses only keyboard.

It consists of different components such as
text box, icon, desktop, pointing device etc.

It does not consist such components.

E.g
. MS
-
Windows OS

E.g. MS
-
DOS OS


Some Technical Terms


Buffering



A buffer is a region of
memory

used to temporarily hold
data

while it is being moved from one place to
another. Typically, the data is stored in a buffer as it is retrieved from an
input device

(such as a keyboard)
or j
ust before it is sent to an output device (such as a printer). However, a buffer may be used when
moving data between
processes

within a computer. So, buffering i
s a process of placing the data in a
buffer in order to increase the processing capability of a device.


Spooling (Simultaneous
Peripheral

Operations On
-
Line)



In
computer sc
ience
, spooling refers to a process of transferring data by placing it in a temporary working
area where another program may access it for processing at a later point in time. The term 'spool' is an
acronym of 'Simultaneous Peripheral Operations On
-
Line'.

This temporary working area could be a
file

or
storage device
, but probably not a
buffer
.

For example:

By using a process spooling, multiple users can send jobs to a printer simultaneously. When
users send documents (known as print jobs) to a networked printer, each job is store
d temporarily on the
This document is downloaded from
www.sushilupreti.com.np

3

of

4

mail@sushilupreti.com.np



file server. As the printer finishes printing the current job, the file server sends the next job to the printer
so that it can be printed).


Virtual Memory



Virtual memory is the use of secondary storage devices as an extension of the
primary storage of the
computer, thus giving the appearance of a larger main memory than actually exists.

Paging
:



In
paging

system, each process is divided into a number of fixed length blocks called 'pages',
typically 4K bytes in length. Memory space is v
iewed as a series of 'page
-
frames' of the same
size. When a process is to be executed, only the pages that are immediately required are loaded
into memory.

Swapping:




In a virtual memory system, Swapping is a technique in which high priority process is swa
p in
main memory and low priority process from main memory is swap out. When high priority
process is completed, low priority process is swap in again.


Multiprogramming



It is a form of processing in which a computer holds more than one program in memory
and works on
them in round
-
robin fashion that is, by sharing out the processor's time so that each program receives
some attention some of the time. This way of working is in contrast to using the processor to run one
program at a time.


Multitasking



Multi
tasking, in an
operating system
, is allowing a user to perform more than one computer
task

(such as
the operation of an
application program
) at a time. Microsoft
Windows 2000
, IBM's
OS/390
, and
L
inux

are examples of operating systems that can do multitasking (almost all of today's operating systems can).
When you open your Web
browser

and then open
word

at the same time, you are causing the operating
system to do multitasking.


Multi
-
threading



Multi
-
threading is the ability of an
operating system

to
execute

different parts of a
program
, called
threads, simultaneously.
The
programmer

must carefully design the program in such a way that all the
threads can
run

at the same time without interfering with e
ach other.


Job Scheduling



Job scheduling
not only

assigns priority to jobs but also admits new jobs for processing at appropriate
times. When a user job is submitted, the system takes note of its time of arrival, processing requirement
etc. Considering al
l these factors, the scheduling
techniques are

chosen. There are two types of scheduling

a)

Non
-
Preemptive Scheduling:

In non
-
preemptive scheduling, a scheduled job always completes before
another scheduling decision is made.

b)

Preemptive Scheduling:

In preemp
tive scheduling, a scheduling decision can be made even while the
job is executing.

Some scheduling algorithms are:

a)

FCFS (First Come, First Serve

b)

SJF (Shortest Job First)

c)

Priority Scheduling

d)

Round Robin Scheduling

e)

Multilevel Feedback Queue

Scheduling

f)

Multilevel queue

Scheduling


Interrupt Handling



An interrupt is a signal g
enerated by an event that alters the sequence in which a processor executes
instructions. To handle interrupt Operating System has one special routine called ISR (Interrupt Service
Routine).

Hardware interrupt
:

A signal created and sent to the CPU that is
caused by some action taken by a
hardware device is called hardware interrupt. For example, keystroke depressions and mouse movements
cause hardware interrupts.

This document is downloaded from
www.sushilupreti.com.np

4

of

4

mail@sushilupreti.com.np



Software interrupt
:

A software interrupt, also called an exception, is an interrupt that is cau
sed by
software
, usually by a
program

in
user mode
. Examples of events that cause them are requests by
an
application program

for certain services from the operating system or the termination of such programs.


Choices of Operating System

DOS



Acronym for “Disk Operating System”.
DOS is a 16
-
bit, single
-
user

operating system that does not
support multi
-
tasking. It is far easier to administer than UNIX, but less powerful. Compared to graphical
interfaces such as Windows and Mac OS X, it's also not particularly user
-
friendly.


Microsoft
Windows Operating System



The Windows operating system is developed and maintained by Microsoft, the company founded by Bill
Gates. The first version was released in 1985. Since then, it has grown significantly, and it now dominates
the market.
Windows

uses a graphical user interface to make it easier for people to use their computers.
The primary ways that people
navigate

are through icons on the desktop and th
e Start menu.

The Windows operating system, like the
Macintosh

and
Linux
, allows people to manage files and run
software programs on desktop and laptop computers.


UNIX



UNIX (p
ronounced as YOO
-
niks) is a computer
operating system

originally developed in 1969 by a group
of
AT&T

employees at
Bell Labs
. UNIX runs on many types of computers, including supercomputers,
notebook PCs, mainframes and minicomputers. Its main a
bility is that it works with so many kinds of
hardware.


LINUX



Linux is a generic term that commonly refers to
Unix
-
like

computer
operating systems

that use the
Linux
kernel
. Linux is one of the most prominent examples of
free software

and
open source

development;
typically all the underlying
source code

can be

used, freely modified, and redistributed by anyone.

Ubuntu
,
NepaLinux
,
UserLinux

etc are few examples of Linux distributions.


Data Processing

Data processing is any
computer

process

that converts
data

into
information

or
knowledge
.

There are many
types of data processing techniques. Some of them ar
e:

Batch Processing
:

It is also called deferred Processing or off
-
line processing in which tasks are stored in the form of batches and
processed each batches as requirement. It is a slow process of data processing. The purpose of batches is to
give full co
ntrol over the data as it is easier to handle a batch at a time.

On
-
line Processing
:

The on
-
line processing is a fast processing in which input device is directly connected to computer. It is also
called direct access or random access processing. In this
processing result of data processing transaction is
available immediately. E.g. ATM (Automated Teller Machine).

Real
-
time Processing or Multi
-
tasking
:

Real time means immediate response from computer. The essential feature is that the input data must be
p
rocessed quickly enough so that further action can be promptly taken on the result.

Distributed Data Processing
:

A data

processing system in which processing is
decentralized

with the computers and storage devices
at
different
geographical locations
.