Welcome to CSE 421/521

Today:
  • Meet the CSE 421/521 staff!

  • Introduction to course content

  • Overview of course policies

Why I’m Here

I took the red pill

Why I’m Here

  • I took CS161 @ Harvard—​now also known as CSE 421/521 at the University at Buffalo—​from Margo Seltzer in 2001

  • At that point I was a physics major, but I wouldn’t be for long…

  • …​because I discovered that I loved building computer systems and teaching people about them.

  • I would up in graduate school (where I TA’d this course many times).

  • And graduate school landed me right back here to begin the cycle again.

So be careful: this class can be transformative!

Took this class

Became a professor

Spent time and energy on this class

Got fired

Why Are You Here?

Introducing the 2017 Course Staff

Meet

Your new best friends

Introducing the 2017 Course Staff

We probably have the best course staff ever this year: a mixture of new TAs, veteran volunteers, and a large group of "ninjas"—students returning from last year to help out.

Official Teaching Assistants
  1. Ali Ben Ali (returning from last year)

  2. Carl Nuessle (returning from forever)

  3. Vicky Zheng (took the class last year)

We’re still working out roles, but you’ll probably see all three TAs in recitation and office hours. They will also work together to mark all human-graded work.

Our ninjas are all (excellent) returning 2016 students. Some will do local office hours, some remote, and some may help out on the forums.

Unofficial Teaching Assistants
  1. Scott Haseley (test161 maintainer)

  2. Guru Prasad (the official OS/161 Guru)

  3. Jinghao Shi (ultimate Tier 3 support)

These blue group graduate students will help with office hours and work on tool development. All are former 421/521 students!

Operating Systems Briefly Defined

Operating System:
  1. A computer program that

  2. multiplexes hardware resources and

  3. implements useful abstractions.

The OS is just another computer program! (If a large, complex, mature and mission critical one.)

Multiplexing allows multiple people or programs to use the same set of hardware resources—​processors, memory, disks, network connection—​safely and efficiently.

Abstractions--processes, threads, address spaces, files, and sockets—​simplify the usage of hardware resources by organizing information or implementing new capabilities.

Motivating This Class

  • How many of you have participated in OS development?

  • How many of you regularly program in languages that use operating system abstractions directly?

  • And C is a dead language—​rightfully so!

  • So why study operating systems? Why is this class even offered? Why is it required?

Remind me

What’s this for again?

Why Study Operating Systems?

  • Reality: this is how computers really work, and as a computer scientist or engineer you should know how computers really work.

  • Ubiquity: operating systems are everywhere and you are likely to eventually encounter them or their limitations.

  • Beauty: operating systems are examples of mature solutions to difficult design and engineering problems. Studying them will improve your ability to design and implement abstractions.

Why Program Operating Systems?

  • Design: programming operating systems stresses the importance of careful design and specification before coding begins. You will learn the value of design, probably the hard way.

  • Difficulty: operating systems are large existing code bases where new solutions have stringent performance requirements. Programming operating systems will make you a better programmer and improve all of your subsequent work.

  • Debugging: debugging operating systems is challenging due to their multi- threaded nature and the lack of typical debugging support provided to applications. Again, debugging operating systems will sharpen your debugging skills.

Course Structure

  • Conceptual learning…​

    • Lectures

    • Recitations

    • Exams

  • …​by doing (programming).

Learning Objectives: Conceptual

When you finish CSE 421/521 you will:
  1. understand the abstractions supported by modern operating systems

  2. be able to describe how operating systems policies and mechanisms safely and efficiently multiplex hardware resources

  3. be able to analyze historical, current, and emerging operating system designs and features

The main way we will know that you are learning is by your participation in class and recitations.

You will be tested for mastery on exams.

Conceptual Progression

  • Introduction to operating system abstractions and structure.

  • Abstracting and multiplexing:

    • the CPU—​interrupts, context, threads, processes, processor scheduling, thread synchronization.

    • memory—​memory layout, address translation, paging and segmentation, address spaces, translation caching, page fault handling, page eviction,

    • swapping.

    • storage—​spinning disks and Flash, spinning disk scheduling, on-disk layout, files, buffer cache, crash and recovery.

  • Virtualization.

  • Networking (time permitting)

Learning the Concepts

  • Attend class.

  • Come to class on time:

    • Music starts as soon as I can get into the room…​

    • Lectures will start at 2:05PM sharp and finish by 2:50PM.

  • Ask questions during class.

    • I’m very flexible about how much we cover this semester.

    • I would rather teach less and have everyone understand it.

    • Our back-and-forth during class is the one of the few indicators I have of how much you are absorbing…​

References

51dqadCuRiL
Figure 1. Modern Operating Systems by Andrew Tanenbaum
71RwRPoFK%2BL
Figure 2. The C Programming Language by Kernighan and Ritchie

Material presented in lecture takes priority over anything you find in a book or online.

Learning Objectives: Programming

When you finish CSE 421/521 you will:
  1. be able to design and implement well-structured systems software

  2. utilize appropriate synchronization primitives

  3. identify and correct bugs in complex multi-threaded systems

  4. be able to formulate and test performance hypotheses

We will know that you are learning by your participation in class, recitations, and office hours, and your use of online testing resources.

You will be tested for mastery by each programming assignment.

Programming Progression

All due dates Friday @ 5PM EST.

  • ASST0: Introduction to OS/161—"Due" Friday 1/3/2017 @ 5PM.

    • Become comfortable using standard UNIX development tools.

    • Learn to navigate the OS/161 source tree.

    • Configuring, building and running your first kernel.

    • Nothing really to submit for this one.

  • ASST1: Synchronization Primitives—Due Friday 1/17/2017 @ 5PM.

    • Design and implement locks and condition variables.

    • Use them to solve several toy synchronization problems.

Did You Think It Would Be That Easy?

Thought I was done

Then noticed ASST3

Programming Progression

All due dates Friday @ 5PM EST.

  • ASST2: System Calls and Process Support

    • ASST2.1 (2/24/2017): ASST2 setup and first steps.

    • ASST2.2 (3/17/2017): Finish the job: implement file system system calls (open(), close(), read(), write(), lseek(), dup2(), chdir(), and getcwd()) and the process-related system calls (fork(), execv(), waitpid(), \_exit()).

  • ASST3: Virtual Memory

    • ASST3.1 (4/7/2017): Kernel memory management.

    • ASST3.2 (4/21/2017): TLB fault handling and sbrk().

    • ASST3.3 (5/5/2017): Paging to disk

OS/161

  • OS/161 is an instructional operating system developed by David Holland at Harvard University.

  • It attempts to strike a balance between Linux and other extremely-mature systems—​too difficult to hack on—​and existing instructional operating systems frameworks—​not realistic enough.

  • Your OS/161 kernel runs in an emulator, sys161, which emulates an MIPS r2000/r3000 instruction set architecture (ISA).

  • Using sys161 allows us to simplify debugging and hardware support.

10,000 Hours

  • While many operating systems concepts are elegantly simple, implementing them is not.

  • Therefor, this class is not easy:

  • However, this class is also worthwhile:

    • 3.97 overall rating (2016).

Sorry

Learning is hard

2016 Positive Student Feedback

  • I liked the lectures/videos/notes, the course website and assignment submission/feedback system is stellar, and Geoff is very enthusiastic about the course.

  • The OS161 project and the amount of of hours provided for it was incredibly challenging but manageable. The heavy weight on exams allowed good leniency so the project wasn’t one make or break grade.

  • The projects were really good. I learnt a lot from them. TAs were really helpful.

  • The work is very hard, but incredibly engaging. This course is definitely a real-world prep course and goes beyond the classroom, teaching time management, problem solving and different types of thinking. The lectures were very interesting and the course website is fantastic!

  • Geoff is easily one of the best professors I’ve ever had. You can tell he is passionate about what he teaches

  • Everything…​ The professor goes out of his way let everyone learn what he wants to teach.

  • The efforts put forth by professor and TAs is really good. They have designed the course structure and timeline very well. Also, one thing which I felt in love with was test161. It is the test suite I have never seen before. They have worked very hard for that

2016 Negative Student Feedback

Of course, not everyone is happy.

  • There are 2 sides to Geoff either he is in a great mood or he is in a bad mood. I think that he is generally a really nice guy but you do not what to get on his bad side.

  • He made students feel very unwelcome during office hours, he seemed hostile and rude at times to students who were struggling but nice to others who had a better understanding. I was personally scared of interacting with him due to the way he treated students during office hours.

  • Professor Challen is a sadistic being.

  • Failed at being a developer at Microsoft and in turn came back to haunt the halls of the CSE department.

  • Still keeps sending emails to all CSE students more than any other in the department. Better to stop doing that.

So make up your own mind about which are the "alternative facts". Full course reviews for 2015 (PDF) and 2016 (PDF) are available online. Or visit my RateMyProfessor page.

I want you to make the right decision about this course and whether it is right for you.

Questions about Content?

ops-class.org Website

  1. Everything you need to get started should be online.

  2. We will be updating things as we go.

  3. Lecture slides and notes are online in case you want to follow along in class.

Grading

  • Conceptual—(50%)

    • 15%--Midterm Exam

    • 35%--Final Exam

  • Programming—(50%)

    • 5%--ASST0

    • 10%--ASST1

    • 15%--ASST2

    • 20%--ASST3

Continuous Choose-Your-Own Grade Programming Evaluations

  • All assignment grading in CSE421/521 is automated.

  • Therefore…​ you can have your code graded repeatedly whenever you like.

  • Therefore…​ you can stop each assignment whenever you are satisfied with your grade.

Continuous Choose-Your-Own Grade Details and Caveats

  • Assignments are done in pairs, so find a partner who is interested in achieving the same grade as you are.

  • Note that we do not allow students to work alone except in extremely unusual circumstances.

    • "I want to work alone" does not represent one of these situations!

  • Assignments are cumulative and we will not distribute solution sets without a significant penalty.

  • Late submissions will also be penalized.

Communication

  • We will sign you all up for a mass email list.

  • We also have a Discourse forum linked off the website which is the best way to get help quickly.

Using Email

  • If you need to email the course staff ([email protected]), please consider the following:

    • Is this information likely to be available on the website? If yes, go find it!

    • Is the answer to this question likely to benefit other students? If yes, use Discourse.

  • Before you email me directly, please also consider the following:

    • Is this something that the course staff could answer? If yes, email them.

  • Here’s the bottom line: the more time we spend answering repetitive email, the less time we have available to help you with real problems.

Getting Help: Recitations

  • Recitations this year will cover a mix of conceptual and assignment-driven material.

  • There are also screen casts on the website for each assignment. We may update them as we go along.

Getting Help: Office Hours

  • All TAs and Ninjas will be holding office hours.

    • We are hoping to have around 40 hours of office hours scheduled per week, meaning that you have plenty of opportunities to complete the challenging CSE 421 assignments.

  • Office hours are the best place to get help on the programming assignments.

  • CSE 421/521 office hours will be in Davis Hall in locations announced on the calendar, but probably near Davis 301B or in the Second Floor atrium.

  • Just come in and do the assignments during office hours—​that way, when you get stuck, you are in the right place.

Getting Help: Working in Pairs

Partner groups are jointly responsible for joint work.

  • If any part is plagiarized, both partners fail.

  • If any part is plagiarized, both partners fail.

  • If you have concerns about work your partner has submitted, immediately approach the course staff.

  • If you do not we will assume later that your consent was given.

  • It is entirely your responsibility to ensure that your team’s submission is fair and reflects your contributions.

Pair programming assignments for CSE 421/521 are very clear about what kinds of collaboration are permitted. We consider violating these expectations to be cheating.

Getting Help: Helping Each Other

  • The course staff will be working as hard as you—​and sometimes harder—​but there are many of you and few of us. Look to your left and your right: these are your comrades.

  • Good classes come through CSE 421/521 as a team.

Collaboration

  • Simple rule: talking about code is collaborating, talking in code (or exchanging code) is cheating.

    • Unless you are talking to your partner in which case anything goes.

Cheaters

  • I take cheating very seriously:

    • Not because I am vindictive and mean…​

    • …​ but because I believe in protecting and honoring those of you that work hard and play by the rules.

I will find cheaters

No matter how long it takes

Cheaters

  • We will use an online service to detect and investigating code similarity.

    • It is very fast, so we can use it on every submission.

    • It is very accurate.

    • We will compare your assignment against everything we can think of: this years', last years', anything you can find online, assignments submitted at Harvard, etc.

    • I have a huge repository of old assignments now. If you can find it, I’ve already got it.

Keep Your Code Private

  • You will need a private Git repository that you and your partner can use.

  • Lots of options here:

    • GitHub has limited private repos for students.

    • GitLab and other Git providers also provide private repositories.

  • It does need to support deployment keys so that we can clone your repository during testing.

And when I do

I’ll be mad

Cheaters

  • We catch and fail cheaters. Not for the assignment: for the entire class.

Cheated in 421/521

Got an F. Sad!

I don’t always cheat…​

But when I cheat in 421/521, I get an F!

Cheated in 421/521

Got an F

February: Won 5th Super Bowl

March: Got an F for copying code in 421/521

Cheated in 421/521

Not really!

Didn’t cheat in 421/521

Runs own business!

Next Steps

  1. Start setting up your environment and ASST0

  2. Find a partner!

  3. Wednesday we will go through ASST0 together in class

    • Please at least get your vagrant environment set up before coming to class, since it requires a large download. More on the forum soon.

  4. We will schedule one-time office hours on Wednesday, Thursday, and Friday for those struggling to get started.

  5. Recitations and regular office hours will start next week.