CS 111 Lecture 1 Scribe Notes (9/30/2013)

Prepared by Jimmy Chen, Amber Yuyan Hu, and Kim Swennen

Table of Contents
1.Course Logistics
        a. Prerequisites
        b. Time Commitment
        c. Website
        d. Textbook
        e. Grade Breakdown
        f. Late Policy
        g. Drop-Dead Date
2.What is an operating system?
        a. What is a system?
        b. Definitions of an Operating System
3. Definition of a System
4. Problems in Computer Systems
        a. Incommensurate Scaling
        b. Emergent Properties
        c. Propagation of Effects
        d. Complexity



Course Logistics



Prerequisites


Required Recommended
CS 32 (Object-Oriented Programming in C++) CS 131 (Programming Languages)
CS 33 (Assembly Language) CS M151B (Computer Systems Architectures)
CS 35L (Software Construction Laboratory) CS 118 (Networking Systems)


Time Committment

Component Hours/Week
Lecture 3.7
Lab/Discussion 1.7
Outside Study 20


Website
Class website is at http://cs.ucla.edu/classes/fall13/cs111 .


Textbook
The textbook used for this course is Principles of Computer System Design by Jerome H. Saltzer and M. Frans Kaashoek.



Grade Breakdown

Assignment Information Weight
Midterm
  • 10/30/13
  • Open-book 
  • 100 Minutes
19
Final Exam
  • 12/09/13
  • Open-book
  • 180 Minutes
29
Labs
  • 4 Labs
    • Time-travell Shell
    • Kernel Hacking
    • File System
    • Distributed Application
  • 112 ea.
  • Recommended to be done in teams of 2
13
Minilabs
  • 2 Labs
  • 115 ea.
  • Must be done individually
215
Design Problem
  • Extension of a single lab
  • Submitted with written report and peresentation slides
112
Research Paper
  • 2-3 page paper on a research topic of choice
  • Due Friday of 10th week
115
Scribe Notes
  • Can be done in groups of 1-4 people
120


Late Policy

The penalty of the assignment is based on the following formula, 2N-1, where N is the number of days late.

Days Late % Penalty
1 1
2 2
3 4
4 8


Drop-Dead Date

The absolute deadline for all assignments is 23:59:59 on Friday of 10th week, 12/07/13 . No credit will be given for assignments turned in after this date.


What is an operating system?

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


What is a system?

Oxford English Dictionary (OED) - 1928

A system is:
1. An organized or connected group of objects.
2. A set of principles, etc., a scheme or method.
3. From Greek συστημα- an organized whole, government, constitution,  
    music interval, group of connected verses.


Definitions of an Operating System


American Heritage Dictionary, 4th edition

    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.

Encarta, 2007

    Master control of a program in a computer.

Wikipedia, Version: 574029146 (09/22/13)

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


Definition of a System

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




Problems in Computer Systems

A critical question to ask in system design: Can you safely ignore something?



Incommensurate Scaling (Quantitative)


There are problems that arise when not all parts of the systems scale at the same rate.

1. Diseconomies of scale:
                1. Growth of humans. Humans are not able to grow more than 2 meters tall, because strength varies with height quadratically, 
                 but weight varies with height cubically. 

                2. Star Network. As the number of connections in a star network increase (e.g. a switch), the number of cross-connections inside 
                the switch increase quadratically, so an 80-port switch will be far more expensive than an 8-port
switch
.

2. Economies of scale:
                1. Adam Smith's Pin Factory. It is more efficient and cheap for a factory to produce pins,
                    rather than having each single person make their own pin.
                    The factory can produce more pins at a lower cost per pin that other individuals 
                    who don't specialize in pin productions because they lack the specialized machinery.
               2. Computer Chip Manufacturing. The first chip will cost the most, but then each chip 
                   will get cheaper because the necessary mechanism to produce them will be in place.


Emergent Properties (Qualitative)
Not only does the cost per unit go up or down with scaling (quantitative), but new effects appear 
in the larger system that were never considered at the design of the smaller system (qualitative).

               1. Tacoma Narrows Bridge. This was a long bridge, built to scale against heavy weight.
                    It was so long that the resonant frequency of winds became a problem.

                2. Napster at UCLA. The Internet expanded into dorms so that students could easily work in their rooms.
                    Students, however, used the Internet and navigated to Napster to download music,
                    which was an unexpected use case.


Propagation of Effects
This occurs when internal details of the system leak out and causes problems.
          1. Butterfly effect. A butterfly flapping its wings could cause a Tsunami on the other side of the globe.

          2. Shift-JIS  To encode Japanese characters, a 2-character encoding for Japanese characters was implemented. 
                               The leading bit indicated whether the next 15 bits were encoded in ASCII or Shift-JIS.
                                Problems:
                                When a flename in Shift-JIS contained what would be interpreted in ASCII as a slash, so 
                                the filesystem interpreted the file as a directory. In this case, 
                                 one part of the Operating System (the encoding scheme) leaked into the filesystem!
                                Solutions:
                                1. Microsoft decided to fix the effect by teaching all of their file systems how to read Shift-JIS.
                                2. The UNIX/POSIX group wanted to build a better wall so the effects wouldn't propogate and decided not
                                       to use Shift-JIS, a solution which scales better.


Complexity
Where does complexity come from? Instead of reinventing the wheel, people have gotten better at building on other people's work.

           1. UNIVAC I. It had many methods to detect and correct for errors so it was rather large and expensive.

           2. UNIVAC II. It was designed to get rid of many possible errors from the UNIVAC I. Using a simulator forthe  UNIVAC II onthe  UNIVAC I, 
                                    they could easily figure out which parts were useful to keep.

           3. Moore's Law. Because the number of transistors on a circut doubles every 18 months, the complexity of computer chips grows
                                       at this rate.




In the next lecture, we will learn how to deal with complexity.