operating systems conceptssmartynk/resources/cmput...introduction course info: textbook • there is...

Post on 03-Aug-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Operating Systems Concepts

CMPUT 379, Winter 2014 Section B1

Introduction

What is this course about?

• Demystifying some of the underlying operation and organization of computer systems

���2

Title text: This is how I explain computer problems to my cat. My cat usually seems happier than me.

Introduction

Course Info

• Instructor: Martha White

• TAs: Oscar Ramirez, Ankush Roy, Muhammad Waqar

• Check eClass for contact info, lab location, office hours:

• 3 programming assignments, worth 12%, 20% and 18%

• 5 written exercises with readings assigned, worth 5% each (25% total)

• Final exam worth 25%, open-book and open-notes

���3

Introduction

Course Info: Textbook

• There is a required textbook

• Editions 8 and 9 are both acceptable. There are some differences between them; the required information, however, is there

• The textbook is a great resource and has many additional resources online

• e.g. study sheet that summarizes the key concepts in each chapter

• e.g. solutions to practice exercises

• The textbook is well organized and detailed; I will post the sections you should definitely read

���4

Introduction

Course Info: Lecture structure

• 5-10 minute break in middle of class for a wake-up exercise (possibly jumping jacks or short video clips)

• Approximately 60% of time on lecture material, 40% going through real examples in code

• Read textbook chapters before lecture; we will spend time in class asking questions about concepts

���5

Introduction

Transparency

• I will try to be transparent in the purpose of assignments and my expectations of you

• Feel free to give me feedback on eClass (anonymously); I want to make this course as useful to you as possible

• e.g. Miss. Teacher, you are talking too fast

• I love to answer questions and give advice!

• Courses are for you to learn, not for you to get a degree; getting a good job in computing science is not dependent on your degree but rather you knowledge

���6

Introduction

Expectations

Yours

I will be organized in lectures and office hours

I will treat you with respect and listen thoughtfully to questions

I will be fair in marking

I will try to make lectures relevant, clear and interesting

Mine

You will take initiative in your own learning

You will treat me with respect and avoid disruptions

You will not cheat or copy — “in your head” rule: leave w/ evrythng in your head; nothing recorded

You should know C (prerequisite)

���7

Introduction

Why is this course important?

• Operating systems are fundamental to most computing environments e.g. PCs, mobile devices, clusters

• They control interaction with computers, including input, processing and output

• e.g. starting up the computer, receiving key strokes from keyboard, managing memory, scheduling tasks

• OS’s use wide-array of algorithms and techniques

���8

Introduction

The knowledge and skills you should have learned by the end of the course

• The goal is not to learn about specific operating systems solutions, but rather the problems that they tackle

• Some algorithms/solutions used in an operating system, e.g. sockets, priority scheduling; understanding of limitations and trade-offs in choices

• A realization that asking questions is useful and that there is not usually a “correct” answer

• Improved skill in programming in c, with a focus on robust and readable code

���9

Introduction

Why this course should be fun!

• Operating systems tackle some very interesting problems

• e.g. scheduling, optimizing performance, speech recognition

• The assignments are hands-on; lectures will include real coding examples

• Learn about a core part of a machine you use everyday

• My focus is on you learning, not on evaluating you; evaluating you just happens to be an effective strategy to get you to learn

���10

Introduction

What is an operating system?

• It is not clear cut; many examples that seem different

• Linux - RedHat, Fedora, Debian, Slackware, Ubuntu, ...

• Mac OS X (Darwin)

• Windows

• BSD Unix - FreeBSD, NetBSD, OpenBSD, DragonflyBSD

• Interesting Fact: Microsoft sued in 1998 for putting too much into OS and restricting innovation

���11

Introduction

Simplistic OS Kernel definition

• “The one program running on the computer at all times” is the kernel

• Everything else is either

• a system program (ships with the OS), e.g. Internet Explorer

• an application program, e.g. Firefox

���12

Introduction

What is the role of an OS?

���13

Resources

Computation

Storage

User 1

User 2

User 3

Introduction

What is the role of an OS kernel?

• control program: control execution of programs, external devices, keep machine running smoothly

• abstraction layer: hide idiosyncrasies of machine

• protection layer: avoid possibly horrible consequences of other’s bugs, does what programs can’t be trusted to do, makes programs play nice

• policy enforcer: input, outputs, interaction, signals

• resource manager: physical resources (processor, memory, storage devices) and virtual resources

���14

Introduction

Exercise: Issues to address for an OS

���15

• What are some of the issues an OS must deal with when connecting multiple users and shared resources?

• What are some of the assumptions an OS makes?

Introduction

What are the differences between OS’s?

• Highly dependent on the system they are designed for

• e.g. cluster, personal computer, mobile device

���16

Introduction

What are the differences between OS’s on similar platforms?

• Even for similar systems, each OS makes different design decisions and trade-offs

• e.g. Windows efficiency for small number of processes for one user, centralized control; Unix developers scalable multiprocessing and distributed (adaptive) control

���17

A Brief History of Operating Systems

IntroductionOperating System History

A world without operating systems

• Before operating systems, how were users connected to resources, like hardware and processing power?

• Fixed or manual operating systems (program with wires)

• First computers: every program needed full hardware specification to run

• with no intermediary OS to generalize, different programs had to be created for different machines

���19

IntroductionOperating System History

First Generation Computers (1945-1955)

• Vacuum Tubes: control electric current through a vacuum

• No operating system or programming languages

• Filled entire rooms, had to physically wire the computer to carry out instructions

���20

ENIAC

IntroductionOperating System History

Second Generation Computers (1955-1965)

• Transistors using semiconductors!

• Introduction of FORTRAN and assembler, written on punch cards

• Human operators at first had to act as OS, manually loading compilers for each job

• Batch jobs via tapes: input/output (I/O) separated from computation

���21

IntroductionOperating System History

Early Operating System: Resident Monitor

Early batch system with resident monitors• bring cards to 1401 to read cards to tape

• put tape on 7094 which does computing, controlled by Fortran Monitor System

• put tape on 1401 which prints output

���22

$END

$RUN

data for program

$LOAD

$FTN

$JOB

program to be compiled

IntroductionOperating System History

Third Generation Computers (1965-1980)

• Integrated circuits: transistors grouped on silicon chips

• High-level languages: PASCAL, BASIC

• With memory partitions, could read cards directly onto disk (one machine)

• Introduction of multiprogramming and time sharing, with user terminals - required more complex OS

• Introduction of MULTICS, which led to UNIX

���23

IntroductionOperating System History Copyright © 1996–2002 by Eskicioglu & Marsland (and Prentice-Hall and Paul Lu)

Overview 11July

99

Job interleaving

CPU

I/O

Job A Job B

time

uniprogramming

CPU is idle 47%I/O is idle 53%

Jobs A and B end at time 36.

Jobs A and B end at time 25.

“pure’’multiprogramming

CPU is idle 20%I/O is idle 36%

A B

Job A

Job A

Job B

Job B

CPU

I/O

time0 5 10 15 20 25 30 35

0 5 10 15 20 25 30 35

CPU Idle

I/O Idle

Job Awaits

Job Bwaits

Role of OS in third generation: multiprogramming and time sharing

���24

IntroductionOperating System History

Fourth Generation Computers (1980-now)

• Very Large Scale Integrated (VLSI) circuits - 5000 transistors per chip and Ultra LSI - million / chip

• personal computer revolution

• high-level languages like C and C++

• networks, distributed operating systems, parallel processing

���25

IntroductionOperating System History

Role of OS in fourth generation: users

• Tasks are changing due to user-base changing; main purpose is no longer scientific/business computation

• A much larger range of operating systems to account for differences in users (e.g. cluster versus mobile)

• We will learn about fourth generation operating systems with a focus on a single user with multiple programs on a single-processor (personal computers)

���26

IntroductionOperating System History

Modern Operating Systems are magic and you get to learn about them

���27

IntroductionOperating System History

What will 5th generation computers look like?

• Previous generations influenced by new hardware (e.g. vacuum tubes, transistors, integrated circuits, LSI)

• Do we already have the beginnings of 5th generation computers with mobile/tablet computing? Fundamental changes to interfaces? With increasing cores?

• Or will 5th generation not be defined by hardware advances?

���28

IntroductionOperating System History

Exercise: What do you foresee in 5th gen?

• What changes do you think might occur in the next leap forward in hardware and operating systems?

���29

IntroductionOperating System History

Some potential answers

• NLP and AI advances could lead to more interactive computers?

• Brain-computer interfaces?

• Large multi-processor systems?

• Non-silicon based computers? Biologically inspired?

• Cloud computing and storage fundamentally change access to shared items?

���30

IntroductionOperating System History

Where have we been?

• We have come a long way, but there are still many open problem in operating systems and upcoming changes

• Throughout lectures, we will discuss OS solutions, but also trade-offs and issues with design choices

• Consistent goal:

���31

Resources

Computation

Storage

User 1

User 2

User 3

top related