Operating Systems
College of Science
Computer Dept.
Higher Diploma
By
Aree Ali M.
2007
Computer Organization
and Architecture
Architecture is those attributes visible to the programmer
– Instruction set, number of bits used for data representation,
I/O mechanisms, addressing techniques.
Organization is how features are implemented
– Control signals, interfaces, memory technology.
All Intel x86 family share the same basic architecture
The IBM System/370 family share the same basic architecture
This gives code compatibility
– At least backwards
Organization differs between different versions
Structure & Function
Structure is the way in which components relate to each other
Function is the operation of individual components as part of the
structure
All computer functions are: Data
Storage
Data processing
Facility
Data storage Data Control
Data movement Move Mechanism
Control ment
Appa Data
ratus Processing
Facility
Functional view of a computer
Operations (1)
Data movement
– e.g. keyboard to screen
Data
Storage
Facility
Data
Control
Movement
Mechanism
Apparatus
Data
Processing
Facility
Operations (2)
Storage
– e.g. Internet download to disk
Data
Storage
Facility
Data
Control
Movement
Mechanism
Apparatus
Data
Processing
Facility
Operations (3)
Processing from/to storage
– e.g. updating bank statement
Data
Storage
Facility
Data Control
Movement Mechanism
Apparatus
Data
Processing
Facility
Operations (4)
Processing from storage to I/O
– e.g. printing a bank statement Data
Storage
Facility
Data
Control
Movement
Mechanism
Apparatus
Data
Processing
Facility
Structure - Top Level
Peripherals Computer
Central Main
Processing Memory
Unit
Computer Systems
Interconnection
Input
Output
Communication
lines
Structure - The CPU
CPU
Computer Arithmetic
Registers and
I/O
Login Unit
System CPU
Bus
Internal CPU
Memory Interconnection
Control
Unit
Structure - The Control Unit
Control Unit
CPU
Sequencing
ALU Login
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders
Control
Memory
Moore’s Law
Increased density of components on chip
Gordon Moore - cofounder of Intel
Number of transistors on a chip will double every year
Since 1970’s development has slowed a little
– Number of transistors doubles every 18 months
Cost of a chip has remained almost unchanged
Higher packing density means shorter electrical paths, giving higher
performance
Smaller size gives increased flexibility
Reduced power and cooling requirements
Fewer interconnections increases reliability
Computer Components:
Top Level View
Instruction Cycle
Two steps:
– Fetch
– Execute
Buses
There are a number of possible interconnection systems
Single and multiple BUS structures are most common
e.g. Control/Address/Data bus (PC)
e.g. Unibus (DEC-PDP)
What is a Bus?
A communication pathway connecting two or more devices
Usually broadcast
Often grouped
A number of channels in one bus
e.g. 32 bit data bus is 32 separate single bit channels
Power lines may not be shown
Buses
- DATA BUS
Carries data
– Remember that there is no difference between “data” and “instruction” at this
level
Width is a key determinant of performance
– 8, 16, 32, 64 bit
- ADDRESS BUS
Identify the source or destination of data
e.g. CPU needs to read an instruction (data) from a given location in memory
Bus width determines maximum memory capacity of system
– e.g. 8080 has 16 bit address bus giving 64k address space
- CONTROL BUS
Control and timing information
– Memory read/write signal
– Interrupt request
– Clock signals
Bus Interconnection Scheme
Introduction
What is an Operating System?
What are the components of an OS?
What does an OS do?
Short History of OS.
Different types of OS.
What is an Operating 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.
Computer System Components
1. Hardware – provides basic computing resources
(CPU, memory, I/O devices).
2. Operating system – controls and coordinates the
use of the hardware among the various
application programs for the various users.
3. Applications programs – define the ways in
which the system resources are used to solve
the computing problems of the users (compilers,
database systems, video games, business
programs).
4. Users - (people, machines, other computers).
Abstract View of System
Components
System Components
* The operating system run in kernel or supervisor mode – protected
from user tampering
* Compilers, editors and application programs run in user mode
Functions of an OS
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
– Protection and security
– Fault tolerance and failure recovery
Resource Management
– Time management
CPU and disk transfer scheduling
– Space management
main and secondary storage allocation
– Synchronization and deadlock handling
critical section, coordination
– Accounting and status information
resource usage tracking
History of Operating Systems
Pre-electronic
– Charles Babbage (1792-1871) “analytical machine”
– Purely mechanical, failed because technology could not produce the
required wheels, cog, gears to the required precision
First generation 1945 - 1955
– Aiken, von Neumann, Eckert, Mauchley and Zuse
– programming done via plugboards, no OS or language
– vacuum tubes
Second generation 1955 - 1965
– transistors more reliable than vacuum tubes
– jobs read in via punched cards
– batch systems introduced to reduce wasted time in setting up and
running jobs
History of Operating Systems
Third generation 1965 – 1980
– IBM System/360: combine business and scientific computers into one machine
– Computer will grow with client(memory, processor speed, number of I/O
devices etc.)
– Forerunner of 370, 4300, 3080 and 3090
– Use of integrated circuits provided major price/performance advantage over
2nd generation
– OS/360 had to meet conflicting needs which resulted in enormous and complex
operating system
– 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
Fourth generation 1980 – present
– Large Scale Integrated chips
– personal computers
– 1974: Intel developed 8080 chip (8 bit CPU), Gary Kildall wrote
CP/M OS (Intel gave him the rights) and formed Digital Research
– Early 1980s: IBM designed IBM PC. Bill Gates had BASIC
interpreter and recommended DR as an OS. Kildall sent
subordinate to meeting and refused to sign non-disclosure.
Gates was asked for an OS, bought DOS from Seattle Computer
Products and offered IBM DOS/BASIC package. Renamed it MS -
DOS
– 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)
Memory Layout for a Simple Batch and
Multiprogramming System
OS Features Needed for
Multiprogramming
Why multiprogramming?
– Increases CPU utilization by trying to always keep the
CPU busy processing some job
– I/O of one job causes switch to another job
Memory management – the system must allocate
the memory to several jobs.
CPU scheduling – the system must choose
among several jobs ready to run.
Allocation of devices.
Desktop Systems
Personal computers – computer system
dedicated to a single user.
I/O devices – keyboards, mice, display screens,
small printers.
User convenience and responsiveness.
Can adopt technology developed for larger
operating systems. Often individuals have sole
use of computer and do not need advanced CPU
utilization of protection features.
May run several different types of operating
systems (Windows, MacOS, UNIX, Linux)
Parallel Systems
Multiprocessor systems with more than on 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
Migration of Operating-System
Concepts and Features