CS 111 Lecture 1 Scribe Notes - Spring 2013
by Stephanie Tung and Neeraj Khurana for a lecture by Professor Paul Eggert on April 2nd, 2013

Table of Contents

  1. Class Overview
    1. Professor and TAs
    2. Course Website
    3. Textbook
    4. Prerequisites
    5. Course Load
    6. Assignments
    7. Grading
    8. Late Policy
    9. Today's Assignments
  2. What is a system?
  3. What is an operating system?
    1. Definitions
    2. What do we want in an operating system?
  4. Problems with Computer Systems
    1. Tradeoffs
    2. Incommensurate scaling
    3. Emergent properties
    4. Propagation of Effects

Class Information

Professor and TAs

Professor: Paul Eggert

Office Hours: TBD in Boelter 4532J


Teaching Assistants:

Jonathan Shih

Office Hours: TBD in Boelter 2432

Defeng Xu

Office Hours: TBD in Boelter 2432

Weiguang Si

Office Hours: TBD in Boelter 2432

Course Website

http://cs.ucla.edu/classes/spring13/cs111/

Textbook

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

Author(s): Jerome H. Saltzer and M. Frans Kaashoek

ISBN-10: 0123749573 | ISBN-13: 978-0123749574

Prerequisites

Official:

Recommended:

Course Load

Supposed Hours/Week Actual Hours/Week
Lecture 4 3.7
Discussion Section 2 1.7
Outside Study 9 18

Assignments

You may work with a partner on labs and the design problem; however, all other assignments must be worked on individually!

Grading

Item Fraction of Grade
Labs (x4) 1/12 each
Final 2/9 (Monday, June 10thth 3PM)
Midterm 1/9 (Thursday, May 2nd 10 AM)
Minilabs (x2) 1/15 each
Design Problem, Presentation, & Report 1/12
Research Topic Paper 1/15 (Topics dsitributed 8th week)
Scribe Notes 1/20

Late Policy:

# of Days Late Points Subtracted From Total
1 1
2 2
3 4
4 8
5 16
6 32
7 64

The lateness penalty for an assignment that is submitted between N and N+1 full days late (where N is nonnegative) is 2^N% of the assignment's value. All assignments must be submitted by Friday of 10th week!

Today's Assignments:

  1. Read Ch. 1-2.3

  2. Lab 1a is due Wednesday, April 10th

What is a system?

Oxford English Dictionary (1928)
sys·tem

Definition:

  1. An organized or connected group of objects
  2. A set of principles, etc.; a scheme, method

Origin:

From Greek: συστημα organized whole, government, constitution, a body of people or animals, music interval

root: "set up with"
Textbook Definition:

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

What is an operating system?

Definitions:

American Heritage Dictionary 4th Edition (2000)
op·er·at·ing sys·tem

Definition:

  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.

Encarta (2007)
op·er·at·ing sys·tem

Definition:

  1. master control program in a computer...

Wikipedia (548325344 | 2013-04-02)
op·er·at·ing sys·tem

Definition:

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

What do we want in an Operating System?

  1. protection (against total failures, security attacks)
  2. robustness (against unusual requests)
  3. consistency/simplicity
  4. performance
  5. flexibility
  6. functionality

Problems with Computer Systems

Tradeoffs

"The Waterbed Effect"

Imagine a waterbed. When pressure is applied downwards on one point on the bed, the height of other regions is forced to move upwards. Just as there is a certain give-and-take with the waterbed, there are tradeoffs that occur in computer systems when attempting to optimize for certain traits, such as performance. If designers optimize one trait, another may deteriorate.


Time-space Tradeoff in Sorting

We are given 10^7 items, 100 bytes each that we need to sort. What is the most efficient way of sorting the data?

If we use mergesort, we have a complexity of O(n log n). There is a large overhead when we copy our data. How can we make this faster?

We create an array of pointers that point to each of our items that we would like to sort. By sorting the array of pointers, we can avoid the large memory overhead that comes with manipulating the actual data. Instead of shifting 100 byte items around, we are moving 4 byte items. We do still have a memory overhead of around 1/128.


Authentication

Hardware Token vs Password Authentication

We can utilize a hardware token or a password as authorization: think car keys vs computer password.

Incommensurate scaling


Not everything scales at the same rate.


Economies of Scale

As you increase the size of your production, the cost per product decreases.

Imagine a village where individuals make pins by hand. Each pin takes a large amount of time to make. Now imagine a village where one individual spends all of his time making pins. He is able to make pins in an assembly-line process and raise his efficiency, so the cost of each pin goes down.


Diseconomies of Scale

As you increase the size, the cost per product increases. Things can also break as they get larger.
A 4 port or 8 port ethernet switch is cheap to create, but the price of 512 ports is very expensive per port.

Emergent properties

Emergent properties are unanticipated properties that arise while scaling.

Propagation of effects

This is a natural property of chaotic systems. One change in a certain part of the system or process leads to a change in another part of the system or process.


Multibyte Encoding for Japanese Characters

When adding support for Japanese characters in the Microsoft OS, developers set a '0' leading bit to indicate the next byte as a regular ASCII character. In the case where the leading bit is '1', the next two bytes should be treated as a Japanese character. However, a different part of the system that searched for the (slash) character that split file and directory names would read a Japanese character with a section with the same bit pattern as the slash character as that character. When a user tried to used Japanese characters in file names, sometimes an error would occur.