By Amir Mohsen Djourabchi, Cen Kwang Ge, and Robert Nakamoto
Professor: Eddie Kohler
Office: 4531C Boelter Hall
Office Hours: MW 4~5 pm
Discussion Section: F 2~4 pm 5440 Boelter Hall
Class Website: http://www.read.cs.ucla.edu/111/
Textbook: Operating System Principles (can be purchased from Course Reader Material located at 1137 Westwood Blvd)
Progamming Language: C
Operating System: Unix/Linux (Linux Users Group at UCLA provides free installations and consultations)
1/3 Midterm (Wednesday 05/09) and final (cumulative 60% of 1/3): Both exams are open book and open notes.
1/3 Labs: There will be four labs for the quarter. The labs cover the following topics:
1/3 Miscellaneous assignments: Including:
Late Policy: Every student is allowed three free late days which they may use on any assignments throughout the quarter. After the free late days are gone, each day an assignment is submitted late will result in a grade reduction of about one letter grade.
Note that the unit of this late policy is days, neither hours nor minutes. As long as an assignment is late, it will be counted as one late day even though it is only late for several hours or minutes.
The following is a quote from Barbara Liskov who was a researcher at IBM and a professor at MIT. This is what she said about what it is like to be a software researcher:
Unlike engineers who design something in the physical world and are constrained by the laws of gravity, Liskov calls her medium "infinitely plastic." "We can do anything," she says. "There are no constraints." [from a profile of Liskov by Sarah P. Jones published in the Boston Herald, Sept. 30, 1996]
Why is software so plastic? Computers are the first type of artifact where improvements to the artifact help you improve the artifact faster. Software systems are plastic because we can use the first generation of the software to make the next generation more powerful. This fact can be written as the following differential equation:
d(technology)/dt = k * technology
Solving the differential equation results in the following:
=> technology = c * e ^ (kt) (i.e. technology is an exponential function of time)
The better our technology is, the faster our technology will improve.
The result of this property is that computer system technology continues to progress at an unprecedented rate, as described by Moore's Law.
1) In 1973, Ethernet was designed at the speed of 3 Megabits/second. In 2007, Ethernet’s speed is 10 Gigabits/second. There is an increase of 3333 times in speed in about 30 years.
2) In 1983, purchasing 1 GB of memory costs $200000. In 2007, purchasing 1 GB of memory costs $.10.
Because of these properties we have a huge opportunity to change the world!
For example, the Human Genome project would be impossible without the computer systems because of the large collections of data required. However, with Perl, it is possible to store and manipulate such large sets of data.
The paper called “How Perl saved the Human Genome Project” discusses this issue.
Nevertheless, in order to change the world, it is not enough to have an idea! You must implement it!
Textbook definition: A system is a set of interconnected components that have specified behavior observed at the interface with its environment. (This says that a system is made up of little pieces/blocks that are interconnected. A system can be viewed as successful if it satisfies some behavioral specifications. We don’t necessarily care how the system works internally, rather its interface to the environment.)
American Heritage Dictionary definition: A group of interacting, interrelated, or interdependent elements forming a complex whole.
Examples of some systems:
Why is it hard to build a system?
Properties of a system not present in the individual components but only present in the aggregate system.
Examples:
In both of these examples the designers did not take into account the affects of what could happen to the entirety of the system.
Emergent Properties of integers:
Here, we want to keep track of milk prices. Initially, we use integers to represent milk prices.
int price_of_milk_cents = 429;
But what if we want to measure things in fractional cents? We can use real numbers.
double price_of_milk_dollars = 4.29;
The emergent property here is the rounding error problem; the floating point numbers cannot precisely represent numbers of cents because 10 is not a power of 2. For instance:
double one_penny = 0.01;
But if you keep adding one_penny to itself, the answer you get eventually falls short of the expected answer.
Solution: Use decimal floating-point arithmetic where the base is 10 rather than 2. This is supported by hardware where fractions of a decimal can be very important (i.e. a bank).
Small changes propagate to affect the whole system. In other words, there are no “small changes” in a large system
Example: Airbus A380
What should change so that airports can support this larger airplane?
When the purpose of making Airbus A380 is to increase the efficiency of trasporting passengers, we see that how propagation of effects by Airbus A380 can affect the whole airport system and contradict the initial goal of flying more passengers.
Not all parts of the system follow the same scaling rules. As the system scales, some parts break!
Examples:
Some goals are incompatible with one another.
Example:
Spam filtering can lead to the following errors:
False positive: Mark real mails as spam.
False negatives: Mark spam as real mail.
One could write a spam filter that marks everything as being real mail. This will result in zero false positives, but it also results in a large number of false negatives. The more aggressive you are at marking mail as spam, the more likely you are to cause false positives. And the more aggressive you are at marking mail as real, the more likely you are to cause false negatives. This introduces a tradeoff between having false positives and false negatives.
Modularity breaks systems into subsystems, or modules, that counter emergent properties and propagation of effects and help us understand tradeoffs and incommensurate scaling.
The basic idea is that if we construct a big system from small systems where each of the small systems are correctly modular, then the big system will not have the above problems and is easier to work with.
A good system will contain modules that have a well defined behavior and interact only at specified interfaces.
The challenge is to achieve good modularity without compromising the system’s performance.
Examples:
The Golden Gate Bridge: Each of the cables of the bridge appears as a big single entity. However, designers of the bridge realized that having big single cables was problematic since if one cable failed the entire bridge would be destroyed. Also, it is almost impossible to produce one big single cable from the factory and transport it to the site. So, instead of having single gigantic cables, the cables of the bridge are each built from 17664 small wires. In that way, the cables are easier to manufacture and are more robust. But still, the interface between the bridge and the cables appears as single thick cables.
Modularity in object oriented programming:
Class Price { public: int cents() {return _c;} private: int _dollars; int _c; int hundredth_of_c; };
Here we achieve modularity by making the variables private and writing accessor functions. In the Price class the “_c” variable cannot be accessed directly outside this class.
How is a function modular? A function has some arguments and a return type but the underlying implementation can be arbitrarily changed without changing its interface. Function modularity is the basic modularity in programming.
Operating system abstracts hardware for applications. It provides applications with access to a abstract machine or virtual computer. This virtual computer virtualizes all of the computer's hardware, thereby enabling multiple applications and thus the user to access the hardware in a more performant, robust, neutral, and simple way than programming the hardware directly.
The operating system enables a computer to function properly by providing protection and sharing, that is, preventing applications from breaking the computer and allowing multiple applications to be run at the same time.
An important aspect of the OS/Application interface is that it has system calls. These are a special type of function call provided by the kernel for applications to use.
The most basic modularity in any computer system is the OS/Application interface. If this interface is poorly defined, good applications cannot be written. The history of Operating Systems is the history of improving this interface.