oses: 1. intro 1 operating systems v objectives –introduce operating system (os) principles...

32
OSes: 1. Intro Operating Systems Operating Systems Objectives Objectives introduce Operating System (OS) introduce Operating System (OS) principles principles Certificate Program in Software D evelopment CSE-TC and CSIM, AIT September -- November, 2003 1. Introduction (Chapter 1, S&G)

Upload: joan-atkins

Post on 12-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 1

Operating SystemsOperating Systems

ObjectivesObjectives– introduce Operating System (OS) principlesintroduce Operating System (OS) principles

Certificate Program in Software DevelopmentCSE-TC and CSIM, AITSeptember -- November, 2003

1. Introduction(Chapter 1, S&G)

Page 2: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 2

ContentsContents

1.1. What is an OS?What is an OS?

2.2. Some HistorySome History

– early systems, batch systems, multiprogramming, early systems, batch systems, multiprogramming, time-sharing,time-sharing,desktop systemsdesktop systems

3.3. Recent TrendsRecent Trends

– multiprocessor systems, distributed, clustered, multiprocessor systems, distributed, clustered, real-time, handheld, etc.real-time, handheld, etc.

Page 3: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 3

1. What is an OS?1. What is an OS?

Application Programs

Operating System

Computer Hardware

compiler editor ….. database

User 1 User 2 User N…..

Page 4: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 4

FeaturesFeatures

An OS is a program that acts as an An OS is a program that acts as an intermediaryintermediary between users and hardware between users and hardware– supports a high-level work environmentsupports a high-level work environment– makes hardware convenient to usemakes hardware convenient to use– makes efficient use of hardwaremakes efficient use of hardware

OS design goals are often OS design goals are often contradictorycontradictory

continued

Page 5: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 5

The OS The OS managesmanages resources resources– e.g. CPU time, memory, files, I/O devicese.g. CPU time, memory, files, I/O devices– avoid bottlenecksavoid bottlenecks– keeps the hardware busykeeps the hardware busy

The OS The OS controlscontrols– prevents users/programs adversely affecting the prevents users/programs adversely affecting the

hardware or other usershardware or other users– the system should never crash the system should never crash

Page 6: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 6

OS Development

Page 7: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 7

2. Some History2. Some History

2.1. Early Systems2.1. Early Systems 2.2. Batch Systems2.2. Batch Systems 2.3. Multiprogramming Batch Systems2.3. Multiprogramming Batch Systems 2.4. Time-Sharing2.4. Time-Sharing 2.5. Desktop Systems2.5. Desktop Systems

Page 8: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 8

2.1. Early Systems2.1. Early Systems

One person at a contol panel of switches One person at a contol panel of switches and lightsand lights

Load libraries/utilities from tapeLoad libraries/utilities from tape Slow set-upSlow set-up Very costly hardwareVery costly hardware

ComputeRead Print

ComputeRead Print

Page 9: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 9

2.2. Batch Systems2.2. Batch Systems

MotivationMotivation: highly utilise the hardware: highly utilise the hardware– dedicated computer operatordedicated computer operator– card/tapes handed to the operatorcard/tapes handed to the operator

Similar jobs were run in sequence (Similar jobs were run in sequence (batchedbatched))– no machine/user interactionno machine/user interaction– errors were recorded as a printed core dumperrors were recorded as a printed core dump– very slow turnaround time (for users)very slow turnaround time (for users)

Page 10: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 10

Resident MonitorResident Monitor

For automatic job sequencingFor automatic job sequencing

Loader Job SequencingControl Card

InterpreterUser Program Area

monitor

Page 11: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 11

$END

data cards

$RUN

program cards

Control CardsControl Cards

User’s cards included control cards to guide User’s cards included control cards to guide the monitor.the monitor.

$JOB

Page 12: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 12

Off-line I/O ProcessingOff-line I/O Processing

Card Reader CPU Line Printer

On-line:

Card Reader CPU Line Printer

Off-line:

tape drives tape drives

Page 13: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 13

SpoolingSpooling

Card Reader CPU Line Printer

disk

I/O

Job pool on disk, scheduled by OSJob pool on disk, scheduled by OS

Page 14: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 14

Benefit Of SpoolingBenefit Of Spooling

ComputeRead Print

ComputeRead Print

ComputeRead Print

Page 15: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 15

2.3. Multiprogrammed Batch Systems2.3. Multiprogrammed Batch Systems

Have several jobs in memory at a time.Have several jobs in memory at a time.

Multiprogramming allows the OS to switch to Multiprogramming allows the OS to switch to executing another job when the current one is executing another job when the current one is suspended (e.g. waiting for user input).suspended (e.g. waiting for user input).

The OS may also swap jobs to/from disk.The OS may also swap jobs to/from disk.

Requires Requires CPU schedulingCPU scheduling

Page 16: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 16

2.4. Time-Sharing2.4. Time-Sharing Multiple jobs are executed by the CPU Multiple jobs are executed by the CPU

switching between themswitching between them– as in multiprogrammingas in multiprogramming

Difference is Difference is speedspeed; the switching is so fast ; the switching is so fast that users feel that their programs are that users feel that their programs are alwaysalways running. running.

Executing program is called a Executing program is called a processprocess..continued

Page 17: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 17

Virtual memoryVirtual memory– hides the distinction between memory and diskhides the distinction between memory and disk

Disk managementDisk management

Concurrent execution requires fancy Concurrent execution requires fancy scheduling schemesscheduling schemes

Job synchronisation, communication, Job synchronisation, communication, deadlock avoidancedeadlock avoidance

Page 18: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 18

2.5. Desktop Systems2.5. Desktop Systems

Personal computersPersonal computers– computer system dedicated to a single usercomputer system dedicated to a single user

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

User convenience and responsivenessUser convenience and responsiveness

continued

Page 19: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 19

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

May run several different types of operating May run several different types of operating systemssystems– e.g. Windows, MacOS, UNIX, Linuxe.g. Windows, MacOS, UNIX, Linux

Page 20: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 20

3. Recent Trends3. Recent Trends

3.1. Multiprocessor Systems3.1. Multiprocessor Systems

3.2. Distributed Systems3.2. Distributed Systems

3.3. Clustered Systems3.3. Clustered Systems

3.4. Real-time Systems3.4. Real-time Systems

3.5. Handheld Systems3.5. Handheld Systems

3.6. Computing Environments3.6. Computing Environments

Page 21: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 21

3.1. Multiprocessor Systems3.1. Multiprocessor Systems

A system with more than 1 processor, but A system with more than 1 processor, but perhaps sharing computer bus, clock, perhaps sharing computer bus, clock, memory and devicesmemory and devices– tightly coupled systemstightly coupled systems

n processes = n times speed-upn processes = n times speed-up

continued

Page 22: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 22

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

Two main types:Two main types:– symmetricsymmetric multiprocessing systems multiprocessing systems– asymmetricasymmetric multiprocessing systems multiprocessing systems

Page 23: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 23

3.1.1. Symmetric Multiprocessing3.1.1. Symmetric Multiprocessing

Each processor runs an Each processor runs an identicalidentical copy of copy of the OSthe OS

Often in a master-slave configurationOften in a master-slave configuration

Jobs/resources are shared dynamically Jobs/resources are shared dynamically for better load balancingfor better load balancing

Page 24: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 24

3.1.2. Asymmetric Multiprocessing3.1.2. Asymmetric Multiprocessing

Have dedicated processors for specific tasksHave dedicated processors for specific tasks– e.g. e.g. remote job entry (RJE), remote job entry (RJE),

I/O terminal bufferingI/O terminal buffering

Page 25: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 25

3.2. Distributed Systems3.2. Distributed Systems

““The system is the network.”The system is the network.”

continued

Page 26: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 26

Multiprocessors, but Multiprocessors, but notnot sharing memory, sharing memory, clock, etc.clock, etc.– may be geographically separatedmay be geographically separated– loosely coupled systemsloosely coupled systems

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

Page 27: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 27

3.3. Clustered Systems3.3. Clustered Systems

Clustering allows two or more systems to Clustering allows two or more systems to share storage.share storage.– provides high reliabilityprovides high reliability

Asymmetric clusteringAsymmetric clustering– one host runs the application while others one host runs the application while others

standbystandby Symmetric clusteringSymmetric clustering

– all hosts run the applicationall hosts run the application

Page 28: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 28

3.4. Real-time Systems3.4. Real-time Systems There are time constraints placed on There are time constraints placed on

operations/data flows which must be met.operations/data flows which must be met.

Uses:Uses:– scientific experiments, medicine, industrial scientific experiments, medicine, industrial

control systems, home appliances, weaponscontrol systems, home appliances, weapons

Two types:Two types:– hard real-time systemshard real-time systems– soft real-time systemssoft real-time systems

Page 29: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 29

3.4.1. Hard Real-time Systems3.4.1. Hard Real-time Systems

Critical tasks are Critical tasks are guaranteedguaranteed to be done on to be done on time.time.

Many useful hardware/OS features are Many useful hardware/OS features are missing since they make the time missing since they make the time constraints too hard to satisfyconstraints too hard to satisfy– e.g. no secondary storagee.g. no secondary storage

Page 30: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 30

3.4.2. Soft Real-time Systems3.4.2. Soft Real-time Systems

Critical tasks are given priority, but their Critical tasks are given priority, but their time constraints may not be met.time constraints may not be met.

Weaker, but can be used alongside typical Weaker, but can be used alongside typical OS featuresOS features

Applications: VR, multimediaApplications: VR, multimedia

Page 31: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 31

3.5. Handheld Systems3.5. Handheld Systems

Personal Digital Assistants (PDAs)Personal Digital Assistants (PDAs) Cellular telephonesCellular telephones Issues:Issues:

– limited memorylimited memory– slow processorsslow processors– small display screenssmall display screens

Page 32: OSes: 1. Intro 1 Operating Systems v Objectives –introduce Operating System (OS) principles Certificate Program in Software Development CSE-TC and CSIM,

OSes: 1. Intro 32

3.6. Computing Environments3.6. Computing Environments

Changing environments are leading to Changing environments are leading to changes in OS requirementschanges in OS requirements– traditionaltraditional– hand-held, mobilehand-held, mobile– Web-based Web-based – embedded, dedicated processorsembedded, dedicated processors