Chapter 1
Chapter 1
Introduction to
operating systems
Prepared By Hailemariam T.
Outline
What is Operating system
History of Operating System
Computer System Architecture & Organization
Operating System Structure and Operation
Operating System Functions
process management
memory management
storage management
accounting
protection and security
Computing Environments
What is an operating system?
• A program that acts as an intermediary between a user of a computer
and the computer hardware
• A program that
3
Operating system overview
4
Quantitative principle of Computer Design
5
History of Operating Systems
• First generation 1945 - 1955
– vacuum tubes, plug boards
– Operating systems were unheard of
• Second generation 1955 - 1965
– transistors, assembly and FORTRAN
– Batch system was introduced
• Third generation 1965 – 1980
– ICs and multiprogramming
• Fourth generation 1980 – present
– personal computers
6
Second Generation
– Focused on cost effectiveness
7
Second Generation
8
Third Generation
– Faster CPUs
– Multiprogramming
• Allowed loading many programs at one time
– Program scheduling
• Initiated with second-generation systems
• Continues today
9
Third Generation
10
Fourth Generation
– Faster CPUs
– Speed caused problems with slower I/O
devices
– Main memory physical capacity limitations
• Multiprogramming schemes used to increase
CPU
• Virtual memory developed to solve physical
limitation
– Database management software
• Became a popular tool
– A number of query systems introduced
– Programs started using English-like words,
modular structures, and standard
operations 11
Fourth Generation
– Cost/performance ratio improvement of computer
components
– Multiprocessing
12
Fourth Generation
• Increased networking
– Multimedia applications
13
History of Operating Systems
Recent Developments
Second Generation
Distributed computing,
Job scheduling, JCL, faster personal computers, high-
I/O, spooling, batch, files speed communication,
multi-media
15
Computer-System Operation
I/O devices and the CPU can execute concurrently
Each device controller is in charge of a particular
device type
Each device controller has a local buffer
CPU moves data from/to main memory to/from local
buffers
I/O is from the device to local buffer of controller
Device controller informs CPU that it has finished its
operation by causing an interrupt
Common Functions of Interrupts
Interrupt transfers control to the interrupt service routine
generally, through the interrupt vector, which contains the
addresses of all the service routines
Interrupt architecture must save the address of the
interrupted instruction
A trap or exception is a software-generated interrupt
caused either by an error or a user request
An operating system is interrupt driven
Interrupt Timeline
Storage Structure
Main memory – only large storage media that the CPU
can access directly
Random access
Typically volatile
Secondary storage – extension of main memory that
provides large nonvolatile storage capacity
Hard disks – 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
Solid-state disks – faster than hard disks, nonvolatile
Various technologies
Becoming more popular
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
– Provides uniform interface between
controller and kernel
Storage-Device Hierarchy
Caching
Important principle, performed at many levels in a
computer (in hardware, operating system, software)
Information in use copied from slower to faster storage
temporarily
Faster storage (cache) checked first to determine if
information is there
If it is, information used directly from the cache (fast)
If not, data copied to cache and used there
Cache smaller than storage being cached
Cache management important design problem
Cache size and replacement policy
Direct Memory Access Structure
– System call – request to the operating system to allow user to wait for I/O completion.
– Device-status table contains entry for each I/O device indicating its type, address, and
state.
– Operating system indexes into I/O device table to determine device status and to
modify table entry to include interrupt.
31
Two I/O Methods
Synchronous Asynchronous
32
Memory Layout for Multiprogrammed System
Operating-System Operations
49
Types of Operating Systems
• Batch Systems
– Input relied on punched cards or tape
– Efficiency measured in throughput
• Interactive Systems
– Faster turnaround than batch systems
– Slower than real-time systems
– Introduced to provide fast turnaround when
debugging programs
– Time-sharing software developed for operating system
50
Types of Operating Systems
• Real-time systems
– Reliability is key
– Fast and time limit sensitive
– Used in time-critical environments
• Space flights, airport traffic control, high-speed aircraft
• Industrial processes
• Sophisticated medical equipment
• Distribution of electricity
• Telephone switching
– Must be 100% responsive, 100% of the time
51
Types of Operating Systems
• Hybrid systems
– Combination of batch and interactive
– Accept and run batch programs in the background
• Interactive load is light
• Embedded systems
– Computers placed inside other products
– Adds features and capabilities
– Operating system requirements
• Perform specific set of programs
• Not interchangeable among systems
• Small kernel and flexible function capabilities
52
Computing Environments - Traditional
• Stand-alone general purpose machines
• But blurred as most systems interconnect with others
(i.e., the Internet)
• Portals provide web access to internal systems
• Network computers (thin clients) are like Web
terminals
• Mobile computers interconnect via wireless
networks
• Networking becoming ubiquitous – even home
systems use firewalls to protect home computers
from Internet attacks
Computing Environments - Mobile
Client-Server Computing
Dumb terminals supplanted by smart PCs
Many systems now servers, responding to
requests generated by clients
Compute-server system provides an
interface to client to request services (i.e.,
database)
File-server system provides interface for
clients to store and retrieve files
Computing Environments - Peer-to-Peer
• Many types