CS111 Lecture 1 Scribe Notes (Spring 2012)
Andy Bax, Ramkrishna Goda, Kyle Newkirk, Timothy Woo
Table of Contents
- Class Information
- Professor and TAs
- Course Website
- Textbook
- Prerequisites
- Course Organization
- Course Load
- Assignments
- Grading/Due Dates
- Exam Information
- Late Policy
- Warning
- Machine Requirements
- Intro to Operating Systems Material
- Lab 1 Overview
- What is a System?
- Interface Technologies
- System Nest
- Major OS Aspects
- Problems in Computer Systems
In the same way that a good manager of a business needs to know everything there is to know about a business, a good operating system needs to know everything about a computer. ~Eggert 2012
Class Information
Professor and TAs
Course Website
http://cs.ucla.edu/classes/spring12/cs111/
Textbook
Jerome H. Saltzer and M. Frans Kaashoek, Principles of Computer System Design: An Introduction, Morgan Kaufmann (2009)
Prerequisites
Official:
Recommended:
Course Organization
- 19 lectures
- 1 midterm (in lecture) - end of 5th week, 1 month from today, 100 minutes
- 1 final exam - 180 minutes
Course Load
| Official Hrs/Week |
Realistic Hrs/Week |
Lecture |
4 |
3.6 |
Lab/Discussion |
2 |
1.7 |
Outside Study |
9 |
15 or 20 |
Assignments
Allowed to work on labs solo or in groups of two.
- 4 Labs -
- Super aggressive parallelized operating shell. Consists of 3 parts A, B, and C.
- Device driver (tentative)
- File system (tentative)
- Internet system (tentative)
- 1 Design Problem (an extension of one lab)
- 2 Mini Labs (Smaller than labs. Lets you work on a particular important, but focused, aspect of operating systems. Done solo)
- 1 Written Report (1-2 pages on a future topic. Not yet determined.)
- 1 Scribe Note - Create an html website with your notes from one lecture and post it to courseweb. Must conform to HTML standards and be HTML 4.01 not HTML 5. Content is more important than beauty. CSS is allowed. Should be turned in as a tarball that can be unpacked. Groups of at most 4. Around 5 scribe notes per lecture allowed.
Grading/Due Dates
|
Fraction of Grade |
Due Date / Date |
Labs(x4) |
1/12 each |
1A: 4/10 1B: 4/24 1:C 4/27 |
Midterm |
1/9 |
5/3 normal class hours |
Final |
2/9 |
6/12 8-11am |
Mini Labs |
1/15 |
4/20 |
Design Problems |
1/12 |
1 week after lab |
Scribe Notes |
1/12 |
1 week after lecture |
Research Topic Paper |
1/30 |
6/8 |
Exam Information
Exams are open book and open notes but closed computer. In the exam he will
take some code, plop it in the test, and test you about it. This will be questions
where the answer is not in the book. He will ask one question where he does not
know the answer.
Late Policy
2n-1 points off where n=number of days off, rounded up to the nearest day. This is assuming the assignment is worth 100 points. Last day that you can turn in assignments is the last day of instruction, Friday June 8th.
Warning
You are encouraged to help each other in studying. You are
encouraged to discuss general ideas and directions. You can't turn in any work that is not your own.
If you submit code you have to had wrote it. It can't be anyone else's work.
Machine Requirements
You will need a computer to run your OS. Typically people will use a virtual
machine instead. Most common is QEMU or virtual box or VMware. You can run it atop your own desktop or the Seasnet Linux servers. Ucla Linux user group is a good resource to help you get Linux on your computer. They can help you get up to speed for this. There used to be a room called the Linux lab.
Intro to Operating Systems Material
Lab 1 Overview
sort a c | cat b - | tr A-Za-z > c
sort -k2 d - < a | uniq -c > e
diff a c > f
date > x
date > y
cat x y
problem: date > x and date > y and cat x y:
the first two can be run in parallel because the output of each command
are independent but the third cannot.
However the timestamp of x and y may be out of order due to running
in parallel but for our purposes we don't worry about this since we assume
our users care about performance more.
What is a System?
The text is about computer systems, but the course is about operating systems
Oxford English Dictionary Definitions:
- An organized group of objects
- A set of principles, etc,; a scheme, method
- From Greek, συστημα meaning "set up with" -
organized whole, government, constitution, a body of men or animals,
music interval, a stanza
Modern Definitions
- Master control program in a computer
- In an operating system you need to know what instruction will be executed next and
under whose authority
- 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
- This definition is too control oriented
- Only concerns "specific data processing system"
instead of general data processing systems which are more
relevant due to portability reasons.
Wikipedia
- a set of programs that manage computer hardware resources and provide common
services for application software
- "Resources" - not really appreciated, but is a very big deal. This definition introduces the idea of "managing" resources. In the real world, this would be called budgeting.
e.g. How much CPU to devote to a process
- "common services" - application software has a lot things in common
creating sockets, creating domain names … operating systems can
provide these to make it easier for application writers.
Book Definition
- a system is a set of interconnected components that has a specific
behavior, observed at the interface with this environment
Interface Technologies
- Network Protocols - If you have a network system, then the interface would be a network protocol. This is an agreed upon pattern of sending messages from point a to b and back.
- API(application programming interface), e.g. foo.h
- Application Binary Interface (ABI) - how hardware instructions are
executed -> when you are calling a function when is the argument being
called (regular expressions?)
- User interface: what you type in the keyboard/touchpad
(display + user input)
- Instruction set interface -> OS runs by executing machine code(this
is the interface at the lowest level)
System nest
- This is where you divide a big problem into smaller nested problems
- Nested systems are aspects - they are different ways of looking at a
bigger system
- For example, in a room you can look at it from the perspective of the electrical system. Or you could also look at it from the perspective of the architectural design of the furniture system
Major OS Aspects
- Virtualization - virtual memory, virtual machines
- Scheduling
- limited amount of resources
- too much demand for hardware resources
- scheduling for when resources are stretched thinly,
scheduling network access, schedule disk I/O
- Consistency - Rules for keeping applications the same
e.g. synchronization
- File Systems - watered down, simple versions of databases
- Security
- Very difficult to retrofit security (if you don't think about
it till the very end, then it is too late)
"You cannot build a bank THEN think about building a safe - build a
safe and then build a bank around it"
Problems in Computer Systems
- Tradeoffs - the waterbed effect
- Focusing on optimizing one problem can cause another problem to surface.
- If we push one thing to work really well, a different part of the OS will have to suffer
- For example, if you want to increase a processor's clock rate, you may increase the overall performance, but you also will increase the power consumption and possible create new timing errors that will increase the instruction counts.
- Incommensurate scaling - not everything grows at the same rate
- Economies of scale
- The benefits grow greater than the costs
- e.g. Having one person in a town make pins at a factory instead of
everyone making their own - Adam Smith
- Possible problem: can cause wastage
- Diseconomies of scale
- The costs grow faster than the benefits.
-
As size grows the cost of each new unit increases
- Possible problem: can cause breakage
- Example: Ethernet switch. As the number of connections grow to the switch, the circuitry becomes more expensive and complicated to the point where it does not become effective anymore
- Propagation of effects
- Occurs naturally in chaotic systems
e.g. Japan unified power grid where a failure in one
place can cause outages many miles away.
- Example: Microsoft Windows file systems and Japanese
Character encoding. Microsoft add support for Japanese characters by allowing the extend character set to take up 2 bytes. Then the file system which delimits with ' \ ' character may interpret the second byte as a new directory. The solution was to make the file system aware of the special
encoding. Not all problems can be foreseen ahead of time