Chap 1 Introduction to Operating System
Chap 1 Introduction to Operating System
COMPUTER SCIENCE
Sem-V
TITLE OF PAPER : Operating Systems - I
Course Code : CS-351 :
Credits - 2
1) Convenience: An OS is designed or
constructed in such as way that it makes the
Computer System more convenient to use.
2) Efficiency: An OS allows the computer
system resources to be used in an efficient
manner.
3) Ability to evolve: An OS should be designed
or constructed in a such a way that the
testing , development as well as addition of
new system components could be performed
effectively without interfering with existing
services.
Categories of OS
5) Distributed OS
6) Time Sharing OS
7) Multiprogramming OS
8) Batch Processing OS
9) Multithreading OS
10) Multiprocessing OS
11) Network OS
12) Embedded OS
13) Mobile OS
Definition:
Memory
Management
Input/Output
Management
File
Management
Device
Management
Security
Command Interpretation
Job Priority
Functions of operating systems
1) Process Management:
The process management module of an
operating system take care of the creation
and deletion of processes, scheduling of
various system resources to the different
processes requesting them and providing
mechanism for synchronization and
communication among processes.
Functions of operating systems
2) Memory Management:
To execute a program, it must be loaded,
together with the data it accesses in the main
memory.
To improve CPU utilization and to provide
better response time to its user, a computer
system normally keeps several programs in
main memory.
The memory management module of an
operating system takes care of the allocation
and deallocation of memory space to the
various programs in need of this resource.
Functions of operating systems
3) Input/output Management:
One of the purposes of an operating system is to hide the
peculiarities of specific hardware devices from the user.
5) Device Management:
A computer system normally consists of several l/O
devices such as terminal, printer, disk, and tape. The
device management module of an operating system
takes care of controlling all the computers l/O devices.
It keeps track of l/O request from process, issues
commands to the l/O devices and ensures correct data
transmission to/from and I/O devices.
It also provides an interface between the device and
the rest of the system that is simple and easy to use.
Often, this interface is device independent, that is, the
interface is same for all types of I/O devices.
Functions of operating systems
6) Security:
Computer systems often store large amount of
information, some of which is highly sensitive and
valuable to their users.
Users can trust the system and rely on it only if the
various resources and information of a computer
system are protected against destruction and
unauthorized access.
The security module of an operating system ensures
this. This module also ensures that when several
disjoint processes are being executed simultaneously
one process does not interfere with the others, or with
the operating system itself.
Functions of operating systems
7) Command Interpretation:
A user communicates with the operating system, for
using the various operations, via a set of command
provided by the operating system.
The operating system also provides a simple
language, known as command language (CL) using
which a user can put several commands together
from the command set to describe the resource
requirements of the job.
The command interpretation module of an operating
system take care of interpreting user command,
supplied individually or in the form of command
language and directing the system resources to
handle the request.
Functions of operating systems
8) Job Priority:
Establishment and enforcement of a job
priority system, i.e., it determines the order
in which jobs are to be executed in the
computer system.
What does an OS do?
When DOS was originally written its developers had no idea how big
and important it would eventually become.
It was written by a few programmers in a relatively short amount of
time, without the benefit of modern software engineering
techniques, and then gradually grew over time to exceed its original
expectations.
It does not break the system into subsystems, and has no distinction
between user and kernel modes, allowing all programs direct access
to the hardware.
MS-DOS – written to provide the most functionality in the least
space
Not divided into modules
MS-DOS Layer Structure
written for intel
8088
Provides no dual
mode and no
hardware
protection
MS-DOS Layer Structure
Advantage of Simple Structure:
MS-DOS – written to provide the most functionality in the
least space
User
Shell
Kernel
Device Controllers
Layered Approach
Benefits:
Easier to extend a microkernel
All new services are added to user space without modifying the
kernel
Easier to port the operating system to new architectures
More reliable (less code is running in kernel mode)
More secure
Disadvantages
The performance of microkernel decreases due to increased
function overheads
Architecture of a typical microkernel
Modules
Advantages
1) Each computer in the peer to peer computing Manages
itself. So, the network is quite easy to set up and
maintain.
2) It is easy to scale the peer to peer network and add
more nodes
3) In this the cost of the server is saved
Disadvantages:
1) It is difficult to backup the data as it is stored in
different computer system and there is no central server.
2) It is difficult to provide overall security in the peer to
peer computing as each system is independent and
contains its own data.
Open source operating System
Its a OS whose code has been made publicly and freely available to anyone
who want to see it and modify it
Its available in Source code format instead of Compiled binary code.
Open source is a term that originally referred to Open Source Software(OSS).
It is released under licence where the copyright holder allows other to study,
change as well as distribute the software to other people without any cost or
charges.
E.g GNU/ Linux released under GNU General Public Licence(GPL).
Advantages :-
1) Its Available Freely on Internet without any charges
2) User can modify and edit changes as per their choice and requirement
Disadvantages:-
3) Constant updates are headaches sometimes as users have to keep updating
their system and code
4) Frequent modifications are challenges for users to decide which Open source
system is better.
5) Sometimes Hardware not Compatible with this System.
Booting
2) Program execution:
To get any work done from computer, user
writes a program. Operating system must let
the user to load his program into memory and
execute it. Execution of program must end
normally or abnormally.
3) Input/Output operations:
Operating system must provide means to
perform I/O for any of user program. I/O
operation can be performed from file or
input/output device.
Operating System services
4) File system Manipulation:
Files are used by users for different purpose. There
should be some means to perform operations like
read/write, create/delete etc on file.
5) Communication:
It refers to communication that takes place among the
different processes which may be present on the same
machine/computer or another machine/computer
connected through computer network.
Communication might happen that processes need to
communicate with each other for some purpose like data
transfer between two processes.
Communication may be implemented by two methods:
shared memory, message passing.
Operating System services
6) Error Detection:
An error is one of the parts of the
system that may cause malfunctioning of the
complete system. Error may occur in CPU
and memory hardware, user program (due to
wrong/illegal memory access/operations),
input/output (e.g. keyboard not connected
properly, printer out of paper etc.).
Operating system must be aware of such
error and must be able to take appropriate
actions to ensure correct and consistent
computing.
Operating System services
Consider the above example i.e. to copy one file into another file
Initially we need to input two filenames- input file and output file.