Lecture 1 Scribe Notes

Shaheen Mojtabai and Rob Durbin

CLASS INFO

Course:

Course: CS 111 - Operating Systems Principles

Web site: http://cs.ucla.edu/classes/fall10/cs111/

Professor: Paul Eggert (eggert@cs.ucla.edu) - 4532J Boelter - M 12:50-13:50 and W 11:00-12:00

TA: Jong Han (Jonathan) Park (jpark@cs.ucla.edu) - 4428 Boelter - TBD

TA: Keith Stevens (kstevens@cs.ucla.edu) - 4428 Boelter - TR 14:30-15:30

Book: Jerome H. Saltzer and M. Frans Kaashoek, Principles of Computer System Design: An Introduction , Morgan Kaufmann (2009). ISBN 978-01-2374957-4

Grading:

1/9 Midterm (Open book, open note)

2/9 Final (Open book, open note)

1/12 Each Lab (4)

1/15 Each Minilab (2x)

1/12 Design Project

1/12 scribe notes

1/30 One-page paper on recent Operating Systems Research

Labs:

Seasnet Lab

Seasnet servers (SSH to lnxsvr0[1-3].seas.ucla.edu)

Recommend help with install at UCLA Linux Users Group

Due:

Lab 1a is due THIS FRIDAY OCT 1

INTRODUCTION

Rim BlackPad/Playbook

RIM (Canadian makers of Blackberry) are buying an OS company QNX to make the OS for their new BlackPad/Playbook

QNX's OS is used in nuclear reactors and is a real time operating system

It has a reputation for reliability

It is a Message passing OS

The kernel cannot run programs, it only delegates tasks to devices

Why would RIM buy an OS company and just get rid of their existing OS? Current Blackberry OS 6.0 does not scale well, it is EXTREMELY complicated, very hard to adapt to new systems, and has unavoidable bugs due to its complexity.

What is a SYSTEM?

- Oxford English Dictionary (OED) - (1928)

I. An organized or connected group of objects.

II. A set of principles, etc, a scheme, method.

-The idea here is right, but too general to be useful.

-Greek

I. Organized whole, government, constitution, body of men or animals, musical interval, group of connected versus in a poem

-Greeks were closer, even though they did not have an operating system at the time. A government is a very complicated system with many parts and acts as a good analogy for what we mean.

What is an OPERATING SYSTEM?

- American Heritage Dictionary (2000)

Software designed to control the hardware of a specific data processing system in order to allow users and application programs to make use of it

-This definition is almost useless for several reasons. First, it is redundant "users…to make use of it" doesn't add any meaning to the definition. Next, we don't want operating systems to control a specific system because OSs today can control a variety of systems. They did get the part about control right though because the OS does have control over the system.

-Encarta (2007)

Master control program in a computer

-This makes sense and captures the idea of control again, but is otherwise useless and adds nothing to our previous definition.

-Wikipedia - 119 834 131

Set of computer programs that manage the hardware and software resources of a computer.

- In a way, Wikipedia had the closest definition. Some of the most important parts of an operating system is its resources and how it manages them.

-Book Definition

I. A system is a set of interconnected components that has a *specified behavior observed at the interface with its environment*

-The part in ** is a more computer science definition

-The part before is more of an OED type definition, so book combines both.

Description: system.png

-This figure shows how a system can be a combination of nested modules with inner functionality that the interface is SUPPOSED to hide from the viewer. You should only be concerned with how the system interacts with its environment, not how it is implemented internally. This is called abstraction.

-Room as a System

-Electrical components: well defined interfaces (Such as electrical 3 prong socket)

-Furniture layout: the chair pattern, which ones are for lefties, etc.

-Firefighter approach to layout is different

Note: these are NOT independent. The firefighter cares about the electrical layout because he does not want to cut into a power cable

PROBLEMS WITH COMPUTER SYSTEMS

1. Tradeoffs

Water bed effect: When you push down on one side of a waterbed, the other pops up. In other words, if you improve on one area, another area gets worse. For example, consider the time-space trade-offs in sorting. You can use sorting algorithms which maximize efficiency in time or space but normally not both. Any advantage you gain in one comes at the cost of loss in the other.

Incommensurate scaling: Why are humans about 2 meters tall?

There is such a thing as "too big" because things do not scale well.

Example: Your body produces heat proportional to your volume which grows at O(n^3) and it dissipates heat proportional to your area which grows at O(n^2). As a result, a bigger you would not be able to dissipate heat fast enough and you would melt.

Example 2: Bones can bear weight proportional to cross sectional area which grows at O(n^2) while weight grows with volume at O(n^3). As a result, a bigger you would crush all of your bones and you would be a pile of jelly on the pavement.

Overall idea: things sometimes do not scale well. This must be considered when we attempt to take a concept that works in a cell phone and use it to run a tablet (see story about Blackberry above).

2. Economies of Scale

This means that items become cheaper per unit as size grows.

Example: Pin Factory - If all the people in a town needed pins, this could be solved in one of two ways. First, each person could individually make their own pins, which means that whenever a person wants 1 pin, they have to get some metal, fire up their personal forge, melt it down, etc. As we would expect, this is extremely inefficient. A better plan is to have one person in the town specialize in just pin making so that he makes all the pins for the entire town. Since he will become more skilled at this one task, he can pipeline certain tasks, and he can even run some tasks in parallel (like cut 8 pins at one time), he will be much more efficient. Therefore, it is cheaper for everyone if this man makes all of them.

Diseconomies of Scale

In some situations, items become more expensive per unit as size grows.

Example: Star Network - Each port must communicate with every other port so adding a 6th port means that this port has to connect with 5 others and 5 others have to connect to it. When we add a 7th port, this port must now connect to 6 others and 6 others must connect to it. As a result, each additional port is more complex and therefore more expensive than the last. 50+ port switches can cost thousands of dollars.

3. Emergent Properties

Emergent properties come into play in larger systems and are usually unanticipated before scaling.

Example: Tacoma Narrows - The principles of bridge design worked very well for small models, but when it was scaled up, the issue of resonance emerged. This is only a problem with large bridges, so models never anticipated this, and, as a result, this bridge collapsed because of the wind.

Example 2: Napster - The Government wanted to give more bandwidth to students for educational purposes, but the students then overloaded it with illegal music downloads.

4. Propagation of Effects

This is when change to one part of a system causes an unanticipated change in a far distant part.

Example: Using '/' to separate folder names - When standards expanded to support Japanese characters, it was decided that they would use multibyte characters. This became a problem because when parsers looked through bit patterns to find '/' to delineate folder names, it was possible that this patter was just the end of a Japanese character. Notice, the system of using '/' to separate folder names worked fine. The system of using multibyte characters for Japanese support worked fine. When these two were combined, however, the full system failed. As a result, a change in one part that seemed completely unrelated, actually effected another part.

All these problems can be summed up in one word "COMPLEXITY"

Q: Why are our systems so complicated?

A: Because we can! Sort of…

-Hardware guys are giving us complicated devices

-Look at Moore's Law(Number of transistors double every 2 years on integrated circuit)

Description: Transistor_Count_and_Moore's_Law_-_2008_1024.png

(http://en.wikipedia.org/wiki/Moore's_law)

Because the hardware guys are able to build more complicated devices, they do. Since they make them, we make stuff that runs on them. As a result, our systems get very complicated. Examples include multi-core processors, multi-level cache hierarchies, etc which introduce race conditions and various other problems.

And Kryder's Law

-Disk Capacity doubling in same way as Moore's Law. As memory expands, we have to be able to address it. This means more bits for pointers, etc. Again, more complicated hardware breeds more complicated software.

Description: Christensen97-10.jpg

(http://www.kk.org/thetechnium/Christensen97-10.jpg)