CS 213: Introduction to Computer Systems
Randal E. Bryant(*) and David R. O'Hallaron(**)
(*) School of Computer Science
(**) School of Computer Science and Dept of Electrical and Computer Engineering
Carnegie Mellon University
Our aim in CS 213 is to help you become a better programmer by teaching you the basic concepts underlying all computer systems. We want you to learn what really happens when your programs run, so that when things go wrong (as they always do) you will have the intellectual tools to solve the problem.
Why do you need to understand computer systems if you do all of your programming in high level languages? In most of computer science, we're pushed to make abstractions and stay within their frameworks. But, any abstraction ignores effects that can become critical. As an analogy, Newtonian mechanics ignores relativistic effects. The Newtonian abstraction is completely appropriate for bodies moving at less than 0.1c, but higher speeds require working at a greater level of detail.
Our 21X sequence works as follows: 211 is based on a simplified model of program execution. 212 builds further layers of abstraction. 213 introduces greater detail about system behavior and operation. This greater detail is needed for optimizing program performance, for working within the finite memory and word size constraints of computers, and for systems-level programming.
The following "realities" are some of the major areas where the abstractions we teach in 211/212 break down:
- Int's are not integers, Float's are not reals. Our finite representations of numbers have significant limitations, and because of these limitations we sometimes have to think in terms of bit-level representations.
- You've got to know assembly language. Even if you never write programs in assembly, The behavior of a program cannot be understood sometimes purely based on the abstraction of a high-level language. Further, understanding the effects of bugs requires familiarity with the machine-level model.
- Memory matters. Computer memory is not unbounded. It must be allocated and managed. Memory referencing errors are especially pernicious. An erroneous updating of one object can cause a change in some logically unrelated object. Also, the combination of caching and virtual memory provides the functionality of a uniform unbounded address space, but not the performance.
- There is more to performance than asymptotic complexity. Constant factors also matter. There are systematic ways to evaluate and improve program performance
- Computers do more than execute instructions. They also need to get data in and out and they interact with other systems over networks.
CS 213 is a unique course for which no complete textbook exists. In fact, during this semester, your instructors will be preparing the alpha version of a new textbook, in the form of class notes, that we expect to be published sometime next year. We'll hand out the notes to you as we write them up. We'd really appreciate your comments and criticisms.
In the interim, the following will serve as the text for the course:
Samuel P. Harbison and Guy L. Steele Jr., C: A Reference Manual, Fourth Edition, Prentice Hall, 1995.
Your participation in the course will involve five forms of activity:
- Attending the lectures.
- Participating in the recitations.
- Homework and laboratory assignments.
- Reading the text and supplementary handouts.
Attendance will not be taken at the lectures or recitation sections. You will be considered responsible for all material presented at the lectures and recitations. Lectures will cover higher-level concepts. Recitations will be more applied, covering important ``how-to's'', especially in using tools that will help you do the labs. In addition, the recitations will help clarify lecture topics and describe exam coverage.
There will be two types of assignments in this class. Lab assignments will be multi-week efforts (in groups of up to 2) providing in-depth understanding of some aspect of computer systems. Labs will involve some combination of C and assembly programming, and some will involve performance measurements. Labs will always be handed out in class on Thursday and due a couple of weeks later on a Wednesday.
Homework assignments will be 1-week efforts (that you work on individually) that involve solving a series of smaller problems. The solution to many of these will involve writing small C programs. Homeworks are designed to be drills to help you get practice for exam problems. Homeworks will always be handed out at class on Tuesday and due the following Monday.
For urgent communication with the teaching staff, it is best to send electronic mail (preferred) or to phone.
If you want to talk to a staff member in person, remember that our posted office hours are merely times when we guarantee that we will be in our offices. You are always welcome to visit us outside of office hours if you need help or want to talk about the course. However, we ask that you follow a few simple guidelines:
- Prof. Bryant and Prof. O'Hallaron normally work with their office doors open and welcome visits from students whenever their doors are open. However, if their doors are closed, they are busy with a meeting or a phone call and should not be disturbed.
- The TAs share offices with other students. To avoid disturbing these students, please send mail or zephyr before visiting a TA outside of office hours so they can arrange to meet you.
Using the Web, you can:
- Obtain copies of any handouts or assignments. This is especially useful if you miss class or you lose your copy.
- Read clarifications and changes made to any assignments, schedules, or policies.
- Find links to any electronic data you need for your assignments
We have also set up a news group for this class, . This group will be used by members of the teaching staff to post announcements and clarifications. You may also post to this group to make queries.
Working in Groups
For homework assignments, you will work by yourself. For lab assignments you may work in groups of up to 2 people. It is up to you to form and regulate your own groups. If you are not happy with your partner, you are free to find another partner. You may also work by yourself.
Handing in Assignments
All assignments are due at 11:59pm (one minute before midnight) on the specified due date. All handins are electronic, usually consisting of one or more files that are to be copied to a specified directory. The writeup for an assignments will provide details about the handin procedure for that assignment.
Penalties for Late Assignments
Late assignments will be docked 20% each day for the first two days. Assignments more than 2 days late will not be accepted, unless you have arranged for an extension in advance with Prof. O'Hallaron. For example, suppose an assignment is due at 11:59pm on Wed. If you hand it in between midnight and 11:59pm Thursday, you will be docked 20%. If you turn it in between midnight and 11:59pm Friday, you will be docked 40%. You won't be able to turn it in at all after 11:59pm Friday.
Making up Exams and Assignments
Missed exams and assignments more than 2 days late can be made up, but only if you make prior arrangements with Prof. O'Hallaron. However you should have a good reason for doing so. It is your responsibility to get your assignments done on time. Be sure to work far enough in advance to avoid unexpected problems, such as illness, unreliable or overloaded computer systems, etc.
After each exam, homework, and assignment is graded, Prof. O'Hallaron will send each of you a personalized email with your grade (as well as all of your previous grades). You have seven calendar days from the date he sends the email to appeal your grade.
If you have questions about the grade you received on an assignment (homework or lab), please talk first to the person in charge of the assignment, who will be clearly identified in the writeup. If you are still not satisfied, please come and visit Prof. O'Hallaron. If you have questions about an exam grade, please visit Prof. O'Hallaron directly.
Final Grade Assignment
Each student will receive a numeric score for the course, based on a weighted average of the following:
- Assignments: The assignments will count a combined total of 50% of your score. The exact weighting of the different assignments will be determined near the end of the course based on our perception of the relative effort required. In any case, each homework will count 2%, while each lab will count 8-12% of your score. Since small differences in scores can make the difference between two letter grades, you'll want to make a serious effort on each assignment.
- Exams: There will be two in-class exams, each counting 12.5%, plus a final counting 25%.
Grades for the course will be determined by a curve. The total score will be plotted as a histogram, and then approximate cutoff points for the different letter grades will be determined. Individual cases, especially those near the cutoff points may be adjusted upward or downward based on factors such as attendance, class participation, improvement throughoutt the course, final exam performance, and special circumstances.
You must do your homework assignments by yourself. Your lab assignments allow collaboration, but only with the other member of your project group. Each lab assignment must be the sole work of the group turning it in. Assignments will be closely monitored by automatic cheat checkers, and students may be asked to explain any suspicious similarities. The following are guidelines on what collaboration outside of your group is authorized and what is not:
What is Cheating?
- Sharing code or other electronic files: either by copying, retyping, looking at or supplying a copy of a file.
- Sharing written assignments: Looking at, copying, or supplying a assignment.
What is NOT Cheating?
- Clarifying ambiguities or vague points in class handouts or textbooks.
- Helping others use the computer systems, networks, compilers, debuggers, profilers, or other system facilities.
Be sure to store your work in protected directories.
The usual penalty for cheating is to be removed from the course with a failing grade. We also place a record of the incident in the student's permanent record.
Facilities: Intel Computer Systems Cluster
Intel has generously donated a cluster of 25 Linux-based Pentium III servers, specifically for CS 213, that we will use for all labs and assignments. The class Web page has details.
Figure 1 shows the tentative schedule for the class. The notation ``Hi'' indicates a homework assignment, while ``Li'' indicates a lab. Any changes will be announced on the class news group. An updated schedule will be maintained on the class web page. Readings are from Harbison and Steele. You will also be responsible for the material covered in the handouts and lecture notes.
Figure 1: CS 213 Class Schedule
Fri Nov 19 08:58:57 EST 1999
Computer Systems Homework Module 2 1 Computer Systems Homework Module 2 Computer Systems Homework Module 2 Jennifer Yturralde Allied American University Author Note This paper was prepared for ISY 101: Introduction to Computer Systems v5-e, Module 2 Homework, taught by Benjamin Perez. Part I 1 .Discuss where a computer stores its basic hardware settings, why it does so, and what some of those settings are. A computer stores its memory in Read Only Memory because the storage device is not volatile and its stores information permanently and can be retrieved and accessed easily. The settings stored in ROM are: Booting of the computer Configuration of the settings in the computer 2. Compare storage devices using four criteria: versatility, durability, speed, and capacity. A good storage device can be determined using versatility, durability, speed and capacity criteria. Versatility refers to the ability of a storage device to work in more than one way and that the data stored in it can be altered. Durability refers to the ability of the data in the device to last and its accessibility after a period of time. Speed refers to the time taken to retrieve and access data while capacity refers to the total amount of data that can be stored in the device. Versatility-Compact disks and Digital versatile disks are not versatile as USB drives. This is because some computers lack disc drives and the information in it cannot be accessed in these computers while USB ports are found in all computers