Design and Analysis of Algorithms
Design and Analysis of Algorithms
Design and Analysis of Algorithms
Algorithms
MS. UMA.S
ASSISTANT PROFESSOR
COMPUTER SCIENCE/COMPUTER APPLICATIONS
THIRUVALLUVAR UNIVERSITY COLLEGE OF ARTS AND SCIENCE
TIRUPATTUR – 635901
Unit I
Operating Systems Basics
UNIT-I (II M.Sc)
Algorithm Analysis – Time Space Tradeoff – Asymptotic Notations – Conditional
asymptotic notation – Removing condition from the conditional asymptotic
notation - Properties of big-Oh notation – Recurrence equations – Solving
recurrence equations – Analysis of linear search.
UNIT -I: ALGORITHM AND ANALYSIS
What is an Algorithm? - Algorithm Specification- Performance Analysis-
Randomized Algorithms.
Unit I
Basic Concepts of Operating System
Services of Operating System
Classification of Operating System
Architecture and Design of an Operating System
Process Management
Introduction to Process-Process State
PCB
Process Scheduling
Interprocess Communication
Basic Concepts of Operating Systems
Introduction
Definition – OS
Goals of OS
Types of OS
INTRODUCTION
OPERATING SYSTEMS – OS
An important part of almost every computer systems
A computer system can be divided into 4 components
:
The hardware
Operating system
Application programs
User
Hardware - CPU, memory and I/O devices –
Provides the basic computing resources
Application Programs - compilers, database systems,
games and business programs
Define the ways in which these resources are used to solve the
computing problems of the users.
Users
Many different users –people, machines, other computers
Trying to solve different problems
Accordingly there may be many different applications
Operating System – controls and coordinates
the use of the hardware among the various
application programs for the various users
OS – Government
Components of the computer systems
Hardware
Software
Data
Memory hardware
I/O devices
User Programs
For each type of error, OS should take the appropriate
action to ensure correct and consistent computing
Resource Allocation
Many different types of resources are managed by the
OS.
When there are multiple users or multiple jobs running
at the same time, resources must be allocated to each
of them
Accounting
To keep track
which users used
how much and what kinds of computer resources
Record keeping may be for
Accounting or accumulating usage statistics. (to
improve the computing services)
Protection
When several disjoint processes execute concurrently
it should not be possible for one process to interfere with
the other or with the OS itself
Protection involves ensuring that all access to system
resources is controlled.
Security from outsiders is also important
Requires authentication - Passwords
Classification of Operating System
Clock
Peripheral Devices
It is called parallel system, because numbers of
processors are executing their jobs in parallel.
A multiprocessor OS controls and manages hardware and
software resources
such that user can view the entire system as a
powerful uniprocessor system as he is not aware of
multiprocessor system and interconnection network.
The major issues of Multiprocessor OS
are
Process synchronization
Task scheduling
Memory management
Security and protection,
sincemain memory is shared among many physical
processors.
Multiprocessor systems can be
Symmetric Multiprocessing System
Each processor runs an identical copy of the OS and these copies
communicate with one another as needed.
Asymmetric Multiprocessing Systems
Each processor is assigned a specific task
A master processor controls the system, others gets instruction from
master
Master-Slave relationship
Master Processor Schedules and allocates work to the slave processors
Advantages
Resource sharing
Computation Speedup
Reliability
Communication
Resource Sharing
Sharing of files at remote sites
Processing information in a distributed DB
Printing files at remote sites
Computation SpeedUp
Computation – Partitioned into a number of Sub
computations
Runs Concurrently
Ifany site is currently overloaded with jobs, some of
them may be moved to other, lightly loaded sites
Load Sharing
Reliability
If one site fails in a distributed systems, the remaining
sites can continue operating.
Communication
Processes at different sites can exchange information
Real Time Operating System
Real-time systems is used when there are rigid time
requirements on the operation of a processor or the flow of
data.
Used as a control device in a dedicated application
Systems that control
scientific experiment
Medical imaging systems
Industrial control systems
Fuel-injection systems
Home-Appliances controllers
Weapon Systems
defined as those systems in which the correctness of the system depends not
only on the logical result produced, but also the time at which the result
produced.
User convenience and resource utilization are secondary concern to these
systems.
Real time systems have many events that must be accepted and processed in
a short time or within certain deadline.
RTOS – has well-defined constraints or the system
will fail.
RTSystem is considered to function correctly
only if it returns the correct result within any
time constraints
Such applications include:
Rocket lunching
Flight control
Robotics
Telephone switching equipment
Fire and smoke sensor etc.
Real time systems are classified into two categories:
Hard Real Time System
Soft Real Time System
Hard Real Time System