You are on page 1of 25

ITU 07210

OPERATING SYSTEMS
CONCEPTS

Lecture 2: Functions of Operating


System
What is Operating System

 An Operating System is the basic software of computers that provides an


interface between the computer programs and hardware.
• Operating system also provides a software platform on top to other
programs, they are called application programs (Application program: is
the software that helps the users to make typical functions, like making
text and etc
• Your choice of the operating system, determinates the great extent of the
application that you can run.
• The basic functions of the OS are managing machine resources,
coordinate the hardware and organize files and directories on storage
devices.
PREPARED BY ANOLD S.NKATA 2
Without OS no computer can be operated !!!

 That means, OS is regarded as the heart of living being


for a computer system.
 In other words, OS is defined as a program or suit
(support for) of programs that controls the entire
operation of the computer, such as recognizing input
from keyboard, sending output to the display screen
keeping track of files and directories on the disk and
controlling peripheral devices such as disk drives and
printers.
PREPARED BY ANOLD S.NKATA 3
Basic organization of operating
system

PREPARED BY ANOLD S.NKATA 4


Operating System Functions
 The functions of operating systems are as described below:
 I/O Management:
 OS manages I/O devices and makes the I/O process
effective.
 OS accepts the input from the input device, stores it in the
main memory, ask the CPU to process it and finally
provides the result to the output devices for output.

PREPARED BY ANOLD S.NKATA 5


Command Interpreter

 Command interpreter is one of the part of operating system

which reads the commands that user types in at a terminal,

interprets them and translate them into a detailed set of

instructions that the computer hardware can understand.


 It varies widely from one OS to other OS.

 Every OS must provide command interpreter for its operation.

PREPARED BY ANOLD S.NKATA 6


Memory Management
 Memory is the large array of words or bytes, each
with its own address.
 When user requests CPU for read/write operation,
OS determines the amount of memory required for
the program instructions and data.
 Then, OS allocates required memory to load the
program and data into RAM.
 When program terminates its memory area is free
and the same memory area is allocated for other
programs.
PREPARED BY ANOLD S.NKATA 7
Process Management

 OS finds the status of processor and


processes, chooses a job, chooses processer
in the job, allocates the processor to the
process and frees the processor when the
process is executed.

PREPARED BY ANOLD S.NKATA 8


Time Sharing
 OS manages the time of CPU
 The kernel OS checks frequency for other processes
requesting CPU time.
 Time-sharing checks for CPU request from higher
priority processes that are made every 10
milliseconds.
 When two or more processes at the same priority
level are competing for the CPU time, CPU time is
sliced into segments, defined by time slice and passed
from process to process in a round robin fashion,
preventing a single process from monopolizing the
CPU until it blocks or terminates.
PREPARED BY ANOLD S.NKATA 9
Security and Protection

 OS makes sure that only authorized users


get access to the computer and its data and
the users only do things they are authorized
to do.

PREPARED BY ANOLD S.NKATA 10


Deadlock Prevention
 During processing, a situation can arise in
which a resource shared by two or more
processes cannot continue because the
resource required by one process is held by
the other
 This situation is called deadlock.
 OS ensures that the above condition do not
hold by carefully allocating resources.

PREPARED BY ANOLD S.NKATA 11


Interrupt Handling

 Interrupt is a signal generated from a device or


program when they need attention of the CPU
 OS determines the type of interrupt and
priority of the interrupt,
 It stops the execution process of CPU,
preserves the initial state of the CPU,
 It perform the requested operation and brings
the CPU at the same state when it was
stopped.
PREPARED BY ANOLD S.NKATA 12
Virtual Storage:

If there are programs larger than main


memory (RAM) of the computer, OS uses the
reserved space in the secondary memory
which is termed as virtual memory. It makes
the execution of larger program (than RAM)
possible but at the same times the operation
becomes slower.

PREPARED BY ANOLD S.NKATA 13


Classification of Operating
System
 Operating systems can be classified as follows:
 Multi-user OS: is the one that concede two or more users to use their programs at
the same time. Some of O.S permits hundreds or even thousands of users
simultaneously.
 Multiprocessor OS: Supports opening the same program more than just in one
CPU.
 Multitasking OS: Allows multiple programs running at the same time.
 Multiprogramming OS: In a multiprogramming OS more than one programs can
be used at the same time.
 Multithreading: A process can be further divided into multiple sub-processers.
 Real-time OS:
PREPARED BY ANOLD S.NKATA 14
Multiuser OS

 In a multiuser OS, more than one user can use the same
system at a same time through the multi I/O terminal or
through the network.
For example: windows, Linux, Mac, etc.
 A multiuser OS uses timesharing to support multiple
users.

PREPARED BY ANOLD S.NKATA 15


 Multiprocessing OS
• A multiprocessing OS can support the execution of
multiple processes at the same time.
• It uses multiple number of CPU.
• It is expensive in cost however, the processing speed will
be faster.
• It is complex in its execution.
• Operating system like Unix, 64 bit edition of windows,
server edition of windows, etc. are multiprocessing.
PREPARED BY ANOLD S.NKATA 16
 Multiprogramming OS

• In a multiprogramming OS more than one


programs can be used at the same time.
• It may or may not be multiprocessing.
• In a single CPU system , multiple program are
executed one after another by dividing the CPU
into small time slice.
example: Windows, Mac, Linux,etc.

PREPARED BY ANOLD S.NKATA 17


Multitasking OS
 In a multitasking system more than one task can be performed at the same time but
they are executed one after another through a single CPU by time sharing.
 For example: Windows, Linux, Mac, Unix,etc.
Multitasking OS are of two types:
a) Pre-empetive multitasking
b) Co-operative multitasking
 In the pre-empetive multitasking, the OS allows CPU times slice to each
program. After each time slice, CPU executes another task. Example: Windows
XP
In co-operative multitasking a task can control CPU as long as it requires .
 However, it will free CPU to execute another program if it doesn’t require CPU.
Example: windows 3.x, multifinder,etc.
PREPARED BY ANOLD S.NKATA 18
 Multithreading
• A program in execution is known as process.
• A process can be further divided into multiple sub-processers.
• These sub-processers are known as threads.
• A multi-threading OS can divide process into threads and
execute those threads.
• This increases operating speed but also increases the
complexity. For example: Unix, Server edition of Linux and
windows.
PREPARED BY ANOLD S.NKATA 19
Batch processing
A batch processing is a group of processing system in which all the required inputs
of all the processing task are provided initially.
The result of all the task are provided after the completion of all the processing
Its main features are
i. Multiple task are processed.
ii.  User cannot provide input in between processing.
iii. It is appropriate only when all the inputs are known in advance.
iv. It requires larger memory.
v. CPU idle time is less.
vi. Printer is the appropriate output device
vii. It is old processing technique and rarely used at present.
PREPARED BY ANOLD S.NKATA 20
Types of Operating System

 There is no universal types of Operating systems today.


 However, the OS types can be discussed based on various basis :
1. On the basis of Processing :
i. Batch Processing OS
ii. Multitasking OS
iii.  Multiprocessing OS
iv.   Multiprogramming OS
v.   Real-time OS
vi.    Multithreading OS
PREPARED BY ANOLD S.NKATA 21
2. On the basis of Processing:
i. CUI
ii.    GUI
3. On the basis of mode of user
iii. Single user OS
iv. Multiuser O
PREPARED BY ANOLD S.NKATA 22
Interrupt
 Interrupt: It is an events that makes the processor stop
executing its program to perform some requested activity.
 An interrupt is a signal to the processor emitted by
hardware or software indicating an event that needs
immediate attention.
 Whenever an interrupt occurs, the controller completes
the execution of the current instruction and starts the
execution of an Interrupt Service Routine (ISR)
or Interrupt Handler.
PREPARED BY ANOLD S.NKATA 23
There are two types of interrupts
they are:
 Hardware Interrupt: Interrupts generated by hardware devices such as
keyboard, mouse, printer or chips on the system board is called hardware
interrupt.
 Some examples of hardware interrupt are video card wants memory
access, USB scanner has data, mouse moves, key pressed on keyboard,
etc.
 Software interrupt: Interrupts signals generated or caused by the
programs or software are called software interrupts.
 Some examples: interrupt generated by the ROM BIOS during the start
up for the computer, virus threat notification by the antivirus software,
etc.
PREPARED BY ANOLD S.NKATA 24
END

You might also like