YouTube placeholder

Introduction to CSE 421/521

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?

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

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.jpg
Figure 1. Modern Operating Systems by Andrew Tanenbaum
71RwRPoFK%2BL.jpg
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 2/12 @ 5PM.

    • Become comfortable using standard UNIX development tools.

    • Learn to navigate the OS/161 source tree.

    • Configuring, building and running your first kernel.

  • ASST1: Synchronization Primitives—​Due Friday 2/12 @ 5PM.

    • Design and implement locks and condition variables.

    • Use them to solve several toy synchronization problems.

All due dates Friday @ 5PM EST.

  • ASST2: System Calls and Process Support—​due Friday March 11th @ 5PM.

    • The file system system calls: open(), close(), read(), write(), lseek(), dup2(), chdir(), and getcwd(). does this work

    • The process-related system calls: fork(), execv(), waitpid(), \_exit().

    • Several process scheduling algorithms.

  • ASST3: Virtual Memory—​due Friday May 13th @ 5PM.

    • TLB fault handling

    • Paging to disk

    • Several TLB entry and page replacement algorithms

    • sbrk()

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:

    • 3.52 (-0.57) and 4.03 (-0.06) on "Appropriate Workload" score in 2013 course evaluations for 421 and 521 respectively (90%+ response rate).

  • However, this class is also worthwhile:

    • 4.14 (+0.31) and 4.59 (+0.76) overall rating (2013).

ops-class.org Website

  • It’s not ready…​ but should be soon.

  • We’re in the process of making a lot of improvements this year, so please bear with us…​

  • If it interferes with the deadlines we’ll adjust them. ASST0 should be posted by the end of the week and you will be provided access to the resources you need to complete it.

Grading

  • Conceptual--(50%)

    • 5%--Preterm Exam (Wednesday)

    • 15%--Midterm Exam

    • 30%--Final Exam

  • Programming--(50%)

    • 5%--ASST0

    • 10%--ASST1

    • 15%--ASST2

    • 20%--ASST3

The preterm exam is free points: 5% for showing up and doing your best. If you do not take the preterm your midterm and final exam scores will be scaled appropriately.

Continuous Choose-Your-Own Grade Programming Evaluations

  • Almost 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.

  • We are still deciding how to handle the hand-graded parts of the assignments…​ stay tuned.

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.

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 (staff@ops-class.org), 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

  • Ali and Jerry will be holding recitations. Unfortunately recitations this year are for undergraduates only and one is at 8AM.

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

  • We will also try to post some screencasts this year!

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.

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

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


Created 2/17/2017
Updated 2/17/2017
Commit 7512d07 // History // View
Built 1/24/2016 @ 19:00 EDT