You are on page 1of 32

Operating Systems

Certificate Program in Software Development


CSE-TC and CSIM, AIT
September -- November, 2003

1. Introduction
(Chapter 1, S&G)

 Objectives
– introduce Operating System (OS) principles

OSes: 1. Intro 1
Contents
1. What is an OS?
2. Some History
– early systems, batch systems, multiprogramming,
time-sharing,
desktop systems
3. Recent Trends
– multiprocessor systems, distributed, clustered, real-
time, handheld, etc.

OSes: 1. Intro 2
1. What is an OS?

User 1 User 2 ….. User N

compiler editor ….. database


Application Programs

Operating System

Computer Hardware
OSes: 1. Intro 3
Features

 An OS is a program that acts as an


intermediary between users and hardware
– supports a high-level work environment
– makes hardware convenient to use
– makes efficient use of hardware

 OS design goals are often contradictory

OSes: 1. Intro continued 4


 The OS manages resources
– e.g. CPU time, memory, files, I/O devices
– avoid bottlenecks
– keeps the hardware busy

 The OS controls
– prevents users/programs adversely affecting the
hardware or other users
– the system should never crash
OSes: 1. Intro 5
OS Development
OSes: 1. Intro 6
2. Some History

 2.1. Early Systems


 2.2. Batch Systems
 2.3. Multiprogramming Batch Systems
 2.4. Time-Sharing
 2.5. Desktop Systems

OSes: 1. Intro 7
2.1. Early Systems
 One person at a contol panel of switches
and lights
 Load libraries/utilities from tape
 Slow set-up
 Very costly hardware

Read Compute Print


Read Compute Print

OSes: 1. Intro 8
2.2. Batch Systems

 Motivation: highly utilise the hardware


– dedicated computer operator
– card/tapes handed to the operator

 Similar jobs were run in sequence (batched)


– no machine/user interaction
– errors were recorded as a printed core dump
– very slow turnaround time (for users)

OSes: 1. Intro 9
Resident Monitor

 For automatic job sequencing

Control Card
Loader Job Sequencing User Program Area
Interpreter

monitor

OSes: 1. Intro 10
Control Cards
 User’s cards included control cards to guide
the monitor.
$END
data cards
$RUN
program cards
$JOB

OSes: 1. Intro 11
Off-line I/O Processing

On-line:

Card Reader CPU Line Printer

Off-line:

Card Reader CPU Line Printer

OSes: 1. Intro
tape drives tape drives 12
Spooling
 Job pool on disk, scheduled by OS

disk

I/O

Card Reader CPU Line Printer

OSes: 1. Intro 13
Benefit Of Spooling

Read Compute Print


Read Compute Print
Read Compute Print

OSes: 1. Intro 14
2.3. Multiprogrammed Batch Systems

 Have several jobs in memory at a time.


 Multiprogramming allows the OS to switch to
executing another job when the current one is
suspended (e.g. waiting for user input).
 The OS may also swap jobs to/from disk.
 Requires CPU scheduling

OSes: 1. Intro 15
2.4. Time-Sharing
 Multiple jobs are executed by the CPU
switching between them
– as in multiprogramming

 Difference is speed; the switching is so fast


that users feel that their programs are
always running.

 Executing program is called a process.


OSes: 1. Intro continued 16
 Virtual memory
– hides the distinction between memory and disk

 Disk management

 Concurrent execution requires fancy


scheduling schemes

 Job synchronisation, communication,


deadlock avoidance
OSes: 1. Intro 17
2.5. Desktop Systems

 Personal computers
– computer system dedicated to a single user

 I/O devices
– keyboards, mice, display screens, small printers

 User convenience and responsiveness

OSes: 1. Intro continued 18


 Can adopt technology developed for larger
operating system
– sole use means less need for protection features

 May run several different types of operating


systems
– e.g. Windows, MacOS, UNIX, Linux

OSes: 1. Intro 19
3. Recent Trends
3.1. Multiprocessor Systems
3.2. Distributed Systems
3.3. Clustered Systems
3.4. Real-time Systems
3.5. Handheld Systems
3.6. Computing Environments

OSes: 1. Intro 20
3.1. Multiprocessor Systems

 A system with more than 1 processor, but


perhaps sharing computer bus, clock,
memory and devices
– tightly coupled systems

 n processes = n times speed-up

OSes: 1. Intro continued 21


 Benefits:
– save money on hardware
– increased reliability (graceful degradation)

 Two main types:


– symmetric multiprocessing systems
– asymmetric multiprocessing systems

OSes: 1. Intro 22
3.1.1. Symmetric Multiprocessing

 Each processor runs an identical copy of


the OS

 Often in a master-slave configuration

 Jobs/resources are shared dynamically


for better load balancing

OSes: 1. Intro 23
3.1.2. Asymmetric Multiprocessing

 Have dedicated processors for specific tasks


– e.g. remote job entry (RJE),
I/O terminal buffering

OSes: 1. Intro 24
3.2. Distributed Systems

 “The system is the network.”

OSes: 1. Intro continued 25


 Multiprocessors, but not sharing memory,
clock, etc.
– may be geographically separated
– loosely coupled systems

 Benefits:
– resource sharing, speed-up, reliability
– matches modern business practise

OSes: 1. Intro 26
3.3. Clustered Systems

 Clustering allows two or more systems to


share storage.
– provides high reliability
 Asymmetric clustering
– one host runs the application while others
standby
 Symmetric clustering
– all hosts run the application

OSes: 1. Intro 27
3.4. Real-time Systems
 There are time constraints placed on
operations/data flows which must be met.

 Uses:
– scientific experiments, medicine, industrial
control systems, home appliances, weapons

 Two types:
– hard real-time systems
– soft real-time systems
OSes: 1. Intro 28
3.4.1. Hard Real-time Systems

 Critical tasks are guaranteed to be done on


time.

 Many useful hardware/OS features are


missing since they make the time
constraints too hard to satisfy
– e.g. no secondary storage

OSes: 1. Intro 29
3.4.2. Soft Real-time Systems

 Critical tasks are given priority, but their


time constraints may not be met.

 Weaker, but can be used alongside typical


OS features

 Applications: VR, multimedia

OSes: 1. Intro 30
3.5. Handheld Systems

 Personal Digital Assistants (PDAs)


 Cellular telephones
 Issues:
– limited memory
– slow processors
– small display screens

OSes: 1. Intro 31
3.6. Computing Environments

 Changing environments are leading to


changes in OS requirements
– traditional
– hand-held, mobile
– Web-based
– embedded, dedicated processors

OSes: 1. Intro 32

You might also like