Unit I - OS
Unit I - OS
Introduction to OS
OS
05/31/24 Unit I/1- Introduction to OS 1
Introduction to OS
1. Introduction to Operating System (OS)Concepts
•Multitasking
•Multiprogramming
•Multiuser
•Multithreading
OS
05/31/24 Unit I/1- Introduction to OS 2
Introduction
2. Types of Operating Systems
to OS
•Batch Operating System
•Time–sharing Systems
•Distributed OS
•Network OS
•Real–Time OS
•Interactive Systems
•Time Slicing
OS
05/31/24 Unit I/1- Introduction to OS 3
Introduction to OS
3. Various Operating System Services
1. User Interface
2. Program Execution
3. I/O Operations
4. File-System Manipulation
5. Communications
6. Error Detection
OS
05/31/24 Unit I/1- Introduction to OS 4
Introduction to OS
4. . Architecture
5. System Calls and Programs
6. Exam Questions
OS
05/31/24 Unit I/1- Introduction to OS 5
Introduction to Operating
System Concepts
• Operating System (OS)
• Resources of a Computer System
• User View
• System View
OS
05/31/24 Unit I/1- Introduction to OS 6
Introduction to Operating
System Concepts
• Objectives and Functions of
OS
• Multiprogramming
• Multitasking
• Multiuser
OS
05/31/24 Unit I/1- Introduction to OS 7
Operating System (OS)
Defn1: OS is software that manages
computer hardware and software resources
and provides common services for
programs.
•
Defn2: Controls and coordinates use of
Hardware among Various Applications
and Users
– Operating system
• Controls and coordinates use of hardware
among various applications and users
OS
05/31/24 Unit I/1-Introduction to OS 12
Computer System Structure
• Computer system can be divided into four
components:
– Application programs – define the ways in
which the system resources are used to solve the
problems of the users
• Word processors, compilers, web browsers,
database systems, video games.
– Users
• People, machines, other computers
OS
05/31/24 Unit I/1-Introduction to OS 13
Resources of a Computer System
Hardware and Software
required to solve a
problem
CPU Time
Memory Space
File Storage Space
I/O Devices …
Four Components of Computer System
OS
05/31/24 Unit I/1-Introduction to OS 14
User View
Varies according to the interface used
Goal……
To maximize the work, the user is performing
• Ease of use
• Performance
• Resource utilization
Minicomputer
• Share Resources
• Exchange Information
• Designed to maximize Resource utilization
All Available CPU Time, Memory and I/O used
efficiently
05/31/24 Unit I/1-Introduction to OS 15
OS
User View (contd.)
• Workstations (Perform Effective Resource
Sharing)
• Connected to Networks of other workstations
and Servers
OS
05/31/24 Unit I/1-Introduction to OS 17
User View (contd.)
• Embedded Computers in Home Devices and
Automobiles (Performance)
• Have Numeric Keypads
• May turn indicator lights on or off to show status
• Designed primarily to run without user
intervention
OS
05/31/24 Unit I/1-Introduction to OS 18
System View
Most intimately involved with Hardware
• Resource Allocator
• Acts as Manager of Resources.
OS
05/31/24 Unit I/1-Introduction to OS 20
Objectives and Functions of
Operating System
• Primary Goals-
User friendly
Efficient Operation of the Computer System
Essential part of a Computer System
• Purpose: To provide an environment in which a
User can Execute Programs in a Convenient and
Efficient manner.
• Program that acts as an intermediary between the
User of a Computer and the Computer Hardware OS
05/31/24 Unit I/1-Introduction to OS 21
Objectives and Functions of Operating System
• Must Ensure Correct Operation of Computer
System
OS
05/31/24 Unit I/1-Introduction to OS 23
Storage-Device
Hierarchy
OS
05/31/24 Unit I/1-Introduction to OS 24
Computer-System
Most systems Architecture
use a single general-purpose processor
.
Most systems have special-purpose processors as
well
Multiprocessors systems growing in use and
importance
Also known as parallel systems, tightly -coupled
systems
Advantages include
1.Increased throughput
2.Economy of scale
3.Increased
05/31/24
reliability – fault
Unit I/1-Introduction to OS
tolerance 25
OS
Two types
Computer-System
S.
Architecture
Asymmetric Multiprocessing Symmetric Multiprocessing
No.
In asymmetric multiprocessing,
In symmetric multiprocessing, all
1. the processors are not treated
the processors are treated equally.
equally.
OS
05/31/24 Unit I/1-Introduction to OS 27
Symmetric Multiprocessing
Architecture
OS
05/31/24 Unit I/1-Introduction to OS 28
A Dual-Core Design
OS
05/31/24 Unit I/1-Introduction to OS 29
•
Clustered Systems
30
Cluster is also called as system segmentation in some
applications because clustering partitions large system sets
into groups according to their similarity.
Group-A
Cluster System
Segmentation
Group-B
OS
05/31/24 Unit I/1-Introduction to C 30
Clustered Systems
Like multiprocessor systems, but multiple systems working
together……..
Usually sharing storage via a storage-area network (SAN)
Provides a high-availability service which survives failures
Asymmetric clustering has one machine in hot-stand by
mode
Symmetric clustering has multiple nodes running
applications, monitoring each other.
Some clusters are for high-performance computing (HPC)
Applications must be written to use parallelization
OS
05/31/24 Unit I/1-Introduction to OS 31
Introduction to O S Concepts
• Objectives and Functions of OS
• Single Processor System
• Multiprogramming System
• Multitasking /Multiprocessor
System
• Multithreading
• Multiuser
OS
• Cluster
05/31/24
System Unit I/1-Introduction to OS 32
Single Processor
• A single processor system contains only one
processor. SoSystem
only one process can be executed at a
time and then the process is selected from the ready
queue. Most general purpose computers contain the
single processor systems as they are commonly in
use.
OS
05/31/24 33
Unit I/1-Introduction to OS
Uniprogramming
• Single User System
• Single Program in
execution.
OS
05/31/24 34
Unit I/1-Introduction to OS
Multiprogramming
• No. of Programs in execution.
• Increases CPU utilization by organizing
jobs so that the CPU always has one job
to execute.
• CPU is never idle.
OS
• Keeps several jobs in memory
simultaneously.
• Picks and begins to execute one of
the jobs in the memory.
OS
05/31/24 Unit I/1-Introduction to OS 35
Multiprogramming
• Job may have to wait for some task (I/O
operation) and OS simply switches to, and
executes, another job.
• When that job needs to wait, the CPU is
switched to another job, and so on.
• When the first job finishes waiting, it gets
the CPU back.
Allow time-sharing.
OS
05/31/24 Unit I/1-Introduction to OS 36
Multitasking / Multiprocessing
• Multiple Tasks are
performed during the
Same period of time.
OS
05/31/24 Unit I/1-Introduction to OS 37
Multitasking
• In Uniprocessor Systems,
Multitasking Solves the
problem
by Scheduling which task
may be the one running at
any given time, and when
another waiting task gets
a turn.
Context Switch
• Act of reassigning a CPU
from one task to another
OS
one.
05/31/24 Unit I/1-Introduction to OS 38
Multiuser
Allows for Multiple users to use the Same
Computer at the Same time and Different
times.
OS
05/31/24 Unit I/1-Introduction to OS 39
Introduction to OS
2. Types of Operating Systems
OS
05/31/24 Unit I/1- Introduction to OS 40
Batch Operating System
OS
05/31/24 Unit I/1- Introduction to OS 41
Interactive Processing
• User and Computer System
interact.
• User Requests.
• System Responds.
• The process goes on. User System
(Request) (Respond)
OS
Process
CPU P1(Task0)
(2 minutes ) Time(2-minutes)
OS
P2(Task2)
Time(5mints)
OS
Ex: Multimedia
Advanced scientific projects
OS
1. User Interface
2. Program Execution
3. I/O Operations – Other Services
4. File-System Manipulation 1. Resource Allocation
5. Communications 2. Accounting
6. Error Detection 3. Protection and Security OS
OS
• All the layers can be defined separately and interact with each other as
required.
•It is easier to create, maintain and update the system if it is done in the
form of layers.
•Change in one layer specification does not affect the rest of the layers.
• Each of the layers in the operating system can only interact with the
above and below layers. The lowest layer handles the hardware, and
the uppermost layer deals with the user applications.
OS
•A particular layer can access all the layers present below it.
OS
OS
OS
CPU Scheduling: This layer deals with scheduling the processes for
the CPU. When the processes enter the system, they are put into the
job queue.
The processes that are ready to execute in the main memory are kept in
the ready queue. This layer is responsible for managing how many
processes will be allocated to the CPU and how many will stay out of
the CPU.
OS
OS
User Programs: This layer deals with the many user programs and
applications that run in an operating system, such as word
processors, games, browsers, etc. You can also call this an
application layer because it is concerned with application programs.
OS
OS
• End, Abort
• Load, Execute
• Create Process, Terminate Process
• Get Process Attributes, Set Process Attributes
• Wait for time
• Wait Event, Signal Event
• Allocate and Free Memory
OS
OS
OS
OS
5. Status information
6. Communications
OS
• Overlay Loaders Users know what's going on and hides any intermediate state
in your user interface
• Debugging Systems It is multi steps process that involves identifying a problem
and correcting the problem. OS
05/31/24 71
System Programs – File Management
• Create • Print
• Delete • List
• Copy • Manipulate Files and Directories
• Rename
System Programs – File modification
Text Editors
To Create and Modify the Contents of Files
Stored on Disk or Tape.
Screen Editor – vi
Line Editor – edlin, ed, … OS
OS
Allow users to
Send messages to one another’s Screens.
Browse Web pages.
Send Electronic Mail messages.
Log-in Remotely.
Transfer Files from one machine to another.
OS
OS