Computer Systems Principles Introduction

21
UNIVERSITY OF NIVERSITY OF MASSACHUSETTS ASSACHUSETTS AMHERST MHERST Department of Computer Science Department of Computer Science Computer Systems Principles Introduction Emery Berger and Mark Corner University of Massachusetts Amherst

description

Computer Systems Principles Introduction. Emery Berger and Mark Corner University of Massachusetts Amherst. Today’s Class. Organizational meeting Course organization & outline Policies Prerequisites & course sign-up Intro to systems. Organizational Information. Course web page - PowerPoint PPT Presentation

Transcript of Computer Systems Principles Introduction

Page 1: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science

Computer Systems PrinciplesIntroduction

Emery Berger and Mark CornerUniversity of Massachusetts

Amherst

Page 2: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 2

Today’s Class Organizational meeting

– Course organization & outline– Policies– Prerequisites & course sign-up

Intro to systems

Page 3: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 3

Organizational Information Course web page

– Visit www.cs.umass.edu/~emery/

Contact info– [email protected]

Page 4: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 4

Class Information

Prerequisites– CMPSCI 187: Data Structures

Recommended– CMPSCI 220: Programming Methodology

No required text– Course notes available on-line:

• http://www.cs.umass.edu/~emery/CSP-book.pdf

Page 5: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 5

Course Requirements Note: Percentages are subject to revision. Five programming projects: 35%

– Strict late policy!– Autograder

Participation: 5% Exams: 60%

– Midterm & cumulative final

Page 6: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 6

Projects and Autograder Most projects autograded

– Provides fast feedback You will need EdLab accounts All projects in C++ Test and submit on Linux systems

Page 7: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 7

Plagiarism Cheaters will be found & executed

– Sophisticated detection software– We follow rent-a-coder.com, etc.

Cheating =– “Borrowing” code from someone

• Includes reading previous solutions– Giving code to someone (even next year)– Copying code from anyone (including the net)– Hiring someone to write your code– Submitting someone else’s code as your own– Looking at anyone else’s code

Page 8: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 8

Computer Systems Principles What this class is about

Page 9: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 9

Build Large Computer Systems Goals: Fast, reliable, large scale To build these systems, you need to know

– Each computer:• C and C++ (nitty gritty & more)• Concurrency & scheduling• Memory management & locality• Disks, network, file systems

– Across cluster:• Server architectures• Distributed computing, file systems

Page 10: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 10

A Brief History of Systems And now, for some historical context

– From mainframes to web-based systemsin nine slides

Page 11: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 11

1. Single-User Computers Hardware: expensive; humans: cheap One user at a time on console

– Interacting with as program runs Computer executes one function at a time

– No overlap: computation & I/O User must be at console to debug

Multiple users = inefficient use of machine

Page 12: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 12

2. Batch Processing Execute multiple “jobs” in batch:

– Load program– Run– Print results, dump machine state– Repeat

Users submit jobs (on cards or tape) Human schedules batches of jobs Operating system loads & runs jobs

More efficient use of machine– less waiting on the slowest component

Page 13: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 13

3. Overlap I/O and Computation Before: machine waits for I/O to complete New approach:

– Allow CPU to execute while waiting– Add buffering

• Data fills “buffer” and then output• typically magnetic tape “buffer”, then removed to a printer

– and interrupt handling• I/O events trigger a signal (“interrupt”)

More efficient use of machine– still one job at a time

Page 14: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 14

4. Multiprogramming Several programs to run simultaneously

– Run one job until I/O– Run another job, etc.

OS manages interactions– Which jobs to run (schedule)– Protects program’s memory from others– Decides which to resume when CPU available

Page 15: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 15

OS Complexity Increased functionality & complexity First OS failures

– Multics (GE & MIT):announced 1963, released 1969

– OS/360 released with 1000 known bugs Need to treat OS design scientifically Managing complexity becomes key to…

Page 16: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 16

The Renaissance (1970’s) Hardware: cheap; humans: expensive Users share system via terminals The UNIX era

– Multics:• army of programmers, six years

– UNIX:• three guys, two years• “Shell”: composable commands• No distinction between programs & data

But: response time & thrashing

Page 17: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 17

Industrial Revolution (1980’s) Hardware very cheap;

– humans expensive Widespread use of PCs

– IBM PC: 1981, Macintosh: 1984 Simple OS (DOS, MacOS)

– No multiprogramming,concurrency, memory protection, virtual memory, …

– Later: networking, file-sharing, remote printing…– GUI added to OS (“WIMP”)

Page 18: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 18

The Modern Era (1990’s-now) Hardware cheap; more processing demand “Real” operating systems on PC’s

– NT (1991); Mac OS X; Linux Different modalities:

– Real-time: Strict or loose deadlines– Sensor/Embedded: Many small computers– Parallel: Multiple processors, one machine– Distributed: Multiple networked processors

• Think P2P, the Web, Google

Page 19: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 19

Architectural Trends Big Changes

– In 50 years, almost every computer part9 orders of magnitude faster, larger, cheaper

http://audilab.bmed.mcgill.ca/~funnell/Bacon/HW/cpu_log.png

Page 20: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science

Running out of Steam?

20

http://smoothspan.wordpress.com/2007/09/06/a-picture-of-the-multicore-crisis/

Page 21: Computer Systems Principles Introduction

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTS ASSACHUSETTS AAMHERST • MHERST • Department of Computer Science Department of Computer Science 21

Coming Soon New “features” coming

– Multiple cores everywhere– Unreliable memory (?)– Flash memory (SSDs)– Serious power/heat constraints

Other tradeoffs possible– Computing power for reliability…