CS 111 Lecture 1 Scribe Notes (Spring 2013)

prepared by Barry Beckemeyer and Fred Westenberg for a lecture by Professor Paul Eggert on April 2, 2013

* For next time - read chapters 1-2.3

Table of Contents

  1. Course Logistics
    1. Professor and TA
    2. Website and Textbook
    3. Prerequisites
    4. Work Load
    5. Assignments and grading
  2. What is an operating system?
    1. What is a system?
    2. What is an operating system?
  3. What do we want from an operating system?
  4. Problems when building operating systems
    1. Trade-offs
    2. Incommensurate scaling
    3. Emergent properties
    4. Propagation of effects

Course Logistics


Professor and TA

Professor: Paul Eggert - eggert@cs.ucla.edu

Office Hours: Monday 14:00-15:00 and Thursday 13:30-14:30 in Boelter 4532J.

Teaching Assistant: Weiguang Si - forswg@cs.ucla.edu

Office Hours: TBD in Boelter 2432


Website and Textbook

Website: http://cs.ucla.edu/classes/winter13/cs111/

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


Prerequisites

Required Recommended
CS 31 - Intro to Programming CS 131 - Programming Languages
CS 32 - C++ Programming and Algorithms CS 118 - Networking Fundamentals
CS 35L - Unix Laboratory CS M151B - Computer Systems Architecture

Note: This course is a required prereq for CS 118 and a recommended prereq for CS M151B.


Work load

Proposed hours/week Actual hours/week
Lecture: 4 hrs/wk ~ 3.6 hrs/wk
Lab: 2 hrs/wk ~ 1.7 hrs/wk
Outside Study: 9 hrs/wk ~ 20 hrs/wk (Mostly programming)

Assignments and grading

Weight Assignment
1/9

Midterm

  • Open book, open note
  • 1.8 hours
2/9

Final

  • Open book, open note
  • 3 hours - Monday, June 10, 2013 at 3:00 PM
1/3

Labs

  • 4 labs, 1/12 each
    1. Shell
    2. File System
    3. Driver
    4. Something distributed
  • Recommended to work in teams of 2
2/15

Mini-labs

  • 2 minilabs, 1/15 each
    1. Scheduling
    2. Virtual Memory
  • "Toy Projects" - Individual work
1/12

Design Problem

  • Extension of one lab, due 1 week after lab with presentation and slides due 1 week after that
  • Teams of 2, presentation and written report
1/15

Research Paper

  • 2-3 page paper on OS issue of choice
  • Due at end of 10th week
1/20

Scribe Notes

  • Notes from one lecture for classmates
  • Worked on in teams up to 4 members
  • Done in HTML 4.0.1 or HTML 5.
  • Due one week after lecture**

**: Exceptions for Scribe Notes: The lecture one week before the midterm is due two days before the midterm, and lectures during last week are due friday of last week.

All assignments are due at 23:59:59 on date specified by course website. The grading policy is as follows. Points taken off = 2N-1, where N is the number of days late.

Important: Drop-dead date is Friday of 10th week. ALL assignments are due at this time. No credit will be received on assignments submitted after this.

What is an operating system?

"We don't offer a ready-made program, but an entire operating system"
-Marina Weisband on the German Pirate Party

What is a system?

Oxford English Dictionary(1928):

  1. an organized or connected group of objects
  2. a set of principles etc., a scheme, method
  3. from Greek: an organized whole, government, constitution, a body of people or animals

Textbook(Principles of Computer System Design: An Introduction, 2009):

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

system

What is an operating system?

American Heritage Dictionary 4th edition(2000):

  1. software designed to control the behavior of a specific data processing system in order to allow users and application programs to make use of it

Comments on this definition:

os1

Encarta(2007):

  1. master control program in a computer

Comments on this definition:



Wikipedia(version 548325344- 2013-4-2):

  1. a collection of software that manages computer hardware resources and provides common services for computer programs

os2

Comments on this definition:

What do we want from an operating system?

Problems when building operating systems

Trade-offs: The Water Bed Effect

waterbed

Merge-Sort: Time-Space Tradeoff
Consider a large array of 107 items to be sorted, each 100 bytes large. If we use Merge-Sort, an optimization could be to sort 4-byte pointers instead of 100-byte items.

Solution: Sort array of pointers to data
Pros
  • + Speed (Sort pointers, 25x speedup)
Cons
  • - Space (Need 4% more memory to store pointers)


Authentication: Convenience-Security Tradeoff

Two standard types of authentication are passwords and hardware tokens (such as a car key). Using a combination of these can optimize security.

Solution: Require both password and hardware key
Pros
  • + Security (Attackers need both key and password)
Cons
  • - Convenience (Must always have key and know password)

Incommensurate scaling

Not everything scales at the same rate.

Emergent properties

There can be unanticipated properties that emerge from scaling.

Propagation of effects

Natural property of chaotic systems; a small effect can snowball into a huge problem

Japanese Characters

There are so many Japanese characters that they cannot be represented in only one byte in the way the english characters can. So Microsoft chose to represent them using two bytes, and mark the Japanese characters by starting with a 1 bit, and the standard characters with a 0 bit. This system worked in most situations, but failed in a very specific situation involving the command line.

japanese

The problem involved a japanese-designated byte encoding to a forward slash, causing the word to be interpreted as a directory. A solution for this could be to not interpret every slash as a real slash in japanese environments.