CS 111 : Lecture 1 : Scribe Notes
Fall 2014
By Ryan Trihernawan and Justine Bateman-Fluent
Recommended Classes
- CS 131 – Programming languages
- CS 151B – Architecture
- CS 118 – Networking
Assignments
Late submission policy:
2^(N-1) points out of 100 taken off the assignment for N days late
A quote about operating system by Marina Weisband of Pirate Party DE, Germany:
“We don’t offer ready made program but an entire operating system”
Definition of a system:
- Oxford English Dictionary (1928):
- An organized or connected group of objects
- A set of principles, etc; a scheme, method
- In Greek:
- Government
- Flock of birds
- Connected stanzas in a poem
Definition of an operating system:
- Encarta (2007):
- Master control program in a computer.
- American Heritage Dictionary (2000):
- 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.
- Wikipedia 626493180 (2014-09-21):
- Software that manages computer hardware and software resources and provides common services for computer programs
- Textbook:
- A set of interconnected components that has a specified behavior observed at the interface with its environment
System design
Systems "nest". Big systems operate by connecting with little systems.
Our classroom is a “furniture system”,
an “electrical system”,
an “audio/visual system”
These systems are interconnected. E.g., an electrical action can be heard and observed by the A/V system.
If you were to redesign the room, you would bring in experts of the different systems.
Each expert would design a system from their point of view. You need someone to coordinate it all.
Build bigger systems out of small systems.
Problems with designing and using computer systems
- Scaling
- Incommensurate scaling
- As things get bigger, different parts scale at different rates.
- If a human body was suddenly 10x taller, its body could not support the new weight, etc..
- Economy of Scale
- Adam Smith's theories in “Wealth of Nations” popularized the term.
- E.g. The pin factory. You can cut the wire yourself, but it’s more efficient to have just one company cutting and sharpening the wire, so you can spend your time doing what you do best.
- Drawback: as the production company, you will overestimate need and will have waste.
- Also, too much investment in your capital and that creation of wasted capacity to make pins can exceed demand.
- Diseconomies of Scale
- Can cause breakage.
- E.g., Ethernet switch
- 8-switch version == $20-$30
- 250-switch version == too expensive
- Small processor inside that does not scale.
- Qualitative Differences
- Emergent properties.
- Properties of your system you didn’t consider before scaling.
- E.g., 1990’s at UCLA, re: Internet usage on campus. All dorms wired.
- Students used the connection to download music and watch video.
- School had not anticipated legal issues related to copyright infringement.
- E.g., Tacoma Narrows bridge collapse. Cause == emergent properties.
- The wind blew and caused violent vibrations that collapsed the bridge.
- You do not want to be part of an OS system with emergent properties.
- Propagation of Effects
- You have a nice, modular system (you think), but what will happen is that a problem in one module will affect interaction with another.
- E.g., in OS, we have two parts that should be independent:
- File names ( \system\boot ) and Japanese characters decoding system with “Hi, (Japanese character)!”
- Problem is that the lower byte of Japanese char byte looks like a backslash.
- If you give it to the file names subsystem, it will be rejected because it expects “Hi” to be a directory.
- The solution == insist that the high order bit
- UTF-8 downside: you have less room (3 bytes, instead of 2)
- Change encoding scheme
- Microsoft changed their kernel to understand Japanese.
- Trade-offs
- Must decide which of 2 changes is more important.
- I.e., “The Waterbed Effect”
- A change in one area will shove change into another area.
- Time/Space trade-off
- Fast answer (memory hungry)
- Slow answer
- Time/Energy trade-off
- Fast answer (memory hungry)
- Slow answer
- i.e, From CS32, you have an array with 1 million records, each 100 bytes.
- Want to use memcmp(a, b, 100) and process it quickly.
- Solution == Make another array of pointers and sort the pointers.
- Then you will have a sorted array of pointers (less bytes per item)
- Trade-off: You had the expense of creating another array.
BIGGEST PROBLEM==COMPLEXITY
Next lecture: Professor Eggert will show how complex an OS can be.