Operating System
Presented By….
Rahul Saha
PGDM-(09-11)
Section –B
Definition of OS & Need of OS
Ø It is an integrated set of programs that
controls the resources(the CPU, memory, I/O
devices, etc.) of a computer System.
It also provides its users with an interface
or virtual machinethat is more convenient to
use than the bare machine.
Ø Two primary objectives of an OS are:
Ø
o Making a computer system convenient to us
o Managing the resources of a computer system
Main Functions of an OS
Process management
Memory management
File management
Security
Command interpretation
Logical Architecture of a
Computer System
The operating system
layer hides the details of
Computer hardware from
the programmer and
provides the programmer
with convenient
interface
for using the system
Parameters for Measuring System
Performance
üThroughput: Amount of work that the system
is able to do per unit time
üTurnaround time: Interval from the time of
submission of a job to the system for
processing to the time of completion of the
job
üResponse time: Interval from the time of
submission of a job to the system for
processing to the time the first response for
the job is produced by the system
Process Management
A process (also called job) is a program in
execution.
Process management manages the processes
submitted to a system in a manner to
minimize idle time of processors (CPUs, I/O
processors, etc.) of the system
Multiprogramming
Uniprogramming: Only one job is
processed at a time and all
system resources are available
exclusively for the job until its
completion.
Multiprogramming: Interleaved
execution of two or more different
and independent programs by
computer.
Types of Multiprogramming:
Multiprogramming with fixed
tasks (MFT): Fixed number of
jobs can be processed
concurrently.
Multiprogramming with variable
tasks (MVT):Number of jobs can
vary. Area occupied by each
job residing simultaneously in
the main memory is known as
memory partition.
Requirements of Multiprogramming
Systems
Large memory
Memory protection
Job status
preservation
Proper job mix (CPU
and I/O bound
jobs)
CPU scheduling
Multitasking
Interleaved execution of multiple jobs (often
referred to as tasks of same user) in a single-
user system.
Computer systems used for multitasking are
uniprocessor systems (having only one CPU).
Treated differently from multiprogramming that
refers to interleaved execution of multiple
jobs in a multi-user system
Multithreading
Thread is basic unit of CPU utilization.
threads share a CPU in the same way as
processes do.
All threads of a process also share the same
set of operating system resources.
All threads of a process inherit parent’s
address space and security parameters.
Each thread of a process has its own program
counter, its own register states, and its
own stack.
Referred as mini-process or lightweight
process.
Multithreading System
(a)Single-threaded and (b) multithreaded
processes. A single-threaded process
corresponds to a process of a traditional
operating system.
Multiprocessing
System with two or more CPUs having ability to execute
multiple processes concurrently.
Multiple CPUs are used to process either instructions from
different and independent programs or different
instructions from the same program simultaneously.
Types of multiprocessing:
ü Tightly-coupled: Single system-wide primary memory shared
by all processors.
ü Loosely-coupled: Each processor has its own local memory
Time-sharing
Simultaneous interactive use of a computer system by
many users in such a way that each one feels that
he/she is the sole user of the system.
User terminals connected to the same computer
simultaneously.
Uses multiprogramming with a special CPU scheduling
algorithm.
Short period during which a user process gets to use
CPU is known as time slice, time slot, or quantum.
CPU is taken away from a running process when the
allotted time slice expires.
Memory Management
Memory management
module:
Keeps track of parts
of memory in use
and parts not in
use
Allocates memory to
processes as
needed and
deallocates when
no longer needed
Multiprogramming Memory Models
With variable number
With fixed number of
of memory Partition
Memory Partition
Virtual Memory
Memory management Virtual Memory Realization
scheme that allows On-line secondary storage
execution of
processes that Swapping
might not be
completely loaded Demand paging
in the main
memory
It does not require
the entire process
to be in memory
before the process
can execute
File Management
A file is a collection of related information.
Ø
Ø File Access Methods:-
Ø Sequential access
Ø Random access
Ø File Operations
Ø
Ø File Naming
Ø
Ø File Extensions :- .bas; .c; .jpg etc.
.
Ø
Ø
Ø
Ø
Security
User authentication: Deals with the problem of
verifying the identity of a user (person or
program)before permitting access to the requested
resource
Access Control: Once authenticated, access control
mechanisms prohibit a user/process from accessing
those resources/information that he/she/it is not
authorized to access
Cryptography: Means of encrypting private
information so that unauthorized access cannot use
information
Example of Operating Systems
vUnix OS
vMS-Dos
vMicrosoft Windows
qWindows 98
qWindows 2000
qWindowsNT
v
v
Thank you