cis-410: operating systems spring 2008. organizational details class meeting: 7:00-9:45pm, monday,...

30
CIS-410: Operating Systems Spring 2008

Upload: clare-kerry-johns

Post on 25-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

CIS-410: Operating Systems

Spring 2008

Page 2: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

Organizational Details

Class Meeting: 7:00-9:45pm, Monday, Room 252N

Instructor: Dr. Igor Aizenberg

Office: Aikin Building, 192Phone (903 223 3183)e-mail: [email protected]

Office hours:Tuesday, Thursday, Friday 12-30 – 2-00 pm

Page 3: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

Text Book

A. Silberschatz, P. B. Galvin and G. Gagne "Operating System Concepts" 7th Edn., John Wiley & Sons,2005, ISBN 0-471-69466-5

Page 4: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

Control

Exams (open book, open notes):

Midterm 1: March 3, 2007 Midterm 2: April 14, 2007 Final Exam: May 12, 2007

Homework

Page 5: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

GradingGrading MethodHomework and preparation: 10%Midterm Exam 1: 25%Midterm Exam 2: 30%Final Exam: 35%

Grading Scale: 90%+ A 80%+ B 70%+ C 60%+ D less than 60% F

Page 6: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

Chapter 1: IntroductionChapter 1: Introduction

Page 7: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.7 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

What we will study?What we will study?

What Operating Systems Do

Computer-System Organization

Computer-System Architecture

Operating-System Structure

Operating-System Operations

Process Management

Memory Management

Storage Management

Protection and Security

Modern Operating Systems: Windows XP and Linux

Page 8: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.8 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

ObjectivesObjectives

To provide a grand tour of the major operating systems components

To provide coverage of basic computer system organization

To learn basic ideas behind the modern operating systems.

To learn basic issues in operating system design and implementation.

To allow you to use an operating system to control your computer.

To give you the ability to quickly learn new operating systems.

Page 9: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.9 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

What is an Operating System?What is an Operating System?

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.

Page 10: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.10 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Computer System StructureComputer System Structure

Computer system can be divided into four components

Hardware – provides basic computing resources

CPU, memory, I/O devices

Operating system

Controls and coordinates use of hardware among various applications and users

Application programs – define the ways in which the system resources are used to solve the computing problems of the users

Word processors, compilers, web browsers, database systems, video games

Users

People, machines, other computers

Page 11: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.11 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Four Components of a Computer SystemFour Components of a Computer System

Page 12: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.12 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Operating System DefinitionOperating System Definition

OS is a resource allocator

Manages all resources

Decides between conflicting requests for efficient and fair resource use

OS is a control program

Controls execution of programs to prevent errors and improper use of the computer

Page 13: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.13 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Operating System Definition (Cont.)Operating System Definition (Cont.)

No universally accepted definition

“Everything a vendor ships when you order an operating system” is good approximation But varies wildly

“The one program running at all times on the computer” is the kernel. Everything else is either a

• system program (ships with the operating system) or

• an application program

Page 14: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.14 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Computer StartupComputer Startup

bootstrap program is loaded at power-up or reboot

Typically stored in ROM or EPROM, generally known as firmware

Initializates all aspects of system

Loads operating system kernel and starts execution

Page 15: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.15 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Historical OverviewHistorical Overview

•“The 1st Generation”: vacuum tube technology (1945-1955)

A few milliseconds per arithmetic operation

•“The 2nd Generation”: transistor technology (1955-1965)

High-level languages, compilers, separate I/O processors

Electronic Computers

•“The 3rd Generation”: integrated-circuit technology (1965-1975) Operating systems, Microprogramming, multiprogramming, pipelining, cache memories

•“The 4th Generation”: VLSI (Very Large Scale Integration) (1975- present) Microprocessors, virtual memories, concurrency, networks, high resolution graphics

•Beyond the 4th Generation: artificial intelligence, massively parallel machines, extensively distributed systems

Page 16: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.16 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

11stst and 3 and 3rdrd Generations of Computers Generations of Computers

1st Generation Computer, 1954

3rd Generation Computer IBM-360, 1966

Page 17: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.17 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

History of Operating Systems: PhasesHistory of Operating Systems: Phases

Phase 1: Hardware is expensive, humans are cheap (1945-1965)

User at console: single-user systems

Batching systems

Multi-programming systems

Phase 2: Hardware is cheap, humans are expensive (1965-1981)

Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive (1981-1990th)

Personal computing: One system per user

Distributed computing: lots of systems per user

Phase 4: Ubiquitous computing (1990th and beyond)

Computers everywhere:

Cell phone, mp3 player, DVD player, etc.

Page 18: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.18 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

History of Operating Systems: PhasesHistory of Operating Systems: Phases

Phase 1: Hardware is expensive, humans are cheap

User at console: single-user systems

Batching systems

Multi-programming systems

Phase 2: Hardware is cheap, humans are expensive

Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive

Personal computing: One system per user

Distributed computing: lots of systems per user

Phase 4: Richer services

Real-time operating systems

Page 19: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.19 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

A Brief History of Operating SystemsA Brief History of Operating SystemsHand programmed machines (‘45-‘55)Hand programmed machines (‘45-‘55)

Single user systems

OS = loader + libraries of common subroutines

Problem: low utilization of expensive components

= % utilization = % utilization Execution time

Execution time +Card reader time

Page 20: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.20 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Batch/Off-line processing (‘55-‘65)Batch/Off-line processing (‘55-‘65)

Batching v. sequential execution of jobs

Card Reader:

CPU:

Printer:

Read Batch 1Read Batch 1

Execute Batch 1 Batch 2Batch 2 Batch 3Batch 3

Batch 2Batch 2 Batch 3Batch 3

Print Batch 1Print Batch 1 Batch 2Batch 2 Batch 3Batch 3

Card Reader:

CPU:

Printer:

Read Job 1Read Job 1

Execute Job 1 Job 2Job 2 Job 3Job 3

Job 2Job 2 Job 3Job 3

Print Job 1Print Job 1 Job 2Job 2 Job 3Job 3

Page 21: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.21 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

TapeTapeTapeTape

Batch processing (‘55-‘65)Batch processing (‘55-‘65)

Operating system = loader + sequencer + output processor

Input

Compute

Output

CardReader

CardReader PrinterPrinter

TapeTape TapeTape

Operating SystemOperating System

“System Software”“System Software”

User ProgramUser Program

User DataUser Data

Page 22: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.22 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Multiprogramming (‘65-‘80)Multiprogramming (‘65-‘80)

Keep several jobs in memory and multiplex CPU between jobs

Operating SystemOperating System

“System Software”“System Software”

User Program 1User Program 1

User Program 2User Program 2User Program 2User Program 2

User Program nUser Program n

...

program Pbegin : Read(var) :end P

program Pbegin : Read(var) :end P

system call Read()begin StartIO(input device) WaitIO(interrupt) EndIO(input device) :end Read

system call Read()begin StartIO(input device) WaitIO(interrupt) EndIO(input device) :end Read

Simple, “synchronous” input:

What to do while we wait for the I/O device?

Page 23: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.23 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Multiprogramming (‘65-‘80)Multiprogramming (‘65-‘80)

Keep several jobs in memory and multiplex CPU between jobs

Operating SystemOperating System

“System Software”“System Software”

User Program 1User Program 1

User Program 2User Program 2User Program 2User Program 2

User Program nUser Program n

...

Program 1I/O

Device

k: read()

k+1:

endio()interrupt

main{

}

}

OS

read{

startIO()waitIO()

Page 24: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.24 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Multiprogramming (‘65-‘80)Multiprogramming (‘65-‘80)

Keep several jobs in memory and multiplex CPU between jobs

Operating SystemOperating System

“System Software”“System Software”

User Program 1User Program 1

User Program 2User Program 2User Program 2User Program 2

User Program nUser Program n

...

Program 1 Program 2OSI/O

Device

k: read()

startIO()

interrupt

main{

read{

endio{

}schedule()

main{

k+1:

}

}schedule()

Page 25: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.25 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

History of Operating Systems: PhasesHistory of Operating Systems: Phases

Phase 1: Hardware is expensive, humans are cheap

User at console: single-user systems

Batching systems

Multi-programming systems

Phase 2: Hardware is cheap, humans are expensive

Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive

Personal computing: One system per user

Distributed computing: lots of systems per user

Phase 4: Richer services

Real-time operating systems

Page 26: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.26 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Timesharing (‘70- )Timesharing (‘70- )

A timer interrupt is used to multiplex CPU among jobs

Operating SystemOperating System

“System Software”“System Software”

User Program 1User Program 1

User Program 2User Program 2User Program 2User Program 2

User Program nUser Program n

...Program 1 Program 2OS

k+1:

schedule{

timerinterrupt

schedule{

timerinterrupt

k:

main{

}main{

}

timerinterrupt

schedule{

Page 27: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.27 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

History of Operating Systems: PhasesHistory of Operating Systems: Phases

Phase 1: Hardware is expensive, humans are cheap

User at console: single-user systems

Batching systems

Multi-programming systems

Phase 2: Hardware is cheap, humans are expensive

Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive

Personal computing: One system per user

Distributed computing: lots of systems per user

Phase 4: Richer services

Real-time operating systems

Page 28: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.28 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Operating Systems for PCsOperating Systems for PCs

Personal computing systems

Single user

Utilization is no longer a concern

Emphasis is on user interface and API

Many services & features not present

Evolution

Initially: OS as a simple service provider (simple libraries)

Now: Multi-application systems with support for coordination and communication

Growing security issues (e.g., online commerce, medical records)

Page 29: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.29 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

Distributed Operating SystemsDistributed Operating Systems

Typically support distributed services

Sharing of data and coordination across multiple systems

Possibly employ multiple processors

Loosely coupled v. tightly coupled systems

High availability & reliability requirements

OSprocess

management

OSprocess

management

UserProgram

UserProgram

CPUCPU

LAN/WAN

OSprocess managementmemory management

OSprocess managementmemory management

UserProgram

UserProgram

CPUCPU

OSfile system

name servicesmail services

OSfile system

name servicesmail services

CPUCPU

Network

Page 30: CIS-410: Operating Systems Spring 2008. Organizational Details Class Meeting: 7:00-9:45pm, Monday, Room 252N Instructor: Dr. Igor Aizenberg Office: Aikin

1.30 Silberschatz, Galvin and Gagne ©2005Operating System Concepts – 7th Edition, Jan 12, 2005

History of Operating Systems: PhasesHistory of Operating Systems: Phases

Phase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Multi-programming systems

Phase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing: lots of systems per user

Phase 4: Connecting people and their machines Intellectual property issues Information organization