1 Operating Systems: Principles and Practice Cpr E 308.

24
1 Operating Systems: Principles and Practice Cpr E 308

Transcript of 1 Operating Systems: Principles and Practice Cpr E 308.

Page 1: 1 Operating Systems: Principles and Practice Cpr E 308.

1

Operating Systems: Principles and Practice

Cpr E 308

Page 2: 1 Operating Systems: Principles and Practice Cpr E 308.

2

What is an Operating System?

• It is the code that {Linux, Sun, Microsoft} provide

• The code which makes the computer crash

• …..

Copyright © 2002 Thomas W. Doeppner. All rights reserved.

Page 3: 1 Operating Systems: Principles and Practice Cpr E 308.

3

Introduction

• A computer system consists of– hardware– system programs– application programs

Page 4: 1 Operating Systems: Principles and Practice Cpr E 308.

4

What is an Operating System?

• It is an extended machine– Hides the messy details which must be performed

– Presents user with a virtual machine, easy to use abstractions

• It is a resource manager– Each program gets time with the resource

– Each program gets space on the resource

Page 5: 1 Operating Systems: Principles and Practice Cpr E 308.

5

Hardware Resources

Page 6: 1 Operating Systems: Principles and Practice Cpr E 308.

6

Floppy Disk I/O

Anybody who directly communicates with the floppy disk controller must deal with:

• Physical address on disk (disk block)

• The data recording format

• Turn on/off the motor

• Error detection/correction

Page 7: 1 Operating Systems: Principles and Practice Cpr E 308.

7

Abstractions

• Hardware– Disks

– Processors

– Network

– Monitor

– Keyboard

– Mouse

• Operating System– Files

– Threads of control

– Communication

– Windows, graphics

– Input (files)

– Locator

Copyright © 2002 Thomas W. Doeppner. All rights reserved.

Page 8: 1 Operating Systems: Principles and Practice Cpr E 308.

8

Program vs Process

• A process is a program in execution– Program is a piece of code– Process has “state” (what could this state be?)

• There could be multiple processes all simultaneously executing the same program

Page 9: 1 Operating Systems: Principles and Practice Cpr E 308.

9

Multiple Processes

• Coordinate accesses and sharing of resources

• Sharing in time – CPU cycles

• Sharing in space – Memory

Page 10: 1 Operating Systems: Principles and Practice Cpr E 308.

10

Memory Sharing

Process 1

Process 2

Operating System

Process 3

Physical memory

Page 11: 1 Operating Systems: Principles and Practice Cpr E 308.

11

Single Processor SharingEach process gets a “virtual processor”

Virtual processor Virtual processor Virtual processor

Real processor

Copyright © 2002 Thomas W. Doeppner. All rights reserved.

Page 12: 1 Operating Systems: Principles and Practice Cpr E 308.

12

Multi Processor SystemsVirtual processor Virtual processor Virtual processor

Copyright © 2002 Thomas W. Doeppner. All rights reserved.

Page 13: 1 Operating Systems: Principles and Practice Cpr E 308.

13

Deadlocks

(a) A potential deadlock. (b) an actual deadlock.

Page 14: 1 Operating Systems: Principles and Practice Cpr E 308.

14

What is an Operating System?

• It is an extended machine– Hides the messy details which must be

performed– Presents user with a virtual machine, easier to

use

• It is a resource manager– Each program gets time with the resource– Each program gets space on the resource

Page 15: 1 Operating Systems: Principles and Practice Cpr E 308.

15

History of Computer Hardware

• First generation 1945 - 1955– vacuum tubes, plug boards

• Second generation 1955 - 1965– transistors, batch systems

• Third generation 1965 – 1980– ICs and multiprogramming

• Fourth generation 1980 – present– personal computers

Page 16: 1 Operating Systems: Principles and Practice Cpr E 308.

16

History of Operating systems (1)

• Vacuum Tubes – No operating system– Programmers supplied all the code– All programs in machine language

Page 17: 1 Operating Systems: Principles and Practice Cpr E 308.

17

History of Operating Systems (2)

Early batch system– bring cards to 1401– read cards to tape– put tape on 7094 which does computing– put tape on 1401 which prints output– Use of high level languages

Page 18: 1 Operating Systems: Principles and Practice Cpr E 308.

18

History of Operating Systems (3)

• Third Generation Computers• Multiprogramming system

Page 19: 1 Operating Systems: Principles and Practice Cpr E 308.

19

History of Operating Systems(4)

• Third Generation– Multics (GE, Bell Labs, MIT)– OS/360 (IBM)– Unix (Thompson and Ritchie, Bell Labs)

• Originally written for DEC PDP-11

• Source code released to universities

• “Portable”

• Enhanced by Berkeley (BSD)

Page 20: 1 Operating Systems: Principles and Practice Cpr E 308.

20

PC/Workstation Operating Systems

• Apple Macintosh (GUIs)• Microsoft DOS, Windows• Sun OS, Solaris (Unix based)• 1987: Tanenbaum writes OS text

and toy OS “Minix”• 1992: Linus Torvalds releases Linux 0.12

(building on Minix)• 2001: Windows XP

Page 21: 1 Operating Systems: Principles and Practice Cpr E 308.

21

Course Info

• Text: “Modern Operating Systems” by Andrew S. Tanenbaum, 2nd edition

• Website http://class.ece.iastate.edu/cpre308/

• WebCT to handle grades, discussions

Page 22: 1 Operating Systems: Principles and Practice Cpr E 308.

22

Labs

• Weekly labs

• Check your section

• Labs begin next week

Page 23: 1 Operating Systems: Principles and Practice Cpr E 308.

23

The Workload

• Programming Labs – 30%

• 2 Projects – 15%

• 3-4 home works Quizzes based on homeworks – 10%

• Two exams (mid-term 15% and final 30%)

Page 24: 1 Operating Systems: Principles and Practice Cpr E 308.

24

Collaboration

• Labs should be done individually (unless otherwise specified)– Not allowed to use work done by other students – Not allowed to get answers directly in any form

(ex: from the web)

• Cases of cheating will be dealt with severely