Electrical and Computer Engineering 324
Winter Semester 2012
Section 1: 406 CB on M W F at 10:00 am - 10:50 am
Instructor Information
TA Information
Course Information
Description
This class examines the concepts underlying hardware and software components that are common to most computer systems. The main premise of the course is that "what's under the hood" matters since it affects the correctness, performance, and usefulness of application programs. The key principles underlying the material in this class are:
- A programmer can write more reliable, secure, and efficient software with an understanding of how the software is executed on the underlying architecture.
- A programmer can avoid and better address software defects by understanding the various abstractions used to manage complexity in computer systems.
- A programmer can exploit parallelism in an underlying instruction set and machine architecture to improve application performance using high-level programming languages.
- A programmer's knowledge of the memory hierarchy in a target system can improve application performance using high-level programming languages.
- Concurrency, or multiple applications running simultaneously on the same hardware, relies on abstraction to give each application a uniform view of the system.
Homework and lab assignments in this class will explore a variety of important topics, but their coverage of the important material is not exhaustive. In other words, many important points will not be addressed in assignments and may require careful reading and contemplation to understand thoroughly.
WARNING: This class requires a lot of reading: we cover roughly 1000 pages of the text. If you don't consistently take the time to read (and reread!) the text carefully, you cannot expect to do well on the exams. Regular class attendance will reinforce the material from the reading and give you an opportunity to ask questions about topics addressed. Note that you are expected to read the assigned material before it is discussed in class.
Prerequisites
It is expected that all students enrolled will have successfully completed the following classes:
- CS 142
- CS 235
- CS/ECEn 124
- ECEn 224
Students should also have a working knowledge of the C language and Linux programming environment.
Learning Outcomes
- Program Optimization
Ability to understand and optimize programs from the assembly code output by the compiler.
- CPU
Ability to modify a CPU design to add instructions and to improve the overall efficiency of pipelined execution.
- Skills
Ability to design and verify software that exploits a buffer-overflow security flaw in example code.
- Tools
Ability to use a C compiler, a disassembler, a debugger, and CPU emulators to develop, debug, test, analyze, and optimize programs.
Texts & Materials
| Required | Vendor | Price (new) | Price (used) | |
|
|
COMPUTER SYSTEMS 2E By BRYANT, R ISBN: 9780136108047 | BYU | $123.00 | $92.25 |
| Optional | Vendor | Price (new) | Price (used) | |
![]() | C Programming Language (2nd Edition) (2nd edition) By Brian W. Kernighan
Amazon | $43.50 | $30.00 | |
Point Breakdown
| Assignments | Percent |
| Daily Reading Reports | 10 |
| Homework | 15 |
| Labs | 25 |
| Midterms | 25 |
| Final | 25 |
| Total Percent | 100 |
Grading Policies
A summary of your scores on all graded assignments and exams will be posted on BYU Gradebook. Please check your posted scores regularly to make sure they are correct. Scores will be assumed correct one week after they are posted, so report any discrepancies you see in a timely way.
As noted elsewhere in this syllabus, you will not receive a passing grade (C- or better) in the class if you do not:
- receive a passing grade on the final, and
- complete all the lab assignments.
Study Habits
This course will be unlike any other course you have taken. It doesn't necessarily require more work than other technical courses, but it does require a different mindset in approaching the wide range of material covered. As previously noted, much reading, thinking, and experimentation is required. (Some maturity in the discipline is essential in making value judgements about which details to pay attention to as you read.) I expect students who complete this class to be fluent in computer systems.
Separate from any concerns about the volume of information to consider, there are two noteworthy challenges in achieving this fluency. First, topics pertaining to computer systems are inherently interconnected to a myriad of operational details. The important concepts are truly understood only after diving into the details to a reasonable extent. Similarly, your understanding of the concepts discussed can only be assessed by asking questions about details. On exams, I care mostly about your understanding of the concepts, but the questions will necessarily include many details. For better or worse, this is a discipline where the details matter. Don't just skip over the details in your reading. Moreover, do your best to extract meaning from the details. If you think you have to memorize 950+ pages of trivia to succeed in this class, you are definitely approaching it in the wrong way.
A second challenge is that we cannot conveniently describe the operation of computer systems (at the level we care about) in precise mathematical terms, so we are stuck with using English descriptions which are inherently ambiguous. Detailed descriptions of system components and mechanisms can be very lengthy; our text does a good job of presenting information succinctly and at the right level, but it still can be misunderstood. As you read and participate in class discussions, you should strive to become familiar with the terminology used in the book and lectures. (Unfortunately, companies and other authors don't use exactly the same terms, but once you understand the concepts, you'll be able to understand other dialects without much trouble.) If you do not understand the terminology used in the text and our class discussions, you will struggle on the exams.
A related problem with lengthy, written descriptions is that an author must decide on a single linear sequence in which to treat the material. No matter what order is picked, some material is better understood after exposure to topics covered later. To maximize your understanding, review old material occasionally and see if you have new insight since you saw it last. Some of the greatest "Eureka!" moments in learning about computer systems come from making connections between topics covered in different chapters in the book. Interactions between the pieces are often the most interesting aspects of any system.
The best way to get your hands around everything is to immerse yourself in the class experience. Read regularly and thoroughly. Attend class and ask questions. Ask the TA questions and make use of the instructor's office hours. Study with others in the class. Try to stump each other with questions about how things actually work. (None of this is particularly new or innovative, but it is as important in this class as any other you'll take.)
Exams
Assignments
Assignment Descriptions
The labs are a major emphasis in this course; all lab assignments must be completed to receive a passing grade (C- or better) in this class. Unless an exception is approved in advance, the final deadline for all lab submissions is noon on the last day of classes for the semester or term. (Detailed lab assignments and due dates can be found on the class web page.)
Unless a specific lab assignment states otherwise, labs are to be completed individually by each student. You are free to discuss lab assignments with others, but the code you create should be entirely your own. Any deviation from this will be treated as a violation of BYU's honor code.
Regardless of the points given for each lab, all labs will be weighted equally in the calculation of final grades.
The ECEn department Linux machines in CB 425 will be used for the labs in this class. You will need a CAEDM account to access these machines. For more information about the "spice" machines and CAEDM accounts, click on the "computer help" link on the ECEn home page.
Homework assignments often include problems from the book, but other problems will also be given. (Assignment details and due dates can be found on the class web page.) Homework assignments are intended to keep you current on your reading and to encourage you to experiment by writing, compiling, and running relevant code on the lab computers. Thus, many problems involve some programming; in general, you must submit a printout of your source code and representative program output captured from running the compiled program on a machine. You may collaborate with other students as you do your homework, but if you do, you must report who you collaborated with on your homework assignment. Downloading homework solutions from the internet will be treated as a violation of BYU's honor code.
Completed homework assignments are to be submitted before 5:00pm in the ECEn homework box. Homework placed in the homework box after the TA picks up the assignment will receive no credit, so make sure you submit each assignment on time. All submissions should clearly identify your name, the course number, the assignment number, and each problem worked. Since some homework submissions can be a bit lengthy (with your source code and program output included), please make it easy to find your answer -- consider using a highlighter pen, penciled-in brackets, handwritten labels, etc. Please use a fixed-width font for all code listings so they can be scanned quickly by the TA. If the TA can't decipher your submission, it is difficult to give you the credit you deserve.
To increase the amount of time the TAs have to help you (as opposed to grading homework), each homework problem (or discrete portion of a homework problem) will receive
- two points if your answer is perfectly correct,
- one point if your answer is not completely correct but you made a reasonable effort, or
- zero points if your effort was not substantive.
Regardless of the points allocated per assignment, all homework assignments will be weighted equally in the calculation of final grades.
In my experience, it is impossible to fully grasp all the technical content in our text in a single reading. It is highly recommended that you plan on at least two passes on each assigned reading block: a reasonably thorough reading before class focusing on the issues and concepts, and a careful reading after class with more attention to the details. To help motivate you to to read before class, and to attend class, at the beginning of each class you will submit a very brief "Daily Reading Report." I will use the content of your lists to determine how we allocate class time in discussing the assigned material. A score will be assigned for each report, and the total will contribute to your final grade. Your lowest four report scores will be dropped. There will be no way to make up scores if you miss class or fail to turn in a report in class.
Each report -- a single sheet of paper -- should contain:
- Your name
- The percentage of that day's reading you completed before class
- A numerical rating from 1 (lowest) to 10 (highest) of how thorough your reading was
- A list of the top three topics from the reading that should be addressed in our class discussion
For full credit on a reading report, you have to have read 100% of the assigned reading at a "thoroughness level" of 6 or higher. Assessments of thoroughness will always be subjective, but here are some guidelines for consistency:
- 1: I glanced through the assigned material
- 2: I skimmed the assigned material
- 4: I read quickly and superficially, but I tried to grasp the key concepts
- 6: I read attentively with a focus on concepts, but I didn't work through many of the details
- 8: I read carefully, and I worked through some or most of the examples and details
- 10: I read with painstaking attention to every detail
Schedule
Course Schedule
| Date Export | Topic Export | Reading Export |
W - Jan 4 | Introduction and overview | Preface , Chapter 1 , web pages
NOTE: In this and all subsequent reading assignments, assigned sections are color coded to help you prioritize your reading:
|
F - Jan 6 | Information storage, integer representations | 2.1 - 2.2, DATA:TMIN |
M - Jan 9 | Integer arithmetic | 2.3 |
W - Jan 11 | FP representations and operations | 2.4 - 2.5, DATA:IA32-FP |
F - Jan 13 | Program encodings, data formats | 3.1 , 3.2 - 3.4 |
M - Jan 16 | Martin Luther King Jr. Holiday | No class |
W - Jan 18 | Data operations and control | 3.5 - 3.6.4 |
F - Jan 20 | Loops, conditional moves, switches | 3.6.5 - 3.6.7 |
M - Jan 23 | Procedures | 3.7 |
W - Jan 25 | Arrays | 3.8 |
F - Jan 27 | Structs, alignment, pointers, GDB | 3.9 - 3.10, 3.11 |
M - Jan 30 | Buffer overflow, x86-64 part I | 3.12, 3.13.1 - 3.13.2 , ASM:EASM |
W - Feb 1 | x86-64 part II | 3.13.3 - 3.15 , ASM:SSE |
F - Feb 3 | The Y86 ISA | 4.1 |
M - Feb 6 | Logic design, HCL, sequential stages | 4.2 , 4.3.1 |
W - Feb 8 | Sequential hardware and timing | 4.3.2 - 4.3.4 |
F - Feb 10 | Pipelining, predicting next PC | 4.4 - 4.5.4 |
M - Feb 13 | Hazards, stalling, forwarding, exceptions | 4.5.5 - 4.5.10 |
W - Feb 15 | Control logic, special cases | 4.5.11 |
F - Feb 17 | Performance analysis, real-world issues | 4.5.12 - 4.5.13, 4.6 |
M - Feb 20 | Presidents Day Holiday | No class |
T - Feb 21 | Program performance, loops, procedure calls | 5.1 - 5.6, ASM:OPT |
W - Feb 22 | Modern CPUs | 5.7 |
F - Feb 24 | Loop unrolling, parallelism | 5.8 - 5.10, OPT:SIMD |
M - Feb 27 | Branch prediction, memory performance | 5.11 - 5.13 |
W - Feb 29 | Profilers, Amdahl's law | 5.14, 5.15 |
F - Mar 2 | Storage technologies | 6.1 |
M - Mar 5 | Locality, memory hierarchies, direct-mapped caches | 6.2 - 6.4.2 |
W - Mar 7 | Set-associative and fully associative caches | 6.4.3 - 6.4.5 |
F - Mar 9 | Cache examples, cache-friendly code | 6.4.6 - 6.5 |
M - Mar 12 | Memory mountains, exploiting locality | 6.6, 6.7 , MEM:BLOCKING |
W - Mar 14 | Static linking, object files, symbol resolution | 7.1 - 7.6 |
F - Mar 16 | Relocation, dynamic linking | 7.7 - 7.11, 7.12 , 7.13 - 7.14 |
M - Mar 19 | Exceptions, processes | 8.1 - 8.3 |
W - Mar 21 | Process control | 8.4 |
F - Mar 23 | Signals, non-local jumps | 8.5 - 8.8 |
M - Mar 26 | Virtual memory | 9.1 - 9.5 |
W - Mar 28 | Address translation | 9.6 |
F - Mar 30 | Intel Core i7/Linux memory system | 9.7 |
M - Apr 2 | Memory mapping, dynamic memory allocation | 9.8, 9.9.1 - 9.9.4 |
W - Apr 4 | Garbage collection, memory-related C bugs | 9.9.5 - 9.10, 9.11 - 9.12 |
F - Apr 6 | Networking and web | 11.1 - 11.3, 11.4 - 11.7 |
M - Apr 9 | Concurrent programming, threads | 12.1, 12.2 , 12.3, 12.4 |
W - Apr 11 | Threaded programs | 12.5 - 12.8 |
University Policies
BYU Honor Code
In keeping with the principles of the BYU Honor Code, students are expected to be honest in all of their academic work. Academic honesty means, most fundamentally, that any work you present as your own must in fact be your own work and not that of another. Violations of this principle may result in a failing grade in the course and additional disciplinary action by the university. Students are also expected to adhere to the Dress and Grooming Standards. Adherence demonstrates respect for yourself and others and ensures an effective learning and working environment. It is the university's expectation, and my own expectation in class, that each student will abide by all Honor Code standards. Please call the Honor Code Office at 422-2847 if you have questions about those standards.
Preventing Sexual Discrimination and Harassment
Title IX of the Education Amendments of 1972 prohibits sex discrimination against any participant in an educational program or activity that receives federal funds. The act is intended to eliminate sex discrimination in education. Title IX covers discrimination in programs, admissions, activities, and student-to-student sexual harassment. BYU's policy against sexual harassment extends not only to employees of the university, but to students as well. If you encounter unlawful sexual harassment or gender-based discrimination, please talk to your professor; contact the Equal Employment Office at 422-5895 or 367-5689 (24-hours); or contact the Honor Code Office at 422-2847.
Students with Disabilities
Brigham Young University is committed to providing a working and learning atmosphere that reasonably accommodates qualified persons with disabilities. If you have any disability which may impair your ability to complete this course successfully, please contact the Services for Students with Disabilities Office (422-2767). Reasonable academic accommodations are reviewed for all students who have qualified, documented disabilities. Services are coordinated with the student and instructor by the SSD Office. If you need assistance or if you feel you have been unlawfully discriminated against on the basis of disability, you may seek resolution through established grievance policy and procedures by contacting the Equal Employment Office at 422-5895, D-285 ASB.
Academic Honesty Policy
The first injunction of the BYU Honor Code is the call to be honest. Students come to the university not only to improve their minds, gain knowledge, and develop skills that will assist them in their life's work, but also to build character. President David O. McKay taught that 'character is the highest aim of education' (The Aims of a BYU Education, p. 6). It is the purpose of the BYU Academic Honesty Policy to assist in fulfilling that aim. BYU students should seek to be totally honest in their dealings with others. They should complete their own work and be evaluated based upon that work. They should avoid academic dishonesty and misconduct in all its forms, including but not limited to plagiarism, fabrication or falsification, cheating, and other academic misconduct.
