CS111 Operating System (Spring 2014)

Lecture 1 Scribe Notes

prepared by Hannah Jin, Roger Ho, Ankit Mehta and Anthony Miyaguchi for lecture presented by Paul Eggert
on March 31th, 2014


Table of Contents

  1. Course Overview
  2. Real Life Examples of Attacks on System Weakness
  3. What is an OPERATING SYSTEM
  4. Problems with Computer Systems
    1. The Waterbed Effect
    2. Incommensurate scaling
    3. Propagation of effects
  5. Today's Assignment

I. Course Overview

Professor and TA

Professor: Paul Eggert
Office hours: Mondays 10:00AM-11:00AM and Thursdays 13:30PM-14:30PM

TAs:

Website and Textbook

Website

http://cs.ucla.edu/classes/spring14/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

Prerequesites for CS111

Required

Recommended

Back to the Top

Work Load

Work Suggested Hours/Week
Lecture 4
Discussion Section 2
Outside Study 9

Assignments and Grading

Item Weight
Labs (1A, 1B, 1C, 2, 3,4) [Team of 2] 1/12 each (Total 1/3)
Midterm (Wednesday, April 30th 2 PM) 1/9
Final (Monday, June 9th 3PM) 2/9
Minilabs (x2) [Individual] 1/15 each (Total 2/15)
Design Problem, Presentation, & Report 1/12
Research Topic Paper 1/15
Scribe Notes 1/20

Late Policy

Formula: 2N-1% penalty of assignment value

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

Back to the Top


II. Real Life Examples of Attacks on System Weakness

Virtual Server and File Backup

We have an Apache server that consults files and a file system tree as follows:

File system

When doing backups with tar -cf /dev/rmt (a tape device), this is a way to exploit this system in order to gain access to another virtual file system. We create a backup with tar, then while tar is running, we create a new file and immediately delete it and replace it with a symlink to a file on another virtual filesystem. This will allow us to access that file.

Domain Name System Poison

To perform a cache poisoning attack, the attacker exploits a flaw in the DNS software. If the server does not correctly validate DNS responses to ensure that they are from an authoritative source the server will end up caching the incorrect entries locally and serve them to other users that make the same request.

This technique can be used to direct users of a website to another site of the attacker's choosing. For example, an attacker spoofs the IP address DNS entries for a target website on a given DNS server, replacing them with the IP address of a server he controls. He then creates files on the server he controls with names matching those on the target server. These files could contain malicious content, such as a computer worm or a computer virus. A user whose computer has referenced the poisoned DNS server could be tricked into accepting content coming from a non-authentic server and unknowingly download malicious content.

Since these are examples of reasonable actions that lead to unreasonable/undesirable results, they are Design Flaws.

Back to the Top


III. What is an OPERATING SYSTEM

What is a System?

Student definition: group of components working together with connections between them

Oxford English Dictionary(original version 1928) defines system as:

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

In Greek, system is defined as: an organized whole; government; constitution; a body of people/animals/musical interval/group of connected verses in a poem.

What is an Operating System?

American Heritage(4th edition, 2000) defines operating system as: software design to control the hardware of a specific data processing system in order to allow users and application programs to make use of it (this was a horribly redundant definition written by English majors who had no idea what operating systems were).

Encarta(Microsoft Encyclopaedia): an operating system is the master control program of a computer.

Wikipedia 602065231(March 31, 2014 at approximately 11:00AM): Collection of software that manages computer hardware resources and provides common services for computer purposes.

Back to the Top


IV. Problems with Computer Systems

1. The Waterbed Effect

waterbed effect

The tradeoff in computer systems is vividly captured by the analogy of applying pressure to one point of a water bed and causing the rest of the bed to swell. Optimization of a certain aspect in computer system, such as performance is at the expense of another, such as space.

For example, to sort an array a with 220 entries and each entry is 1 kB. There are two apparent approaches:

array
1) qsort(a, 1<<20, 1<<10, cmp); sort the original array
2) qsort(i, 1<<20, sizeof(int), cmp'); create an index array and sort it instead

Pros and Cons of the second approach

Pros Cons
The complexity of sorting is O(NlogN), the copying overhead is reduced by a factor of 1024(size of entry)/4(size of int) = 256. Creating the index array cost around 0.5% more RAM.
The program is more complicated and cmp' is slower than cmp.
After sorted, it is equally slow to reference the values.

2. Incommensurate scaling

Not everything scales at the same rate.

Economies of Scale

As the scale of production increase, the cost per product decreases.

Pin Factory (Smith): Adam Smith wrote in his book "Wealth of nations" that it takes individuals a long time to make pins by hand themselves, whereas it is faster and more efficient for one individual to make all the pins in an assembly line. The cost of manufacturing one pin thus decreases. Click here to learn more about the pin factory example.


Diseconomies of Scale

As the scale increases, the individual cost rises.

Network Example: A 4-port or 8-port T switch is cheap to create. However, a 512-port is very expensive and 1000 is unreasonable.

3. Propagation of effects

This is a natural property of chaotic systems (for example, earthquakes). Change in a one part of the system or process induces change in another part of the system or process.

Back to the Top


V. Today's Assignment

Read Sections 1-2.3 from Textbook
Lab 1A due next Tuesday April 8th

Back to the Top