CS 240 Lab

Lab Info & Policies

Introduction

In CS 240 Laboratory, students learn about the foundations of computer systems by experimenting with software and hardware. Lab material coordinates with lecture topics, and will often introduce the student to strategies and tools required for class assignments.

Schedule

Lab is held in L037 in the science center. Section L01 meets Wednesday, 8:30 a.m. - 11:30 a.m. Section L02 meets Wednesday, 2:30 p.m. - 5:30 p.m. Section L03 meets Tuesday, 12:30 p.m. - 3:30 p.m.

Classroom Policies

Because we are dealing with electronics in lab, food and drink are not permitted in the lab. The labs are long and you may get hungry or thirsty. If you’d like to have a snack or drink, please step outside the classroom. You’re welcome to do that at any time during the lab, but we will also have at least one 5-minute break in each lab (feel free to remind me if I forget to call the break).

Because statistically, it’s fairly likely that at least one of us will have an asymptomatic case of COVID-19 this semester (so that nobody, including them, will know they have it), is is prudent for us to wear masks at all times in the classroom, including during student hours. See this calculator page for a model of the probabilities involved. Feel free to adjust the numbers there and see how they play out. Even at just 1 case per week across the whole campus, the probability across the entire semester is about 10%, if the cases/week goes up to 5, the whole-semester probability is ~40%. In prior semesters when we had asymptomatic testing, the cases/week often ranged from 10-30, which would imply an even higher probability.

Given vaccinations, many people are now treating COVID-19 like just another flu: something to be avoided, but not necessarily to take stringent precautions against. This attitude is sadly not supported by the data: COVID-19, unlike the flu, has a significant (likely greater than 1/1000, possibly as high as 1/10 or greater) risk of long-term, potentially-permanent complications (this meta-analysis has an overview, although some of its percentages may be somewhat pessimistic). In contrast, the risks of such complications from the flu are more like 1/100,000 or lower. Also, for immunocompromised people who cannot effectively be vaccinated (e.g., students with autoimmune disorders), the risk of death from COVID-19 is still significant and is much greater than that from the flu. There may be immunocompromised students in our class, and in principle, I’d like to create a classroom where such students could be included (despite the risks inherent in an in-person setting, which we have already as a campus decided to move to given the significant drawbacks of remote learning). Because of this, as a basic gesture of inclusivity, and as something that will help limit the number of sick days we collectively have due to other airborne illnesses, we should all wear masks in the classroom & during student hours. The campus policy does not require this, and other professors may have different policies. Should you choose not to wear a mask, if I have spares available I’ll offer you one in case you simply forgot, but I may not have masks available all semester.

Requirements

Each week (with some exceptions), you will have a pre-lab assignment to complete, to prepare you for the lab. These are due at the beginning of the lab period. In most cases, they will be on Gradescope.

In addition to pre-lab assignments, you will do self-paced work in pairs in lab using interactive web pages, and will complete a self-assessment at the end of the lab that you will turn in. You should ask questions during lab about parts of the lab pages that aren’t clear, because you will not be turning them in and I will not be giving feedback on your answers other than the built-in feedback in the pages.

Everyone may have to miss lab from time to time (e.g., when you’re sick). In these cases, which are hopefully rare, you are expected to: 1. Notify me as soon as feasible. 2. Complete the lab web page on your own time, if necessary using a simulator instead of the physical lab equipment, OR come in on a make-up lab day to complete the lab (check the calendar for make-up dates). 3. Turn in your self-assessment before the next lab if you are making it up online. Exceptional circumstances may call for some modification of these requirements, and I’m more than willing to figure out something else if you need it; just let me know.

In lab, you will work with an assigned partner, who will rotate every week. You are expected to collaborate respectfully, and to work through things as a team (you will not divide the work up and work separately). When programming, do pair programming: use a shared screen + keyboard and switch between driver and navigator roles every 5-15 minutes.

Grading

The lab activities count for a portion of your overall course grade. You will complete a reflection at the end of each of the first two major course units where you assign yourself a grade along with potential continuing learning goals to improve that grade. You will complete a final reflection at the end of the class to assign yourself a final overall lab grade. Your self-assigned grade should be based on:

  • Your pre-lab performance, after revisions.
  • Your mastery of in-lab materials based on self-assessment reports, possibly after review.
  • Additional considerations for effort, extraneous interruptions, etc.

Your lab grade will be the average of these three self-assigned grades, taking into account continuing learning goals you’ve completed. I will review your self-assigned grades and per-lab self-assessments, and may ask you to negotiate them if I feel that your self-assessment does not reflect your actual learning progress.

This is a very non-standard grading process, and it may be a bit uncomfortable. There are some compelling studies that show that self-assessment offers improved motivation and leads to better learning outcomes, which is why I’m using it. I hope that it will help you feel more in-control of your learning, and that it will allow you to learn for the sake of building critical CS skills, rather than just feeling that you’re learning whatever you need to pass the class.


Lab 1: Transistors to Gates

Lab 2: Data as Bits

  • The pre-lab assignment is on Gradescope (also make sure you’ve completed the “Make Nothing from Something” section of Assignment Zero) (check Gradescope feedback for correct answers)
  • Learning Goals
  • Slides
  • Lab Notebook

Lab 3: Combinational Logic & Arithmetic

  • The pre-lab assignment is on Gradescope, but you will need to do your work on paper (using the template file you can download from Gradescope) and scan it in. You should upload the assignment to Gradescope before lab (or bring a paper copy to lab, revise it, and upload afterwards). Using a cell-phone scanning app to scan it is fine.
  • Learning Goals
  • Slides
  • Lab Notebook

Lab 4: ALU & Sequential Logic

Lab 5: Processor Datapath

Lab 6: Pointers in C

Lab 7: x86 Assembly

Lab 8: x86 Stack

Lab 9: Data Structures in Memory

Lab 10: Buffer Overflows

Lab 11: Processes

Lab 12: Memory Allocation

Lab 13: Malloc Workshop