Course Description:
This course concerns the memory architectures of contemporary microprocessors. We will assign a litany of problems and projects where students will explore properties of microprocessor memory systems. For instance, why does the access time to various parts of the memory differ? And further, why do access times to the same memory location change during the execution of a single program?
We will explore microprocessor cache memory hierarchy by writing programs that will reveal operational characteristics of available microprocessor systems. We will investigate the memory system of a toy microprocessor system. Time permitting, we may investigate multiprocessor memory models, such as sequential consistency, as well as weaker models such as total-store order. We will also review a formal specification of the x86 memory system.
This course will involve reading and understanding a good bit of code; this memory-system code model is designed to reveal various aspects of microprocessor memory systems -- and this code can be executed to gather information about memory systems. We will assign a litany of problems where students will be expected to write code to exercise memory system models in specific ways. Students will be asked to report their results.
The first few weeks of the semester will be spent investigating how to time various processor and memory operations; this is more subtle than simply using a stopwatch as we will be interested in revealing specific memory behaviors. We will attempt to isolate processor performance to measure the speed of basic operations. We will write code to reveal properties and performance of cache hierarchy. And, we will consider the inter-operation of the CPU and memory. Pointers will be provided so that interested students can also measure I/O performance.
The main part of our investigation will be writing a litany of codes (algorithms) aimed at revealing how to use the memory system to one's advantage. We will consider algorithms like copying, searching, transposing a matrix, sorting, and indexing. Our goal will be to implement these and other algorithms so they make best use of the available memory performance. In some cases, we will attempt to make algorithms that perform as slowly as possible; we do this to improve our understanding of how caches operate and what operations make caches perform slowly. For one of our projects, our goal will be to orchestrate data-access patterns so that a memory system performs as slowly as possible. The better someone understands a memory system, the slower it can be made operate. This investigation will force one to acquaint themselves with the various memory-specific caches, and then learn how to use memory in such a manner that renders the caches less effective.
We will proceed to consider how to organize program memory usage to sort elements in large (billion-entry) arrays. Time permitting, we will consider how to best multiply large (e.g., 1000x1000 element) matrices (a core operation for machine learning). Writing code to perform such operations efficiently will improve student understanding of contemporary computer memory systems. Thus, students will be asked to write algorithms that operate on gigabytes of data. Large memory footprints force the consideration of cache and memory effects. I'm confident that a student can write an adequate sort algorithm for sorting thousands or even millions of items, but can a student write a program to sort a few billion items?
A part of the semester will concern itself with a study of the x86-ISA memory specification. This study will inform students of how the paging mechanisms of contemporary memory systems operate -- once this is understood, a student will be able to implement large-memory algorithms more effectively. Why? There are several memory-address translation caches, and one needs to understand the characteristics of these caches in addition to the physical-memory-address data and instruction caches.
Finally, time permitting, we will review multi-thread (or multi-processor) shared memory systems, such as total-store order and other weaker memory models. We will investigate different memory models using simulators of these different memory models. Students may be asked to implement multi-threaded (multi-processor) algorithms that share data; to share data among multiple processors effectively, students need to understand how multi-processor memory system operate.
In this day and age, it's difficult for professors to assess homework and projects. Why? Well, it's pretty easy to ask an AI/ML system to write some code to do .... Unfortunately, when some students, but not all, use such systems, it's not easy to grade such homework and projects fairly. So, students will be given many in-class quizzes that will -- hopefully -- serve as a good assessment mechanism. Quizzes and tests will be "technology free" events; that is, for quizzes and tests, students will not be allowed to consult any electronic device. Occasionally, we may also have short, in-class programming assignments -- which, of course, will require you to use your electronic tools.
A good way for a student to convince the instructor that the material being is well understood is to propose and execute a project that demonstrates their understanding. What might such a project entail? Well, that is part of the student's contribution. But, for an example of a project, students could consider implementing Henry Baker's incremental garbage collection algorithm (List Processing in Real Time on a Serial Computer by Henry G. Baker, Jr., MIT, which appeared in the CACM, April, 1978, Volume 21, Number 4).
Students are expected to have taken CS429/CS429H. Students will need to program in C, and students will need to be able to relate the compiler-produced assembler output with their associated C-language programs. Students should be able to read and write (limited amounts) of x86 assembler (as x86 machines is what are available to us at UT). Student should be aware of C-language intrinics. Students will be expected to able to read algorithm specifications written in Lisp. Students will be expected to analyze program performance. Students will be quizzed weekly about what they are expected to be learning. This course will consist of a litany of regular homework assignments and several 1-to-4-week projects.
In the spirit of keeping your focus during class, I do not permit any cell-phone usage during class. In fact, I expect that all cell phones to be in backpacks, satchels, or purses during class. If I see a student with a cell phone, I will call out the infraction.
Required Information:
What follows is information we are required to provide to students. Other webpages and PDF documents provide technical information about this specific course; see the Homepage (shown above) for additional references.
In general, the information found in Code of Conduct is a good guide on how to conduct yourself in this class. Additional general information about College of Natural Sciences (CNS) class coursework and procedures can be found in Vice Provost Laude's memorandum to the CNS faculty.
This course attempts to comply with the requirements of the University and the State of Texas. Texas House Bill 2504 specifies a number of items regarding course materials and instructor qualifications: Hunt. In addition, the material contained in the class webpages are designed to be compliant with Gretchen Ritter's (Vice Provost for Undergraduate Education and Faculty Governance) August 3, 2012, memorandum. Ritter's memorandum also addresses issues concerning campus safety and security. Please familiarize yourself with this information, and let us know if you believe the class Website does not comply with any of these requirements.
Any scholastic dishonesty will be referred to the Dean of Students Office. The following passage is taken from the University of Texas at Austin Information Handbook for Faculty.
As a reminder, the "UT Code of Conduct" is available where plagiarism, cheating, and other issues are described. If there are any questions, please see the Academic Policies and Procedures of UT Austin.
We believe that you belong here! UT as an organization and I as an individual professor are trying to foster a climate conductive to learning and creating knowledge; we believe this is a basic tenant of people in our community. Bias, harassment, and discrimination, of any sort, have no place here in our community.
We support the University's scholastic honesty policies fully, and we will follow the University's policies in the event of any scholastic dishonesty. If you are ever unsure whether some act would be considered in violation of the University's policies, do not hesitate to ask your instructors or other University academic representatives.
Students with disabilities may request appropriate academic accommodations from the Division of Diversity and Community Engagement, Services for Students with Disabilities, 512-471-6259, or follow this link.
A notice regarding accommodations for religious holidays. By UT Austin policy, you must notify your instructor(s) of your pending absence at least fourteen days prior to the date of observance of a religious holy day. If you must miss a class, an examination, a work assignment, or a project in order to observe a religious holy day, you will be given an opportunity to complete the missed work within a reasonable time after the absence.
Please see the UT Webpage detailing Safety, Health, and Security Resources for support and assistance.
Occupants of buildings on The University of Texas at Austin campus are required to evacuate buildings when a fire alarm is activated. Alarm activation or announcement requires exiting and assembling outside. Familiarize yourself with all exit doors of each classroom and building you may occupy. Remember that the nearest exit door may not be the one you used when entering the building. Students requiring assistance in evacuation shall inform their instructor in writing during the first week of class. In the event of an evacuation, please follow the instruction of faculty or class instructors. Do not re-enter a building unless given instructions by one of the following: Austin Fire Department, The University of Texas at Austin Police Department, or the UT Fire Prevention Services office.
A link to information regarding emergency evacuation routes and emergency procedures is available.
Return to CS378h course homepage.