CS 111 Lecture 1 Scribe Notes - Winter 2013

by Parth Shah for a lecture by Professor Paul Eggert on January 7, 2013

Table of Contents

  1. Class Information
    1. Professor and TAs
    2. Course Website
    3. Textbook
    4. Prerequisites
    5. Course Load
    6. Assignments
    7. Grading
    8. Current Class Information
  2. What is a system?
  3. What is an operating system?
  4. Problems with Computer Systems
    1. Tradeoffs
    2. Incommensurate scaling
    3. Emergent properties
    4. Propagation of Effects
    5. Complexity

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

Yu-Ting Yu

Office Hours: TBD in Boelter 2432

Course 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)

Prerequisites

Official

Unofficial (Recommended)

Course Load

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

Assignments

Grading

Item Fraction of Grade
Labs (x4) 1/12 each
Final 2/9 (Wednesday March 20th 8 AM)
Midterm 1/9 (Monday February 11th 12 PM)
Minilabs (x2) 1/15 each
Design Problem, Presentation, & Report 1/12
Research Topic Paper 1/15
Scribe Notes 1/20

Current Class Information

Read Ch. 1-2.3

Lab 1a due Tuesday, January 15th

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 the Greek word συστημα meaning "set up with"
  4. organized whole, government, constitution, flock of birds, music interval, a stanza

What is an operating system?

Encarta (2007)

Master control program in a computer.

The operating system is what controls the computer.


Wikipedia (v. 531774181) (2013-01-07)

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

Resource management lies in the heart of computer science.


Saltzer & Kaashoek (book's definition from section 1.A.2)

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

Interface technologies aka specified behavior observed include:


What is an operating system?

It is not usually this simple. But we can split up systems in different ways. Different split

Problems with Computer Systems

Tradeoffs

"The Waterbed Effect"

When you push down on one end, another end comes up. Thus, making one thing better can result into probems in another thing.

"waterbed effect"

For example, if you want to increase a processor's clock rate then not only will there be an increase in the overall performance by ignoring time lost to timing errors, but there will also be an increase in the power consumption and timing errors.


Time-space Tradeoff in Sorting

Lets say you have a 1GB array of 512B sized numbers in RAM that need to be sorted. What is the most efficient way in which to sort the numbers?

array in RAM

Mergesort? Here the complexity is O(n log n). The major overhead is that of copying data.

How would I make this 100x faster?

In the case where you can compromise memory for optimized time, a good solution would be one where you make an array of pointers in which each pointer points to a distinct 512B memory address in the array. Now you can sort the dereferenced pointers and get the sorted list. In this scenario, time is saved since swapping 4B pointers would occur much faster than swapping 512B numbers in the memory spaces of the array. However, memory is compromised since extra memory has to be allocated for the array of pointers. The memory overhead is about 1/128.

Array of pointers

Now, if each memory space was only 1B as opposed to 1KB then the above-mentioned time-space tradeoff would not work since the array of pointers is already bigger than the array itself. A good solution would be making a histogram which would solve the problem in O(n).


Building a Secure System

We have a RSA SecureID which is another form of authentication. When combined with the password we have on a certain account, we get the extra layer of security due to the RSA SecureID.

Problems with this form a security include having a plain password and/or losing and retrieving a new RSA SecureID is a hassle.

Incommensurate scaling

Used for quantitative measures. Not everything scales at the same rate. For example, why don't humans grow to be 20 meters tall? Why do they grow to be about 2 meters? This is because of scaling issues. For humans, strength scales at O(N2) whereas weight scales atO(n3). Thus at some point the human bones will break. If put in water, weight is not as much of an issue which is why whales grow to be so big. As this example shows, different parts of humans scale at different rates. Similarly, computer systems work the same way; the two types of incommensurate scaling that take place with computer systems are the following:

Emergent properties

Used for qualitative measures. Emergent properties are properties that are not evident when dealing with an individual component, but as we scale to having multiple connected components then they are evident.

Propagation of effects

This occurs naturally in engineered/designed systems as well as chaotic ones. One change in a certain part of the system or process leads to a change in another part of the system or process. One example being how Ronald Reagan becomes president because of a suicide.


An example would be multibyte encoding for Japanese characters which uses 1B ASCII characters. If the system sees '0' as the leading bit then it will treat the next byte as a regular ASCII character. In the case where the leading bit is '1', the system will treat the next two bytes as a Japanese character. The problem that arose was that sometimes the leading bit of the 2nd byte of the Japanese character started with a '0' and had the same bit-pattern as the file and directory separator (slash). Thus, when a user tried to use some of the Japanese characters in file names, they would receive error messages regarding an nonexisting directory or would end up modifying files they did not intend on modifying. This is the issue Microsoft had when it tried to implement JIS in Windows.


multibyte encoding

A good fix to this problem is using a differnt encoding. For example, Linux makes sure that its Japanese characters have a leading bit of '1' in every byte. Utf-8 is a newer and better character encoding which also avoids this problem of mistaking a Japanese character with a slash.