1
Chapter One
Introduction to OS
2
Outline
What is an Operating System?
What does an OS do?
Types of OS
OS in different environment
Short History of OS
3
What is an Operating System?
A modern computer consists of 1 or more processors, main
memory, disk, printer, a keyboard, a display, NIC and other
input/ output devices (all in all a complex system).
Writing programs to keep track of all these components and
use them correctly is an extremely difficult job.
For these reason computers are equipped with layer of
software called OS whose job is to manage all these devices
and to provide user programs with a simple interface to the
hardware.
What is an Operating System?... 4
An Operating system is 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.
5
What is an Operating System?...
What is OS?
An OS is a program which acts as an interface between
computer system users and the computer hardware.
It
provides a user-friendly environment in which a user may easily
develop and execute programs.
Otherwise, hardware knowledge would be mandatory for
computer programming.
So, it can be said that an OS hides the complexity of hardware
from uninterested users.
6
Cont’d…
Three Key Elements of any Operating System:
Technical
Layer of Software: for driving the hardware of
the computer, like disk drives, the keyboard and the
screen.
FileSystem: which provides a way of organizing files
logically.
UserInterface: which enables users to run their own
programs and to manipulate their files in a simple way.
7
Cont’d…
Operating Systems may be classified based on two things
The amount of task they perform concurrently
Single-Tasking
Multi-Tasking
The number of user they use the system simultaneously
Single-User
Multi-User
8
Abstract View of System Components
9
Abstract View of System Components
Hides the complexity of machine
language from programmer
Instruction Set Architecture
Physical devices grouped
together to form functional units
Integrated circuit chips,
power supply, CRT
The operating system run in kernel or supervisor mode –
i.e. protected from user tampering
Compilers, editors and application programs run in user mode
Detail Functions of an OS 10
User Environment - OS layer transforms bare hardware machine into
higher level abstractions
Execution environment - process management, file manipulation, interrupt
handling, I/O operations, language.
Error detection and handling - internal and external hardware errors. And
various software errors.
Make the response that clears the error condition with least impact on the user
Security - enforce security through abstraction.
Detail Functions of an OS…… 11
Resource Management- manages every resources efficiently
Time management
CPU and disk transfer scheduling
Space management
Main and secondary storage allocation
Synchronization and deadlock handling
PC, critical section, semaphore, global variable
Accounting and status information
Resource usage tracking
12
The Operating System Zoo
Mainframe operating systems
Personal computer operating systems
Multiprocessor operating systems
Real-time operating systems
Embedded operating systems
plamOS, WindowsCE(customer electronic)
Smart card operating systems
Mainframe Systems 13
A mainframe is used for businesses to host their commercial
databases, transaction servers, and applications that require a
greater degree of security and availability than in commonly
found on smaller-scale machines.
Mainframe Systems…Why mainframe? 14
Mainframes serve a vast number of online transaction processing (OLTP)
systems.
These are often mission-critical applications that businesses depend on
for their core functions. Some industry uses of online systems:
Banks – ATMs, teller systems for customer service
Insurance – Agent systems for policy management and claims processing
Travel and Transport – Airline reservation systems
Manufacturing – Inventory control, production scheduling
Government – Tax processing, license issuance and management.
OS Features Needed for Multiprogramming 15
Problem with multi programming
User can’t interact with a job when it’s executing
Program must be debugged statically
Why multiprogramming?
IncreasesCPU utilization by trying to always keep the CPU busy
processing some job
I/O of one job causes switch to another job
Desktop Systems 16
Personal computers – computer system dedicated to a single user.
I/O devices – keyboards, mouse, display screens, small printers.
Major issues are-User convenience and responsiveness.
Can adopt technology developed for larger OS.
Often individuals have sole use of computer
Hence, do not need advanced CPU utilization of protection features.
May run several different types of operating systems (Windows, MacOS,
Linux)
Parallel Systems 17
Multiprocessor systems with more than one CPU in close communication.
Tightly coupled system – processors share memory and a clock
Communication usually takes place through the shared memory.
Advantages of parallel system:
Increased throughput with more processors
Economical – share peripherals, mass storage, power etc. as opposed to
individual PCs
Increased reliability
graceful degradation / fault tolerant
failure of one processor will slow down but not halt the system
other processors pick up the slack
Parallel Systems… 18
Parallel Systems… 19
Parallel Systems…. 20
Symmetric multiprocessing (SMP)
Each processor runs identical copy of
the operating system.
Many processes can run at once without
performance deterioration.
Most modern operating systems support
SMP
Asymmetric multiprocessing
Each processor is assigned a specific task; controlling processor
schedules and allocates work to other processors.
More common in extremely large systems
Parallel Systems… 21
Master/slave assignment: Kernel functions always run on a particular
processor. Other processors execute user processes.
Advantage: Resource conflict resolution simplified since single processor
has control.
Problem: Failure of master processor? Master processor does the scheduling
==> bottleneck.
Peer assignment: OS can execute on any processor. Each processor
does its own scheduling from the pool of available processes.
Parallel Systems…. 22
Master-Slave multiprocessors
Parallel Systems…. 23
Each CPU has its own operating system
Parallel Systems…. 24
Symmetric Multiprocessors
SMP multiprocessor model
Distributed Systems 25
Distribute the computation among several physical processors.
Loosely coupled system – each processor has its own local memory;
processors communicate with one another through various
communications lines, such as high-speed buses or telephone lines.
Advantages of distributed systems.
Resource sharing
Computation speed up – load sharing
Reliability
Strong Communications between processors and processes
Distributed Systems (cont.) 26
Requires networking infrastructure.
TCP/IP is the most common network protocol
Local area networks (LAN) or
Wide area networks (WAN)
May be either client-server or peer-to-peer systems.
Real-Time Systems 27
A real-time operating system (RTOS) is an OS that guarantees real-time
applications a certain capability within a specified deadline.
Often used as a control device in a dedicated application
Ex. controlling scientific experiments, medical imaging systems, industrial
control systems, and some display systems.
Well-defined, fixed time constraints.
Need more accuracy on decision making
Real-Time Systems 28
Hard real-time:
Hard real-time software systems have a set of strict deadlines, and
missing a deadline is considered a system failure. Examples of hard
real-time systems: airplane sensor and autopilot systems,
Secondary storage limited or absent, data stored in short term
memory, or read-only memory (ROM)
Not supported by general-purpose operating systems.
Real-Time Systems 29
Soft real-time
Soft real time system is a system whose operation is
degrade if results are not produce according to the
specified timing requirement.
Limited utility in industrial control of robotics
Usefulin applications audio and video delivery software for
entertainment (multimedia, virtual reality) requiring
advanced operating-system features.
Embedded Systems 30
Fusion of the application and the OS to one
unit
Characteristics:
Resource management
Primaryinternal resources
Less overhead
Code of the OS and the
application mostly reside in
ROM
Embedded Systems… 31
Embedded: application is compiled and linked together with
the embedded OS
On system start, application usually gets executed first, and it then
starts the RTOS.
Typicallyonly part of RTOS (services, routines, or functions) needed to
support the embedded application system are configured and linked
in
Smart card systems 32
The standard definition of a smart card, or integrated circuit
card (ICC), is any pocket sized card with embedded
integrated circuits.
Loosely defined, a smart card is any card with a capability to
relate information to a particular application such as:
Magnetic Stripe Cards
Optical Cards
Memory Cards
Microprocessor Cards
Magnetic Stripe Cards 33
Standard technology for bank cards, driver’s licenses,
library cards, and so on……
Optical Cards 34
Uses a laser to read
and write the card
CANPASS Contains:
Photo ID
Fingerprint
Memory Cards 35
Can store:
Financial Info
Personal Info
Specialized Info
Cannot process Info
History of Operating Systems 36
First generation 1945 - 1955
Aiken, von Neumann, Eckert, Mauchley and Zuse
Programming done via mechanical switches (plug boards),
Vacuum tubes
All programming was done in absolute machine language, often by wiring up plug
boards to control the machine’s basic functions.
Programming languages were unknown (even assembly language was unknown).
History of Operating Systems 37
Second generation 1955 - 1965
Transistors more reliable than vacuum tubes
Implemented the first operating system on IBM701 (system runs one job at a time)
Batch systems introduced to reduce wasted time in setting up and running jobs
•bring cards to 1401
•read cards to tape offline
•put tape on 7094 which does computing
•put tape on 1401 which prints output
offline
History of Operating Systems 38
Third generation 1965 – 1980
Use of integrated circuits provided major price/performance advantage
over 2nd generation.
Introduced multiprogramming to make most efficient use of CPU.
Spooling: read jobs from cards to disk ready to load into memory and
queue output to disk for printing.
History of Operating Systems 39
Timesharing (a variant of multiprogramming) provides for user interaction
with the computer system
Enables the sharing of computer resources among many users by means
of multiprogramming and multitasking.
The CPU is multiplexed among several jobs that are kept in memory and on
disk (the CPU is allocated to a job only if the job is in memory).
Takes advantage of the idle CPU
Switch occurs so frequently that the user can interact with each program as it is
running
Each command is short so only a little CPU time is needed for each user
Each user is given the impression that the entire system is dedicated to his use
Batch jobs could be running in background
History of Operating Systems 40
Fourth generation 1980 – present
With the development of LSI (Large Scale Integration) circuits, chips
containing thousands of transistors on a square centimeter of silicon, the age
of the personal computer dawned.
Operating systems for personal computers and work stations were introduced
Ms-DOS (Microsoft ) and UNIX (Motorola ) got popularity
Early Windows versions ran on top of DOS, Windows 95 and beyond and NT
were full fledged OSs
Network Operating Systems (user sees multiple computers)
Distributed Operating Systems (user sees one processor)
History of Operating Systems 41
First generation 1945 - 1955
vacuum tubes, plug boards
Second generation 1955 - 1965
transistors, batch systems
Third generation 1965 – 1980
ICs and multiprogramming
Fourth generation 1980 – present
personal computers
Characteristic of Modern OS 42
Micro Kernel architecture- assign only few functions
Address space, interprocess communication, basic scheduling
Multi-Tasking
creating displaceable unit of work called for a particular process
Symmetric Multi-Processing
Performance, availability, incremental growth, scaling
Distributed OS
Object Oriented design
43
End of Chapter One