CS162 Lecture 5/04/05 Smith Read ※Hints for Computer System Design§ by Butler W. Lampson in the reader Butler W. Lampson founded Berkeley Computer Corporation (1969-71): With the SDS 940 group from Berkeley, I founded a computer company to make large time- sharing systems. I did the overall design of the operating system, including the functions of the three specialized micro-coded processors which do most of the overhead work [6]. I also implemented the scheduling micro-processor and parts of the terminal-handling micro-processor [19]. One machine was built and ran successfully at the University of Hawaii for a number of years, though the company was a commercial failure. After the company failure, he went to many research centers, included: Zerox research center, Digital research center Currently, Lampson is with Microsoft research center. Monopoly is affective way for research centers to be successful, like Microsoft and Intel Student: What about Google lab? Professor: Google lab just started. Make a living by being smarter, coming up with new and exciting things. Student: What*s the purpose of research lab? Professor: Benefit the stock holders, to aid the profitability. Researches are tenuous, so tend to get cut when companies are not making a profit. It has no immediate profit. An example of companies making a profit in the long run out of the research is transistor patent for Bell Labs. The Japanese miracle Americans were blown away in the 70*s 每 80*s, by Japanese who finished developing projects that were killed in the US. But the truth was, in US. Imagine you start with 25 good ideas, 10 get funded, but slowly the projects get killed off until only 2 profitable ones left. Japan, on the other hand doesn*t kill until after 4th try at the project, but they have too many failures to make a profit. A study was conducted in early 90s about Japan versus US profitability. It was found that US had15% increase in growth and Japan only 3%. Japan had 0 growths for 15 years. Student: went to a research thing in Japan last summer in one of their best universities and they didn*t have a CS department, the closest thing is ME. Professor: Japan is not known for its software. Although, Japan has good translation and recognition software# besides that there is nothing# Hits for computer system designers (Lampson) Quotes discussed by the professor: After each quote are comments or explanations professor added. For some quotes, he didn*t make any comments. ※after the second system [6] comes the fourth one.§ This says people usually start with great idea, and then they want to create a second system a perfect design, and then discover it*s a disaster because it*s too ambitious. So in the 3rd design they will cut down. But during the 4th design, they are prone to make the same mistake again. Smart people get you out of ditches you shouldn*t be in the first place. But smart != knowing what you*re doing. ※interface design must satisfy three conflicting requirements: an interface should be simple, it should be complete, and it should admit a sufficiently small and fast implementation.§ Interface design is the most important and difficult. Student: what kind of interface is he referring to? Professor: all interfaces -- application, protocol, etc. ※do one thing at a time, and do it well#§ A good interface should do a minimal number of things and do it well instead of trying to do everything. ※Everything should be made as simple as possible, but no simpler. (A. Einstein)§ if it doesn*t do anything you want it to do, it*s too simple. § Get it right. Neither abstraction nor simplicity is a substitute for getting it right.§ ※Make it fast, rather than general or powerful. If it*s fast, the client can program the function it wants, and another client can program some other function.§ ※The trouble with slow, powerful operations is that the client who doesn*t want the power pays more for the basic function. Usually it turns out that the powerful operation is not the right one.§ if basic operation is slow and complicated, you can*t make it any faster if you build on top of it faster operations. ※it is normal for 80% of the time to be spent in 20% of the code, but a priori analysis or intuition usually can*t find the 20% with any certainty.§ You know there*s going to be bottleneck, but you don*t know what it*s going to be. ※When a low level of abstraction allows something to be done quickly, higher levels should not bury this power inside something more general. The purpose of abstractions is to conceal undesirable properties; desirable ones should not be hidden.§ For example x86 MIPS is something you want to hide. ※Keep basic interfaces stable. Since an interface embodies assumptions that are shared by more than one part of a system, and sometimes by a great many parts, it is very desirable not to change the interface.§ Microsoft and Intel are successful because they maintain their interfaces; people are locked into them# ※Plan to throw one away; you will anyhow [6]. If there is anything new about the function of a system, the first implementation will have to be redone completely to achieve a satisfactory (that is, acceptably small, fast, and maintainable) result. It costs a lot less if you plan to have a prototype.§ Building something right first time is very hard. You can*t take a system that*s not quite right and fix it. You should start from scratch. It*s better and faster that way. ※it pays to revisit old decisions as the system evolves; in particular, optimizations for particular properties of the load or the environment (memory size, for example) often come to be far from optimal.§ ※Keep secrets of the implementation. Secrets are assumptions about an implementation that client programs are not allowed to make (paraphrased from [5]). In other words, they are things that can change;§ 7000 IBM series# had bit patters that were invalid, but they did useful stuff so people started use them# so IBM had to implement those op codes# You don*t want people to by pass your interfaces; else you are stuck to stay compatible with what they did# ※Handle normal and worst cases separately as a rule, because the requirements for the two are quite different: The normal case must be fast; The worst case must make some progress. In most systems it is all right to schedule unfairly and give no service to some of the processes, or even to deadlock the entire system, as long as this event is detected automatically and doesn*t happen too often. The usual recovery is by crashing some processes, or even the entire system. At first this sounds terrible, but one crash a week is usually a cheap price to pay for 20% better performance.§ ※When in doubt, use brute force.§ ※Doing things incrementally almost always costs more§ ※A system cannot be expected to function well if the demand for any resource exceeds two-thirds of the capacity, unless the load can be characterized extremely well. Only the crudest parameters produce# the most success schemes#§ You can do research studies, you sees things get 3% better.. but it doesn*t really# ※Shed load to control demand, rather than allowing the system to become overloaded.§ It*s like a red button for user to push if anything doesn*t work# Either fix the problem or kick the user off. It*s to keep people away from terminal. Serve me right away, or go home. Like buying a ticket, if you see a long line, you can decide to go home and come back later. ※Making a system reliable is not really hard, if you know how to go about it. But retrofitting reliability to an existing design is very difficult.§ Microsoft is like a Swiss cheese, full of holes. They patch up one after another, and sometimes one gets patched up which create new ones. Student: How does Microsoft patch their software? Professor: they can do binary patch# ※End-to-end. Error recovery at the application level is absolutely necessary for a reliable system, and any other error detection or recovery is not logically necessary but is strictly for performance.§ Professor: you should read the article. That*s all the technical material for this class. Now talk about Grad school. Grad school: ******************** Why grad school: Bs not sufficient training., Adv degree good for career Getting job Good salary Affects type of work you do Make contacts, friends: social network, it*s your friends that tell you about openings.. Contacts are useful People take you more seriously# ************************* Which degree Bs- basic technical work Ms 每 more design responsibility, more id Ph d 每 research, design, teaching Other degrees 每 law, med, management ***************************** Career center salary figures: BS degree Year num of people reported ave-salary 2000 116 62301 2001 104 64806 2003 54 55814 MS degree 2001 13 72692 2003 11 74595 ******************* when to apply? Deadlines between November to January for fall, Some schools admit in mid-year ********************* Now or later? You appreciate grad school more and get more out of it if you work for a while It is diff to return to school after work But you know how to get things done.. more successful ****************** How long does it take? Ms 每 1 to 3 years. (depend on thesis/project) phD 每 3 to 10 years, 5-6 av. Increasing. ****************** Where to go? Try to go to a good school Personal opinion in a reasonable location Professor spends10 minutes making fun of Purdue because someone complained when he made fun of Carnegie Mellon and Pittsburg# Large departments give you a choice of faculty and area of concentration. But some departments are strong or weak in certain areas. *********************** Where are you going to get in? Depend on grades, gre*s recommendations, and personal statement. Some faculty emphasize ※smart§; some emphasize research experience Statement should make sense, not say anything stupid. Make sure grammar, spelling are okay. Professor Smith look at grade and gre more, he wants smart people. ********************* Recommendations: Typically 3 required. Can supply more if you have both industrial and academic recommenders. But more are not necessarily better. Try to use the original form (it has boxes to check) *********************** Financial support At good schools, almost all PHD students are supported: Fellowships Research assistantships Teaching assistantships At weaker schools, support may or may not be provided MS students get support only if funds available. ************************* Stay at Berkeley? Generally recommended to change schools But not if quality/location far inferior *************************** Rankings of CS graduate schools 1993 Stanford 4.97 Mit 4.91 Ucb 4.88 Cmu 4.76 Cornell 4.64 Princeton 4.31 UT Austin 4.18 U Illinois u. washington ucsd went up probably top 10 now unc good graphics prog georgetech user interface and interaction + more rankings posted online.