0% found this document useful (0 votes)
2 views

Unit 1 OS

,........

Uploaded by

Omkar Rakhonde
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Unit 1 OS

,........

Uploaded by

Omkar Rakhonde
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

Government Polytechnic Jintur

Department of Computer Engg

Course Name: Operating System (OSY)


Course Code : 22516

M.A. Zahed
Lecturer
Unit I: Introduction to OS
System?
 A program that acts as an
intermediary between a user of
a computer and the computer
hardware
 Operating system goals:
• Execute user programs and make
solving user problems easier
• Make the computer system
convenient to use
• Use the computer hardware in an
efficient manner
Structure
 Computer system can be divided into four
components:
• Hardware – provides basic computing resources
 CPU, memory, I/O devices
• Operating system
 Controls and coordinates use of hardware among
various applications and users
• Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users
 Word processors, compilers, web browsers, database
systems, video games
• Users
 People, machines, other computers
Abstract View of Components of
Computer
What Operating Systems Do
 Depends on the point of view
 Users want convenience, ease of
use and good performance
• Don’t care about resource utilization
 But shared computer such as
mainframe or minicomputer must
keep all users happy
• Operating system is a resource
allocator and control program making
efficient use of HW and managing
execution of user programs
Organization
 Computer-system operation
• One or more CPUs, device controllers
connect through common bus
providing access to shared memory
• Concurrent execution of CPUs and
devices competing for memory
cycles
OS operations
Operations
 Bootstrap program – simple code to
initialize the system, load the kernel
 Kernel loads
 Starts system daemons (services
provided outside of the kernel)
 Kernel interrupt driven (hardware and
software)
• Hardware interrupt by one of the devices
• Software interrupt (exception or trap):
 Software error (e.g., division by zero)
 Request for operating system service – system
call
 Other process problems include infinite loop,
processes modifying each other or the operating
system
Process Management
 A process is a program in execution. It is a unit of work
within the system. Program is a passive entity;
process is an active entity.
 Process needs resources to accomplish its task
• CPU, memory, I/O, files
• Initialization data
 Process termination requires reclaim of any reusable
resources
 Single-threaded process has one program counter
specifying location of next instruction to execute
• Process executes instructions sequentially, one at a time,
until completion
 Multi-threaded process has one program counter per
thread
 Typically, system has many processes, some user, some
operating system running concurrently on one or more
CPUs
• Concurrency by multiplexing the CPUs among the
processes / threads
Activities
The operating system is responsible for the following activities in
connection with process management:

 Creating and deleting both user and


system processes
 Suspending and resuming processes
 Providing mechanisms for process
synchronization
 Providing mechanisms for process
communication
 Providing mechanisms for deadlock
handling
Memory Management
 To execute a program all (or part) of the
instructions must be in memory
 All (or part) of the data that is needed by the
program must be in memory
 Memory management determines what is in
memory and when
• Optimizing CPU utilization and computer response to
users
 Memory management activities
• Keeping track of which parts of memory are
currently being used and by whom
• Deciding which processes (or parts thereof) and data
to move into and out of memory
• Allocating and deallocating memory space as
needed
Storage Structure
 Main memory – only large
storage media that the CPU
can access directly
• Typically, volatile
• Typically, random-access
memory in the form of Dynamic
Random-access Memory (DRAM)
 Secondary storage –
extension of main memory
that provides large nonvolatile
storage capacity
Storage Structure (Cont.)
 Hard Disk Drives (HDD) – rigid
metal or glass platters covered
with magnetic recording
material
• Disk surface is logically divided
into tracks, which are subdivided
into sectors
• The disk controller determines
the logical interaction between
the device and the computer
 Non-volatile memory (NVM)
devices– faster than hard
Storage Hierarchy
 Storage systems organized in
hierarchy
• Speed
• Cost
• Volatility

Caching – copying information into
faster storage system; main
memory can be viewed as a cache
for secondary storage
Device Driver for each device controller to

manage I/O
Storage-Device Hierarchy
Protection and Security
 Protection – mechanism for
controlling access of processes
or users to resources defined by
the OS
 Security – defense of the system
against internal and external
attacks
• Huge range, including denial-of-
service, worms, viruses, identity
theft, theft of service
Views in OS
Views of OS
Users View
-If user is working on single
autonomous PC, then performance
is mostly taken into consideration.
OS is designed to give ease of use
and gain performance. In this case
optimum resource utilization will
not be given so much attention
Views of OS
Users View

-If many users working on


workstations connected to servers
they share the resources of server.
The information can be exchanged
between users.
Views of OS
System View

-OS is called as resource manager.


It manages processors, memory,
disks and other storage devices,
network interfaces, i/o devices, etc
Views of OS
System View

-The running program needs


resources and OS allocates it.
Some of the resources are
sharable and some are not.
-OS controls sharing of resources
among many executing programs/
processes.
Types of OS
Types of OS
Simple Batch System
Multi programmed OS
Real time OS
Multiprocessing System
Distributed OS
Batch OS
Batch processing is the execution
of a series of programs (jobs) on
a computer without manual
interventions.

Jobs are set up so they can be


run to completion without human
interaction. All input parameters
are pre defined through scripts,
command line arguments and
Batch OS
Batch OS
There is a less stress on
processor and it involves less
user interaction. (Batch- A set of
jobs with similar needs)

The computer operator can delay


or prioritize different batches
easily depending on
cicrumstances.
Batch OS
Thereis a very less interaction
between user and computer.

No mechanism to prioritize processes.

CPU is often idle.

Due to lack of protection scheme, one


batch job can affect pending jobs.
Example Batch OS
Payroll run for a company

Gas and electricity bill produced


by a batch system.

Bank statements.
Multiprogrammed OS
Multiprogrammed OS
Multiprogrammed OS
Multiprogrammed OS
Multiprogrammed OS
Advantages
Increased CPU utilization

Increasein throughput (no of


processes executed per unit
time)

Increased degree of
multiprogramming
Disadvantages
It should keep track of all jobs.

CPU scheduling is required.

Memory management is needed.


Real time OS (RTOS)
Real time OS (RTOS)
Real time OS (RTOS)
Real time OS (RTOS)
Real time OS (RTOS)
Time sharing OS

Time sharing OS





Distributed System
 Many machines in the same organization
can be connected together through LAN
and information can be transferred
between machines in a small amount of
time.
The distributed computer systems
appeared as a practical substitute to
uniprocessor and centralized systems.
Distributed System
 The networks of computers are present
all over.

All these networks separately and in


combination as well, share the
characteristics and work under
distributed system.
Distributed System
Types of distributed OS
Tightly coupled

Loosely coupled.
Types of distributed OS
Multiprocessor System
It offers support for multiple processors
having access to a shared memory.
The data structures are required by OS to
deal with hardware and are placed in
RAM.
Multiple processors can access these
data. So protection against simultaneous
access is needed to ensure consistency.
Multiprocessor System
Its main aim is to achieve high
performance. The key goal is to hide the
presence of number of CPUs from the
application/user.
All communication is made by
manipulation data at shared memory
location, and it is required to protect data
against concurrent access.
Multiprocessor System
Mobile OS
Itis used for phone tablets and
mobile like devices.
Personal digital assistants (PDA),
palm and pocket PCs are
handheld systems.
Concerning their less memory
and relatively slow processor
capacity, it is a job of OS to
manage all of them efficiently.
Android OS
Itcombines open source code
with closed third party
applications.

Its main goal is to support a rich


third party application
environment which needs a
stable implementations and API
for applications to run.
Thank You..!!!

You might also like