Site hosted by Angelfire.com: Build your free website today!

Department of Computer Science, UMass Amherst Andrew H. Fagg

Today: Introduction to Operating Systems

_ Course Organization & Outline (handout)

_ Prerequisite & Course Sign-Up (handout)

_ Introduction and History of Operating Systems

_ What is an Operating System (OS)?

_ Why are Operating Systems interesting and important?

_ A little historical perspective on OS's.

CMPSCI 377: Operating Systems Lecture 1, Page 1

Department of Computer Science, UMass Amherst Andrew H. Fagg

Course Goals

What should you get out of this class? An understanding of:

_ what are operating systems,

_ what are some of their components,

_ how are these components implemented, and

_ how do these component interact?

CMPSCI 377: Operating Systems Lecture 1, Page 2

Department of Computer Science, UMass Amherst Andrew H. Fagg

Course Organization

_ Course is already at capacity

_ Enrollment policy: priority to graduating computer science seniors

CMPSCI 377: Operating Systems Lecture 1, Page 3

Department of Computer Science, UMass Amherst Andrew H. Fagg

Class Meetings

_ Main lectures: Monday 1:25-2:15 and Wednesday 1:25-3:05

_ Discussion section: Friday 1:25-2:15

CMPSCI 377: Operating Systems Lecture 1, Page 4

Department of Computer Science, UMass Amherst Andrew H. Fagg

Prerequisites and Syllabus

_ CMPSCI 187 (Data structures) and CMPSCI 201 (Architecture)

_ Textbook: Applied Operating System Concepts (1st edition)

(Silberschatz,Galvin,Gagne)

_ Course requirements:

{ 6 homework assignments plus a few pop quizzes (20%)

{ 4 lab projects (39%)

{ 3 exams (39%)

{ Class participation (2%)

{ Grading on a curve (more on this later)

CMPSCI 377: Operating Systems Lecture 1, Page 5

Department of Computer Science, UMass Amherst Andrew H. Fagg

Prerequisites and Syllabus II

_ The programming assignments will use Java

_ Assume that everyone is comfortable with unix (speci_cally, linux)

_ Strict late policies and policies on cheating

{ Everything is due at 23:30 on the due date

{ Homework assignments: no credit if late

{ Lab projects: 10% penalty per day for up to 4 days (no credit

otherwise)

_ Everything will be handed in electronically (except tests/quizzes)

{ All submissions through the edlab machines (so you need to hone your

unix skills)

{ More details to follow...

CMPSCI 377: Operating Systems Lecture 1, Page 6

Department of Computer Science, UMass Amherst Andrew H. Fagg

Programming Projects

_ Lab 0: Get your EdLab skills down

_ Lab 1: Brush up on your Java abilities

_ Lab 2: Threads and Synchronization. Cooperating robots

_ Lab 3: Interprocess Communication. Simple multi-player, multi-machine

game of your own design

_ Lab 4: File Systems. Implement your own _le system that can handle

directories and _les of various sizes

CMPSCI 377: Operating Systems Lecture 1, Page 7

Department of Computer Science, UMass Amherst Andrew H. Fagg

What is Meant by Cheating?

It is Ok to:

_ Discuss homework and lab assignments.

_ On labs: work with one lab partner (labs 2,3,4).

_ Look at discussions and code on the net.

It is NOT Ok to:

_ Copy the answer of another student.

_ Copy or modify an answer that you download from the net.

Cheating is taken very seriously!

CMPSCI 377: Operating Systems Lecture 1, Page 8

Department of Computer Science, UMass Amherst Andrew H. Fagg

Course Organization: Misc

_ Accounts in the Ed-Lab: 35 Linux-based PCs

(elnux0.cs.umass.edu - elnux34.cs.umass.edu)

_ O_ce hours:

{ Andrew Fagg (Instructor): T/Th 10:00-12:00, CS 248 or by appt

{ Huan Li (TA): Wed 3:30-5:30, LGRT 220 (right across from the EdLab)

{ Vijay Sundaram (TA): Day/Time TBD, LGRT 220

_ Annoucements:

{ All announcements will be posted on the \announcements" part of the

web page.

{ Time critical announcements will be sent via email to your EdLab

account. Please make sure that you check this regularly or forward

your messages appropriately.

CMPSCI 377: Operating Systems Lecture 1, Page 9

Department of Computer Science, UMass Amherst Andrew H. Fagg

What is an Operating System?

CMPSCI 377: Operating Systems Lecture 1, Page 10

Department of Computer Science, UMass Amherst Andrew H. Fagg

What is an Operating System?

User Applications

Virtual Machine Interface

Physical Machine Interface

Hardware

Operating System

_ Operating system (OS):

{ Interface between the user and the physical architecture

{ Implements a virtual machine that is (hopefully) easier to program

than raw hardware

{ The virtual machine represents a set of abstractions that are

independent of the many possible implementations of the hardware

CMPSCI 377: Operating Systems Lecture 1, Page 11

Department of Computer Science, UMass Amherst Andrew H. Fagg

Operating System: Salient Features

What are the salient features of an operating system?

CMPSCI 377: Operating Systems Lecture 1, Page 12

Department of Computer Science, UMass Amherst Andrew H. Fagg

Operating System: Salient Features

_ Services: The OS provides a standard set of services to the hardware.

{ Examples: the _le system, virtual memory, networking, CPU

scheduling, time-sharing, and I/O

_ Coordination: The OS coordinates multiple applications and users to

achieve fairness and e_ciency (throughput).

{ Must be able to deal with conicting requests for services

{ Examples: concurrency (of many competing processes), memory

protection, networking, and security.

_ Goal: Design an OS so that the machine is convenient to use (a software

engineering problem) and e_cient (a system and engineering problem).

CMPSCI 377: Operating Systems Lecture 1, Page 13

Department of Computer Science, UMass Amherst Andrew H. Fagg

Why Study Operating Systems?

_ Abstraction: How to get the OS to give users an illusion of in_nite

memory, CPUs, resources, world wide computing, etc.?

_ System Design: How to make tradeo_s between:

{ performance and the convenience of OS abstractions,

{ performance and the simplicity of OS design,

{ putting functionality in hardware or software, and

{ hidden (controlled) and open OS implementations.

As systems change, the OS must adapt (e.g., new hardware, software).

_ System Intersection Point: The OS is the point in a computer system

where hardware and software meet.

CMPSCI 377: Operating Systems Lecture 1, Page 14

Department of Computer Science, UMass Amherst Andrew H. Fagg

Why Study Operating Systems?

We continue to see an evolution of operating systems (within the

commercial, research, and free software sectors). Also { understanding

operating systems will enable you to use your computer more e_ectively.

OS's also serve as an excellent example of system design issues whose results

and ideas you will apply elsewhere.

Background: To understand this course you must have a solid basic

understanding of hardware (CPU instruction sets, memory hierarchies,

I/O systems, etc.) and solid programming skills (complex data structures,

classes as an encapsulation mechanism, etc.)

You cannot understand the implications of how components intersect

without understanding the components.

) We will be studying a number of OS components in depth.

CMPSCI 377: Operating Systems Lecture 1, Page 15

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 1: Hardware is very expensive, humans are cheap

1. One user at a time on the console

_ One function at a time (no overlap of computation and I/O)

_ User must be on the console to debug

2. Batch processing: load program, run, print results, dump, repeat

_ Users give their program (on cards or tape) to a human who then

schedules the jobs

_ OS loads, runs, and dumps user jobs

_ More e_cient use of the hardware, but debugging is more di_cult

CMPSCI 377: Operating Systems Lecture 1, Page 16

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 1: Hardware is very expensive, humans are cheap

3. Data Channels, interrupts, overlap of I/O and computation

_ Bu_ering and interrupt handling in OS

_ Spool jobs on drum

_ No protection ! One job at a time

_ Performance improves because I/O and processing happen concurrently

CMPSCI 377: Operating Systems Lecture 1, Page 17

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 1: Hardware is very expensive, humans are cheap

4. Multiprogramming: several programs run at the same time, sharing the

machine, i.e., I/O and CPU processing overlap.

_ One job runs until it performs I/O, then another job gets the CPU

_ OS manages interactions between concurrent programs

{ Decides which spooled jobs to start

{ Protects one program's memory from other programs

{ Decides which process to resume when one gives up the CPU

A process here is an executing program + supporting data

_ First OS failures

{ Multics announced in 1963, released in 1969

{ OS/360 released with 1000 known bugs

) OS design and development is a science

CMPSCI 377: Operating Systems Lecture 1, Page 18

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 2: Hardware is cheap, humans are expensive

5. Interactive timesharing

_ Terminals are cheap

{ Many users can interact with the system at once, debugging is easy

{ Process switching occurs much more frequently

_ Memory is cheap - programs and data go on-line

{ 1 punch card = 100 bytes, 1MB = 10K cards

{ OS/360 was a stack of cards several feet high

CMPSCI 377: Operating Systems Lecture 1, Page 19

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

5. Interactive timesharing (cont)

_ UNIX simpli_es Multics so it can be implemented

{ Shell to accept interactive commands

{ File system to hold programs and data on disk

{ Rapid process switching to provide users with ability to interact with

programs

{ Virtual memory holds lots of programs and data ) many processes

can run simultaneously

_ New problems - response time & thrashing

{ No control over number of simultaneous users

CMPSCI 377: Operating Systems Lecture 1, Page 20

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 3: Hardware is very cheap, humans are expensive

6. Personal computing: computers are cheap, so put one in each terminal

_ Idea was to make the OS simple (again) by getting rid of support for

multiprogramming, concurrency, and protection (of both the processor

and of the _le system).

{ Did not really work (e.g., for DOS and early versions of Windows)...

Microsoft is putting all this functionality back into its OS

{ Why? Distributed computing & networking - we still want to share

resources, but now we want to share across machines

_ Focus moves to include user interaction (e.g., the window abstraction,

mice, graphics, etc.)

CMPSCI 377: Operating Systems Lecture 1, Page 21

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 4: Hardware is very cheap, processing demands are increasing

7. Parallel and distributed computing: allow multiple processors to share

resources

_ In parallel systems, multiple processors are in the same machine,

sharing memory, I/O devices, clock, ...

_ In distributed systems, multiple processor communicate via a network

_ Advantages: increased performance, increased reliability, sharing of

specialized resources

_ But: more processors add more overhead in coordination

_ 2-4 node (Pentium) machines are now commonplace; 1000 node

machines have been built

{ Symmetric: all processors are identical

{ Asymmetric: processors specialize

CMPSCI 377: Operating Systems Lecture 1, Page 22

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 4 cont: But why parallel computing?

_ What are the biggest machines computing today?

CMPSCI 377: Operating Systems Lecture 1, Page 23

Department of Computer Science, UMass Amherst Andrew H. Fagg

History of Operating Systems

Phase 4 cont: Hardware is very cheap, processing demands are increasing

8. Real-time systems allow computers to control physical machines or

provide high-quality interaction as in virtual reality

_ Timing requirements: tasks must be completed on time.

_ Hard real-time OS must meet timing requirements. Omit features with

unpredictable timing: user shell, virtual memory, disks.

_ Soft real-time OS allow deadlines to be missed.

Robotics:

UMass Torso

Virtual and

Augmented

Reality

CMPSCI 377: Operating Systems Lecture 1, Page 24

Department of Computer Science, UMass Amherst Andrew H. Fagg

History Lesson

Batch processing was right for its time, but it is not common anymore.

)Change is one of the de_ning forces in computer science.

Example

1983 1999

MIPS 0.5 500

price/MIP $100,000 $500

memory 1 MByte 1 GByte

network 10 Mbit/s 1 Gb/s

store 1 GByte 1 TByte

addressable bits 32 64

_ From 1953 to now (the 40 year history of computing), 9 orders of

magnitude change in almost every computer system component.

CMPSCI 377: Operating Systems Lecture 1, Page 25

Department of Computer Science, UMass Amherst Andrew H. Fagg

History Lesson

This degree of change has no counterpart in any other domain.

Examples:

_ Transportation { over the last 200 years, we have gone from horseback

(10 miles/hour) to the Concorde (1000 miles/hour) - 2 orders of

magnitude.

_ Communication { at the invention of the telephone (voice), TV (video)

and fax (text & pictures), communication went from the speed of

transportation to nearly the speed of light - 7 orders of magnitude.

CMPSCI 377: Operating Systems Lecture 1, Page 26

Department of Computer Science, UMass Amherst Andrew H. Fagg

Questions?

Before you go:

_ Hopefuls, please see me now

Next time:

_ Friday: EdLab Issues, Linux intro, and Lab 0

_ Monday: Read chapters 1 & 2

CMPSCI 377: Operating Systems Lecture 1, Page 27