Unit 1 OS
Unit 1 OS
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:
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
Bank statements.
Multiprogrammed OS
Multiprogrammed OS
Multiprogrammed OS
Multiprogrammed OS
Multiprogrammed OS
Advantages
Increased CPU utilization
Increased degree of
multiprogramming
Disadvantages
It should keep track of all jobs.
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.