CMSC 311: Computer Organization

Fall 2004

William A. Arbaugh

Section 0101




1.    Organization

a.     Instructor:

William A. Arbaugh

AVW 4137


Tu/Th: 11 am – 12pm and by appointment


b.     TAs: You may visit a TA from either section.


Mansur Nurani               Octavian Udrea

AVW3212                      AVW1112

Wed: 2:30 – 4:00 pm     Mon: 1:00 – 2:30 pm

Thu: 12:30 – 2:00 pm


c.     Class Time:

Tu/Th 9:30 – 10:45 am  in CSIC 3117


d.     Web page:


NOTE: This class will use moodle as a means to improve  communications. There is a link from the class web page to the moodle forums and to the course laboratories.


Moodle requires accounts so that we can correctly identify your lab submissions from your classmates. You are permitted to select your own username (as long as it isn’t offensive) and password. You MUST, however, send your moodle username and student ID to the TA’s so that they can associate the two properly.


Creating a moodle account is explained below.





2.    Objectives

The aim of CMSC 311 is to help you become a better programmer by teaching you the basics concepts underlying all computer systems. This class will teach you 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 problems.


Here are some of the realities of systems programming that we will be dealing with in this class:

a.     Int’s are not integers. Float’s are not reals. Our finite representation of numbers has significant limitations, and because of these limitations we sometimes have to think in terms of bit-level representations.

b.     You must 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 same machine-level model.

c.     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.

d.     There is more to performance than asymptotic complexity. Constant factors also matter. There are systematic ways to evaluate and improve system performance.

e.     Computers do more than execute instructions. They also need to get data in and out and they interact with other systems over networks.


3.    Textbook

The primary textbook is:

      Randal E. Bryant and David R. O’Halloran, Computer Systems: A Programmer’s Perspective, Prentice Hall, 2003.


A recommended textbook is:

      Brian W. Kernigham and Dennis M. Ritchie, The C Programming Language, Second Edition, Prentice Hall, 1988.


4.    Course Assignments and Grades

Attendance will not be taken at lectures. However, you are responsible for all material presented in the classroom. Occasionally, “pop quizzes” will be given in class. The scores on these quizzes count towards your class participation grade.


The course will have five graded laboratory assignments. These labs along with two in-class exams, a class participation grade, and a final compose your entire grade as follows:

Š      The five labs count as 60% of your final grade. Each lab is weighted equally, i.e. each lab is worth 12% of your final grade.

Š      The in-class exams count as 20% of your final grade, e.g. each in-class exam is worth 10% of your final grade.

Š      The final exam is worth 15% of your final grade.

Š      Class participation counts towards 5% of your final grade. This grade will be based on “pop” quizzes and your participation in the class forum helping others.


You may appeal your grade up to seven calendar days from the date your grade was posted. For a lab, you should first appeal to the TA responsible for grading that lab. If you are not satisfied after your discussions with the TA, you may appeal to Prof. Arbaugh. Appeals on exam grades should be made directly to Prof. Arbaugh. Please note: grades will only be changed if an error has been made in the grading. Please also read


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 an extension in advance with Prof. Arbaugh. Extensions can only be given by Prof. Arbaugh and will only be given in extenuating circumstances. Even if you can not complete the assignment- turn-in your work. Partial credit may be given if you made progress on the problem.


Each lab assignment must be the sole work of the student. Automatic cheat checkers will closely monitor assignments, and students may be asked to explain any suspicious similarities. The following are guidelines on what collaboration is authorized and what is not:


      What is cheating?

o      Sharing code or other electronic files: either by copying, retyping, looking at, or supplying a copy of a file.

o      Sharing written assignments: Looking at, copying, or supplying an assignment.


What is not cheating?

o      Clarifying ambiguities or vague points in class handouts or textbooks.

o      Helping others use the computer systems, networks, compilers, debuggers, profilers, or other system facilities.

o      Helping others with high-level design issues.

o      Helping others debug their code.


All cheating will be reported as academic dishonesty and may result in the student receiving a XF grade for the class.


5.    Creating your Moodle Account


Moodle is an interactive system that provides a forum for students and instructors to communicate. It also provides the instructors with the ability to distribute laboratories and grades in a method that is in compliance with current University privacy policies.


All of your laboratory assignments will be available via moodle, and you MUST submit your assignments via moodle.


To use moodle, you need an account. To create an account go to where you will see this screen:



Click on the radio button “Start now by creating a new account” and you’ll see this screen:



create your own username (nothing obscene please) and fill in the other information correctly as we need to be able to associate your name with your account and the University system. Pick a password that you can remember, but that isn’t simple so others can’t guess it.


Once you fill the form out- an email will be sent to you with a URL for you to confirm your new account. When you click on the URL in the email, you’ll get this screen:



Enter the enrollment key that was provided to you in class. If you don’t know the enrollment key, you can ask a friend from class or email the instructor. The enrollment key is the same for everyone and is designed to prevent spammers from creating accounts.


Once you enter the proper enrollment key you should see the main CMSC 311 Moodle page:



Course Schedule

This schedule is subject to change and is for information purposes only. The official course schedule will be available on the course web page.



Reading Assignment



Overview of Class and intro to prog tools

Chapter 1



Programming tools

See online syllabus

Lab 1 out


Bits and Bytes

Section 2.1



Integers and Floating Point representation

Sections 2.2 - 2.5



Assembly Programming - Control

Sections 3.1 - 3.6

Lab 1 is due


Assembly Programming - Procedures

Section 3.7

Lab 2 out


Assembly Programming - Data

Sections 3.8 - 3.11



Assembly Programming - integrating with C

Sections 3.12 - 3.13 and 3.15 - 3.16



Program Optimization I

Sections 5.1 - 5.6



Program Optimization II

Sections 5.7 - 5.16



Exam I


Lab 2 is due


Processor basics and pipelining




Safe C Programming

Secure Programming FAQ

Lab 3 out


Memory Hierarchy

Sections 6.1 - 6.4



Cache Memories

Sections 6.5 - 6.8




Chapter 7



Exception Control Flow I

Sections 8.1 - 8.4

Lab 3 is due


Exception Control Flow II

Sections 8.5 - 8.8

Lab 4 is out


Time Measurement

Chapter 9



Virtual Memory

Sections 10.1 - 10.6



P6/Linux Memory

Sections 10.7 - 10.8



Dynamic Storage I

Section 10.9

Lab 4 is due


Dynamic Storage II

Sections 10.10 - 10.13

Lab 5 is out


Exam II




System IO

Chapter 11







Network Programming

Sections 12.1 - 12.4



Concurrent Servers

Sections 13.1 - 13.3

Lab 5 due